npm install @idyeah/diya
GitHub
Appearance
Color scheme

Calendar

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
Options
State
Pick a day
December 2026
SuMoTuWeThFrSa

Using Calendar

A labeled month calendar that stays on the page; picks one ISO date, or a start and end date with range.

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

When to use

For a screen where picking the day is the main job: booking a time, or choosing the day an agenda shows. The month stays on the page.

A date inside a form? Date Picker keeps it to one field.

Accessibility

An ARIA date grid named by its month, with one Tab stop: arrow keys move by day and week, Page Up/Down by month, Home/End to the week’s ends. Chosen days are announced as selected and today as the current date; unavailable days are announced and can’t be chosen.

Props

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

labelRequiredstring

Visible label above the calendar; also names it for assistive tech. Hide it with hideLabel.

disabledboolean

Dims the calendar and stops every day and month button.

Default false

hideLabelboolean

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

Default false

isDateUnavailable(date: string) => boolean

Called with each ISO YYYY-MM-DD day on show; return true to mark the day unavailable (announced, and it can't be chosen), as with min and max.

maxstring

Latest date that can be chosen, as ISO YYYY-MM-DD; later days show as unavailable.

minstring

Earliest date that can be chosen, as ISO YYYY-MM-DD; earlier days show as unavailable.

monthstring

The month on show as ISO YYYY-MM, when controlled; pair it with onMonthChange. Left out, the calendar starts on the chosen date's month, or today's.

onMonthChange(month: string) => void

Called with the ISO YYYY-MM month to show: from the month buttons, from the keyboard moving into another month, or when value changes to a date in another month.

rangeboolean

Single-date mode (the default): leave unset or false. Range mode: the first click sets the start, the second the end (swapped if earlier); the next click starts a new range.

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

Day height and type size, matching fields of the same size; defaults to 'medium'.

Default 'medium'

When range={false} (the default)

defaultValuestring

The initially chosen ISO date when uncontrolled.

onValueChange(value: string) => void

Called with the chosen ISO YYYY-MM-DD date.

valuestring

The chosen date as ISO YYYY-MM-DD, or '' for none, when controlled; pair it with onValueChange.

When range={true}

defaultValueDateRange

The initially chosen range when uncontrolled.

onValueChange(value: DateRange) => void

Called with the new range after each click; end is '' until the second date is chosen.

valueDateRange

The chosen range as ISO YYYY-MM-DD dates, a bound '' while unset, when controlled; pair it with onValueChange.

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