Components

Icon

SVG icon component with theme color and size token support

Overview

A component that renders SVG icons. Supports theme color tokens and size tokens.

Sizes

SizeValueUse Case
extraSmall12pxInline icons, inside tags
small16pxSmall buttons, inside input fields
medium20pxDefault icon size
large24pxNavigation, header icons

Colors

Icon colors use semantic color tokens:

  • iconDefaultDefault — Default icon
  • iconDefaultDisabled — Disabled icon
  • iconDangerDefault — Danger/error icon
  • iconBrandDefault — Brand icon
  • iconBrandOnBrand — Icon on brand background

Props

PropTypeDefaultRequiredDescription
namestring-YesIcon name
size'extraSmall' | 'small' | 'medium' | 'large''medium'NoIcon size
colorstring'iconDefaultDefault'NoTheme color token
rotatenumber-NoRotation angle (degrees)
classNamestring-NoAdditional CSS class

Usage

import { Icon } from '@illog/ui'
 
// Basic usage
<Icon name="check" />
 
// With size and color
<Icon name="close" size="large" color="iconDangerDefault" />
 
// Rotation
<Icon name="chevron_down" rotate={90} />
 
// With a button
<Button variant="secondary">
  <Icon name="plus" size="small" />
  Add
</Button>