v1.2.2
Icon
Stable
This component is considered stable. Reach out to the Spark team to find out more about what this means.
Installation
Install
yarn add @spark-web/icon
npm
@spark-web/icon
Source GitHub.com
Bundle unpkg.com
Spark uses the “outline” variants of the wonderful open-source Heroicons library.
Examples
Size
Define the icon size.
Tone
Define the icon tone.
Contrast
To ensure icons have sufficient contrast, when on a dark background the foreground tones “neutral” and “muted” will be inverted.
Props
Prop | Type | Description |
---|---|---|
data? | DataAttributeMap | Sets data attributes for the element. |
size? | SizeType: "xxsmall" | "xsmall" | "small" | "medium" | "large" | The size of the icon. |
tone? | "neutral" | "muted" | "link" | "disabled" | "fieldAccent" | "placeholder" | "accent" | "primary" | "primaryHover" | "primaryActive" | "secondary" | "secondaryHover" | "secondaryActive" | "caution" | "critical" | "info" | "positive" | The tone of the icon. |