npm install @idyeah/diya
GitHub
Appearance
Color scheme

Select

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.

Size
Options
State

Choose the team this project belongs to.

Using Select

A labeled native dropdown for choosing one option; pair value with onValueChange.

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

When to use

For one choice from a list of about five to fifteen known options.

Two to four options? Choice shows them all at once. A long list people search? Combobox.

Accessibility

A native select, so every platform’s own keyboard and screen reader support comes with it.

Props

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

labelRequiredstring

Visible label above the select; also its accessible name. Hide it with hideLabel.

optionsRequiredSelectOption[]

The choices, in display order.

defaultValuestring

The initially chosen value when uncontrolled; defaults to '' (the placeholder), and a form reset returns to it.

errorstring

Visible error message below the select; marks the field invalid while set.

helperTextstring

Visible hint below the select, announced with it; error replaces it while set.

hideLabelboolean

Hides the label visually but keeps it as the select's accessible name.

Default false

leadingIconReactNode

Decorative icon inside the select's start edge; hidden from assistive tech.

onValueChange(value: string) => void

Called with the chosen option's value, like every other DIYA field. The native onChange still works.

placeholderstring

Visible text of the empty, unselectable first option, shown while value is ''; defaults to the select.placeholder message.

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

Control height and type size; defaults to 'medium'.

Default 'medium'

valuestring

The chosen option's value, or '' for none, when controlled; pair it with onValueChange.

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