Marigold
Marigold

Application

MarigoldProvider
RouterProvider

Layout

Aside
Aspect
Breakout
Center
Columns
Container
Grid
Inline
Inset
Scrollable
Split
Stack
Tiles

Actions

ActionBaralpha
Button
Link
LinkButton
ToggleButtonalpha
ToggleButtonGroupalpha

Form

Autocomplete
Calendar
Checkbox
ComboBox
DateField
DatePicker
FileField
Form
Multiselectdeprecated
NumberField
Radio
SearchField
Select
Slider
Switch
TagFieldbeta
TextArea
TextField
TimeField

Collection

SelectList
Tableupdated
Tag

Navigation

Accordion
Breadcrumbs
Pagination
Sidebarbeta
Tabs
TopNavigationbeta

Overlay

ContextualHelp
Dialog
Drawer
Menu
Toastbeta
Tooltip

Content

Badge
Card
Divider
EmptyStatebeta
Headline
Icon
List
Loader
SectionMessage
SVG
Text

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
parseFormData
useAsyncListData
useListData
useResponsiveValue
useTheme
VisuallyHidden
Components

Icon

How to use Marigold Icons

This page explains how to use Marigold icons effectively. Icons enhance visual appeal and help draw users' attention. As a core element of the Marigold design system, they establish a consistent visual language across applications.

For a full list of the available Icons go to the Marigold Icons.

Anatomy

The <Icon> component consists of an SVG element that represents the icon.

Appearance

PropertyTypeDescription
variant-The available variants of this component.
size-The available sizes of this component.

Usage

Icons are used to enhance the user interface by providing visual cues and improving the overall user experience. They can be used in buttons, links, or as standalone elements to represent actions, statuses, or concepts. Icons should be used sparingly and only when they add value to the user interface. They should be easily recognizable and convey their meaning clearly without the need for additional text.

Do
  • Icons should be used consistently throughout the application to maintain a cohesive design language.

  • They should also be accessible, meaning that they should have appropriate alternative text or labels for screen readers.

Don't

Icons should not be used as a replacement for text, but rather as a complement to it.

Installation

The Marigold Icons are available as a package called @marigold/icons. You can use them in your project by installing the package and importing the icons you need.

# with npm
npm install @marigold/icons --save

# with pnpm
pnpm add @marigold/icons

To import a specific component you just have to use the name of the icon directly between the < /> brackets. E.g.:

import { DesignTicket } from '@marigold/icons';

export default function MyComponent() {
  return <DesignTicket />;
}

You can also copy the SVG code directly from the Marigold Icons page, but we recommend using the package for better maintainability and consistency.

Icon size

You can change the size of the icon by using the size prop, you can set it to any valid CSS size value. It automatically sets the width and height of the SVG element.

import { DesignTicket } from '@marigold/icons';export default () => <DesignTicket size={40} />;

Customize icon

Icons are built on our own SVG component, which is based on the SVG standard. Meaning you can use all the attributes and properties that are available in the SVG standard.

Props

Did you know? You can explore, test, and customize props live in Marigold's storybook. Watch the effects they have in real-time!
View SVG stories

SVG

Prop

Type

Related

All available icons

Read more about the available icons in Marigold.

SVG

Read more about the SVG wrapper.
Last update: 3 days ago

Headline

The title of a content section

List

Used to display an unordered or ordered list.

On this page

AnatomyAppearanceUsageInstallationIcon sizeCustomize iconPropsSVGRelated