Icon

A universal icon component supporting FontAwesome, Lucide, and Tabler icons with dynamic loading.

Font Awesome
Lucide
Tabler

Installation

bunx --bun shadcn@latest add undefined/r/Icon.json

Usage

import { Icon } from "@/components/Icon"

// Font Awesome (Default)
<Icon icon="thumbs-up" />

// Lucide
<Icon provider="lucide" icon="camera" />

// Tabler
<Icon provider="tabler" icon="user" />

API Reference

PropTypeDefaultDescription
iconstring-The name of the icon (e.g., "thumbs-up", "camera"). Alias for name.
namestring-The name of the icon.
provider"fa" | "lucide" | "tabler""fa"The icon library to use.
variantstring"fa-solid"Font Awesome variant (e.g., "fa-brands").
sizestring | number-Size of the icon.
colorstring-Color of the icon.
strokestring | number-Stroke width (Lucide/Tabler only).