Skip to main content
CodivDocs

Icon

Inline Lucide icon for use within prose.

Usage

<Icon> renders a single Lucide icon inline with text. Use it for inline UI references and shortcut hints.

Click the <Icon name="settings" /> icon to open settings.
Press <Icon name="search" /> to focus the search bar.

Click the icon to open settings. Press to focus the search bar.

Sizing

Default size is 16px, matching the surrounding body text. Override with the size prop:

<Icon name="rocket" size={12} />
<Icon name="rocket" size={16} />
<Icon name="rocket" size={24} />
<Icon name="rocket" size={32} />

Custom color

By default the icon inherits the surrounding text color (currentColor). Override with the color prop:

<Icon name="check-circle" color="var(--docs-success)" />
<Icon name="alert-triangle" color="var(--docs-warning)" />
<Icon name="x-circle" color="var(--docs-danger)" />

Success state


Warning state


Error state

Available icons

The icon registry includes ~80 curated Lucide glyphs covering navigation, actions, content, UI, status, dev tools, communications, brand, infrastructure, and design. Common names: rocket, book, code, terminal, search, settings, check, x, info, warning, lightbulb, sparkles, lock, key, user, mail, globe, database, palette.

The full registry lives in src/components/docs/lucide-icon.tsx.

If a name isn't in the registry, <Icon> falls back to rendering it as plain text — so you can pass an emoji as a graceful fallback (<Icon name="🚀" />).

When to use vs component icon prop

<Icon> standaloneComponent icon prop
Use caseInline-with-text referencesDecorative icons inside Card, Callout, Step
Example"Click "<Card icon="rocket" title="..." />
SizingInline with textComponent-defined

Props

PropTypeDefaultDescription
namestringrequiredLucide icon name (kebab-case or camelCase)
sizenumber16Pixel size
colorstringcurrentColorColor override (CSS color or CSS variable)

Last updated April 12, 2026