Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

Icon

Open .md
Live preview

Loading example…

Icon is part of the Atoms set, imported from @jcsoftdev/ui/atoms.

import { Icon } from "@jcsoftdev/ui/atoms";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/atoms/icon.

<Icon name="calendar" className="size-6 text-ink" />
Prop Type Default Description
name "menu" | "search" | "video" | "list" | "copy" | "download" | "grid" | "calendar" | "folder" | "users" | "pen" | "file" | "coin" | "shield" | "calculator" | "sync" | "sliders" | "bell" | "plus" | "chevron-down" | "chevro… Registry name; ignored when icon is provided.
icon IconComponent Any icon component (see @jcsoftdev/ui/icons).
label string Accessible label. Without it the icon is decorative (aria-hidden).
size string | number Width and height in px. Defaults to 24.
strokeWidth string | number Stroke width in the 24px grid. Defaults to 2.
absoluteStrokeWidth boolean Keep the rendered stroke width constant when size changes.

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/atoms/icon/icon.tsx