Jiggicons

Tailwind CSS

Size and colour icons with utility classes.

Icons take their colour from the text around them (currentColor), so text colour utilities colour them. Size them with size or with utilities.

<Bell className="size-5 text-neutral-500 hover:text-neutral-900 transition-colors" />

<button className="inline-flex items-center gap-2 text-sky-600">
  <Heart variant="duotone" className="size-4" /> Save
</button>

CSS sizes win over the size prop, so size-5 works as it is. To make an icon grow with the text around it, use <Bell size="1em" />.

Dark mode

<Bell className="text-neutral-900 dark:text-white" />

Glass icons keep their own frosted colours. See Size and colour.