Use Tailwind CSS icons through ordinary className utilities. Devigner Icons
are SVG React components that inherit currentColor, so the same classes you
use for text control icon size, colour and interactive states.
pnpm add @devigner-ui/iconsThe classes below work the same in Vue and Svelte, with class in place of
className; see Frameworks in the sidebar.
Import only what the component needs:
import { IconBell } from "@devigner-ui/icons/Bell";
import { IconSettings } from "@devigner-ui/icons/Settings";Tailwind's size-* utilities set an icon's width and height. text-* utilities
set its stroke or fill through currentColor.
<IconBell className="size-5 text-slate-600" />
<IconSettings className="size-6 text-indigo-600" />Keep icon and text in the same colour context for hover and dark-mode states:
<a
href="/settings"
className="inline-flex items-center gap-2 text-slate-700 hover:text-indigo-600 dark:text-slate-200"
>
<IconSettings className="size-5" />
Settings
</a>Every icon is available as outline, twotone, bold, bulk and broken. Use
variant when an interface needs more visual weight or a clearer secondary
tone.
import { IconHeart } from "@devigner-ui/icons";
<IconHeart className="size-6" />
<IconHeart variant="TwoTone" className="size-6 text-rose-600" />
<IconHeart variant="Bold" className="size-6 text-rose-600" />Outline, twotone and broken icons also take strokeWidth:
<IconHeart className="size-6" strokeWidth={2} />Use an accessible name when an icon is the only visible control content:
import { IconMagnifier } from "@devigner-ui/icons/Magnifier";
<button type="button" aria-label="Search" className="grid size-10 place-items-center rounded-md hover:bg-slate-100">
<IconMagnifier className="size-5" />
</button>Find icons in the full collection, system controls, or files and documents. For import patterns, see React SVG icons.