Icons
Display icons from Lucide, Font Awesome, or custom sources
The Icon component displays icons from various sources including Lucide icons, Font Awesome, and custom images.
Usage
mdx
1<Icon icon="rocket" size={24} color="#3b82f6" />Live Examples
Lucide Icons
With Colors
Different Sizes
Inline with Text
This task iscomplete!
Want to learn more?Check the docs.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
icon | string | ReactNode | required | Icon name, URL, or React node |
iconType | string | "regular" | Font Awesome style (if using FA) |
color | string | - | Icon color (CSS color value) |
size | number | 20 | Icon size in pixels |
className | string | - | Additional CSS classes |
Icon Sources
Lucide Icons (Default)
Use kebab-case icon names from Lucide:
mdx
1<Icon icon="arrow-right" />2<Icon icon="check-circle" />3<Icon icon="external-link" />Image URLs
Use any image URL or local path:
mdx
1<Icon icon="/images/logo.svg" size={24} />2<Icon icon="https://example.com/icon.png" size={24} />Font Awesome
Prefix icons with fa- to use Font Awesome:
mdx
1<Icon icon="fa-github" iconType="brands" />Common Icons
| Icon | Name | Usage |
|---|---|---|
home | Home/dashboard | |
settings | Configuration | |
user | User profile | |
search | Search | |
plus | Add new | |
x | Close | |
check | Success | |
alert-triangle | Warning |