Icon
An icon is a symbol representing a command, device, directory, or common action.Installation
| Install | yarn add @atlaskit/icon |
|---|---|
| Source | Bitbucket.org, (opens new window) |
| npm | @atlaskit/icon, (opens new window) |
| Bundle | unpkg.com, (opens new window) |
Props
| Description | Color for the icon. Supports any icon or text design token, or 'currentColor' to inherit the current text color.
Defaults to |
|---|---|
| Type | "currentColor" | "var(--ds-link-pressed)" | "var(--ds-link-visited-pressed)" | "var(--ds-text)" | "var(--ds-text-accent-lime)" | "var(--ds-text-accent-lime-bolder)" | ... 74 more ... | "var(--ds-rovo-icon-purple)" |
| Description | Text used to describe what the icon is in context. A label is needed when there is no pairing visible text next to the icon. An empty string marks the icon as presentation only. |
|---|---|
| Type | string |
| Description | Display name of the icon. |
|---|---|
| Type | string |
| Description | No description. |
|---|---|
| Type | boolean |
| Description | There are two icon sizes available:
Alternatively a function can be passed to determine the size based on the icon's name, which can be useful for dynamic rendering. |
|---|---|
| Type | IconSize | ((iconName: string) => IconSize) |
| Description | Use a |
|---|---|
| Type | "none" | "compact" | "spacious" |
| Description | A |
|---|---|
| Type | string |