npm install @idyeah/diya
GitHub
Appearance
Color scheme

Alert

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
Status
Options
info:

A new version is available

Update when you’re ready to get the latest improvements.

Details

  • OwnerAlex Morgan
  • ChangesProject details are up to date.
  • Next milestoneReview the launch checklist with the team.

Using Alert

An inline message that reports a status, with an optional action and close button.

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

When to use

For a message about the page or a task: saved, needs attention, failed. For the same message floated and temporary, call toast() from the code that did the work.

Something that needs a decision before going on? Dialog.

Accessibility

An urgent alert is announced at once (role="alert"); others politely. The tone is said in words, not just shown in color.

Props

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

childrenRequiredReactNode

Visible message.

action{ label: string; onClick: () => void; }

One visible button after the message; label is its text.

layout"card" | "banner"

'card' is a contained box; 'banner' is a full-width strip with its content in one row. Defaults to 'card'.

Default 'card'

onDismiss() => void

When given, shows a close button that calls it.

titlestring

Visible bold first line.

toneAlertTone

'info' for information, 'success' done, 'warning' needs care, 'error' failed, 'brand' the provider's brand color; sets the icon and color and is announced before the message. Defaults to 'info'.

Default 'info'

urgentboolean

Announces immediately as role="alert", interrupting a screen reader; otherwise it is a polite status. Use for errors that need action.

Default false

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