npm install @idyeah/diya
GitHub
Appearance
Color scheme

Tabs

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.

Type
Size
Icon
Badge
State
  • Scope approvedGoals and ownership are agreed.
  • Design reviewReview the direction with the team.
  • Ready for handoffConfirm the implementation checklist.

Project file

  • Design reviewConfirm scope, content, and accessibility.
  • HandoffAgree ownership and the next milestone.

Using Tabs

Tabs that switch between panels in place, with arrow-key navigation. The ref, className, style and other attributes go to the outer element.

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

When to use

For switching between related views of the same thing without leaving the page.

Steps in order? Wizard. Separate pages? Side Navigation or links.

Accessibility

Follows the ARIA tabs pattern: one Tab stop for the list, arrow keys move between tabs, and each panel is labeled by its tab.

Props

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

itemsRequiredTabItem[]

The tabs, in order.

labelRequiredstring

Accessible name for the tab list; not shown.

onValueChangeRequired(value: string) => void

Called with a tab's value when it is clicked or reached with the arrow, Home or End keys.

valueRequiredstring

value of the selected tab; falls back to the first enabled tab.

disabledboolean

Disables every tab.

Default false

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

Tab height and text size. Defaults to 'medium'.

Default 'medium'

variant"underline" | "pill"

'underline' marks the selected tab with a line; 'pill' fills it. Defaults to 'underline'.

Default 'underline'

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