Skip to content
AXIcons
AXIcons
Theme

React

Use AXIcons components in React: imports, props, Tailwind and the brand registry.

Install

Peer dependency: react ^19.3.1.

Terminal
pnpm add @axcore/xicons-react

Named imports

Each icon is its own export, and the package declares "sideEffects": false, so your bundle keeps only the icons you import.

React
import { IconBell, IconBellFilled, IconBellDuotone } from "@axcore/xicons-react";

<IconBell />          // outline
<IconBellFilled />    // filled
<IconBellDuotone />   // duotone: outline plus a 20% tint

Props

Icons accept every <svg> prop (ref, onClick, style, aria-*…) plus two of their own.

PropTypeDefaultWhat it does
sizenumber | string24Sets width and height.
titlestringnoneAdds a <title> and role="img". Without it the icon is aria-hidden.
strokeWidthnumber1.75Stroke weight of outline icons.
colorstringcurrentColorThe colour currentColor resolves to.
classNamestringnoneAdded after the built-in xi xi-<name> classes.

With Tailwind CSS

Classes win over the width, height and stroke-width attributes, so size, colour and stroke can all come from utilities.

React
<IconCamera className="size-5 shrink-0 text-zinc-500 hover:text-zinc-900 dark:text-zinc-400" />

More in CSS and Tailwind.

Full-colour brand logos

For the seven full-colour logos, use the Icon component. It looks names and aliases up at runtime. See brand icons.

React
import { Icon } from "@axcore/xicons-react";

<Icon name="react" variant="original" size={32} title="React" />

Next steps

Something wrong or missing?Open an issue

Jump to
Browse all iconsIcon library
InstallationGetting started
Quick startGetting started
ReactIntegrations
React NativeIntegrations
↑↓ navigateopen⌘K toggle