React

bash
npm i kubai-icons-react

Usage

tsx
import { Calendar, Lock } from "kubai-icons-react";

<Calendar />
<Lock size={32} color="#22C55E" variant="soft" title="Locked" />

Props

PropDefaultDescription
size24Width and height in pixels.
colorcurrentColorAccent from which every gradient, outline and mark is derived.
variant"color""soft" lifts the fills, deepens the outlines and turns white marks deep.
badgeColordark greyCorner badge disc colour: any CSS colour, or "semantic" for a colour per badge (green for add, red for remove, amber for warning, and so on).
trigger"hover""parent" plays the motion when the closest [data-kubai-trigger] (or the parent element) is hovered or focused; "none" never plays it.
hoverNoneControlled hover: true plays the motion, false reverses it.
active / defaultActive / onActiveChangeNoneToggle state for tap icons such as Bookmark.
titleNoneAccessible name. Without it the icon is aria-hidden.

Other SVG props (className, style, event handlers, ref) pass through to the <svg>.

Button trigger

tsx
<button data-kubai-trigger className="btn">
  <Trash size={18} trigger="parent" />
  Delete
</button>

By name

Names supplied by data require the dynamic component. Each icon remains a separate chunk.

tsx
import { DynamicIcon } from "kubai-icons-react/dynamic";

<DynamicIcon name={item.icon} size={20} />

Next.js

Icons work in Server Components and Client Components without configuration. Markup renders on the server and motion attaches on hydration.

Deep imports

For the fastest dev-server start, icons can be imported from their own files:

tsx
import Folder from "kubai-icons-react/icons/folder";