Media

Icon

A wrapper that sizes and colors your own icon art, such as an SVG. Lily ships no icons of its own.

ReactVueWeb Components
View in Storybook

Playground

Examples

<Icon size="lg" tone="primary" label="検索"><SearchSvg /></Icon>
<Icon aria-hidden><ChevronSvg /></Icon> // decorative

Props

Name Type Default Description
size IconSize md Size token (sets `font-size`; the icon is `1em` square). @default 'md'
tone IconTone Semantic color (uses the AAA `*-text` tokens). @default 'default' (currentColor)
label string Accessible label. When set, the icon is meaningful (`role="img"`); otherwise it is decorative and hidden from assistive tech.
children ReactNode The icon glyph — typically an inline `<svg>`.

Accessibility

  • Body/background contrast is ≥ 7:1 (AAA) in both light and dark.
  • Every interaction works with the keyboard alone.
  • The focus ring is always visible.
  • Respects prefers-reduced-motion and stops excessive motion.

Every component is designed to meet WCAG 2.1 AAA.