Usage

Install once. Import what you use.

Every icon is a typed React component with static exports, so bundlers keep only the icons you import.

01

Install

Add the package with your package manager. React 18 or newer.

bun add xiod-icons

02

Use

Import icons by name. They inherit the text colour and render at 24px unless you pass a size.

03

Props

Every icon takes these props, plus any SVG attribute (className, style, onClick…).

PropTypeDefaultDescription
sizenumber | string24Width and height of the icon.
colorstring"currentColor"Stroke and fill colour. Follows the text colour.
strokeWidthnumber | string1.5Stroke width in 24×24 canvas units.
absoluteStrokeWidthbooleanfalseKeep the stroke the same number of pixels at any size.
variant"outline" | "duotone" | "filled" | "pixel" | "glass" | "dotted""outline"Rendering treatment.
texture"none" | "paper" | "fabric" | "concrete" | "wood" | "metal" | …"none"Procedural material painted into the icon.
textureOpacitynumber (0–100)100Strength of the texture.
secondaryColorstringcolorAccent for duotone, glass and gradients.
gradientbooleanfalseBlend color into secondaryColor.
noisenumber (0–100)0Grain over the icon.
radius"none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | number"lg"Corner rounding, rebuilt from the path data.
titlestring—Accessible name. Without it the icon is hidden from screen readers.

04

Accessibility

Icons are aria-hidden by default. Name the control around them, or pass title when the icon carries meaning on its own.

05

Imports

The root import tree-shakes in any modern bundler. Subpath imports skip the barrel entirely, which keeps dev servers from parsing it.

Root import

One icon per subpath

Icons render without client JavaScript, so they work in React Server Components as-is.

06

Dynamic icons

For icon names that come from data, such as a CMS or user settings. ArrowDown is named "arrow-down".

Each icon loads on demand as its own chunk, with an empty placeholder of the same size (or your fallback) until it arrives. The name map is about 94 KB gzipped, so use static imports whenever you know the icon in advance; apps that never import xiod-icons/dynamic never include it.

Try every prop live

The playground previews all 5,437 icons with these props and writes the React code for you.

Open the playground