Icon
One Lucide icon, sized in pixels, at the library's stroke width of 1.75.
tsx
import { Icon } from '@adecore/ui';
import { Folder } from 'lucide-react';
<Icon icon={Folder} size={14} />;tsx
import { Icon } from '@adecore/ui';
import { Folder } from 'lucide-react';
export default function IconDemo() {
return (
<div className="flex items-end gap-6 text-text-muted">
{[12, 14, 16, 20].map((size) => (
<span key={size} className="flex flex-col items-center gap-2 text-xs">
<Icon icon={Folder} size={size} />
{size}
</span>
))}
</div>
);
}Icons come in 12, 14, 16 and 20 pixels. Use 16 on its own and in a 32 pixel button, 14 next to text-sm or in a menu row, 12 in the smallest controls, and 20 in an empty state.
An icon carries aria-hidden; the name belongs on the button or label next to it. It is centered on the text beside it.
Props
| Prop | Type | Default | |
|---|---|---|---|
icon | LucideIcon | Required. | |
size | number | 16 | In pixels. |
className | string | ||
ref | Ref<SVGSVGElement> |
IconProps is an exported type.