Icon Component
uifoundry/iconUnverifiedComponent
Icon component for rendering Lucide React icons dynamically by name
Install it
npx shadcn@latest add https://raw.githubusercontent.com/UIFoundry/uifoundry/master/icon.jsonSource
1import { icons } from "lucide-react";2import type { ComponentPropsWithRef } from "react";34export function Icon({5 icon,6 ...svgProps7}: { icon: keyof typeof icons } & ComponentPropsWithRef<"svg">) {8 const SelectIcon = icons[icon];9 if (!SelectIcon) {10 console.log("no icon found: ", SelectIcon, icon);11 return <></>;12 }13 return <SelectIcon {...svgProps} />;14}
What it pulls in
npm packages
Files it writes
More from uifoundry
All 54 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Groupanimated-group | uifoundry | Components | Unverified | 2 deps | |
| Buttonbutton | uifoundry | Components | Unverified | 3 deps | |
| Call To Action Pair Fieldcall-to-action-pair-field | uifoundry | Components | Unverified | 3 deps | |
| Cardcard | uifoundry | Components | Unverified | 1 dep | |
| Description Fielddescription-field | uifoundry | Components | Unverified | 2 deps | |
| Flickering Gridflickering-grid | uifoundry | Components | Unverified | 1 dep | |
| Header Fieldheader-field | uifoundry | Components | Unverified | 2 deps | |
| Render Blocksrenderblocks | uifoundry | Components | Unverified | 2 deps |
