npm install @idyeah/diya
GitHub
Appearance
Color scheme

Badge

Get code

Three steps. The first two happen once per app.

Step 1: Install

Terminal, in your app’s folder
npm install @idyeah/diya

Once per app. Every component and pattern is in this one package.

Working in Claude Code or Cursor? Connect your editor once and it fetches this for you.

No app yet? npm create diya@latest sets up Next.js or Vite with the styles and provider already in place. Then skip to step 3.

Step 2: Add the styles and provider

Once, at your app’s root: app/layout.tsx in Next.js, src/main.tsx in Vite. DIYA Sans comes with it.

Root layout or entry
import '@idyeah/diya/styles.css'
import { DiyaProvider } from '@idyeah/diya'

<DiyaProvider theme="dark">
  {children}
</DiyaProvider>

theme="dark" matches the catalog as you’re viewing it. theme="system" follows each visitor’s light or dark setting instead.

Get theme

Your brand as one CSS file and a few props.

Brand
AaAaNeutral (DIYA default)
Font
DIYA Sans
Corners · Elevation
Soft · Soft
Control height · Fields
Default · Auto
Glass
Off
Motion
Match device
Status colors
DIYA defaults

Step 1: Save the theme file

diya-theme.css · 6 lines
/* diya-theme.css, made in the DIYA catalog.
   Import it after '@idyeah/diya/styles.css'. Public tokens only.
   Brand: Neutral (DIYA default). */

/* No color, corner or elevation changes: DIYA's defaults apply. */

Public tokens only: the names DIYA promises not to rename in 1.x.

Step 2: Import it after DIYA’s styles

Root layout or entry
import '@idyeah/diya/styles.css'
import './diya-theme.css'

Order matters. The theme goes second so it wins.

Variant
Size
Color
On an icon
Deploys
Beside a label
On its own

Using Badge

A small count (variant="count") or dot (variant="dot") that flags status or new items. Its label is announced, never shown.

A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.

When to use

For a small count or dot on something else: unread messages, a new item.

A status in words? Tag.

Accessibility

Every badge needs a label, which screen readers hear in place of the dot or number.

Props

import { Badge } from '@idyeah/diya'Stable since 1.0.0

labelRequiredstring

Accessible name, never shown: what the dot means, or what is counted, read after the number ("3 unread messages"). For visible text, use Tag.

variantRequired"count" | "dot"

Required, so a Badge never guesses: 'count' shows count as a number; 'dot' is a small dot with no text.

countnumber

Whole number shown by a 'count' badge; a count of 0 hides the badge unless showZero is set.

Default 0

maxnumber

Highest number shown; larger counts show as '{max}+', such as '99+', while the accessible name keeps the real count. Defaults to 99.

Default 99

showZeroboolean

Keeps a 'count' badge visible at 0.

Default false

size"small" | "medium" | "large"

Badge size. Defaults to 'medium'.

Default 'medium'

toneTone

Color meaning; see Tone. 'brand' follows the provider's brand color. Defaults to 'neutral'.

Default 'neutral'

Also takes every native <span> attribute, such as id, aria-* or data-*.