npm install @idyeah/diya
GitHub
Appearance
Color scheme

Tooltip

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.

Position

Using Tooltip

A short hint in a bubble beside its trigger: your own child element, or the tooltip's button when label is set. The ref reaches the trigger.

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

When to use

For a short, optional hint about a control, like what an icon button does.

Anything people must read, or anything interactive? Put it on the page, or use Popover.

Accessibility

Shown on hover and on keyboard focus, dismissed with Escape, and tied to its trigger with aria-describedby.

Props

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

childrenRequiredReactNode

With label, noninteractive content for the tooltip's own button, such as an icon. Without it, your single trigger element, such as <Button iconOnly aria-label="Delete">, which gets the hover, focus and description wiring.

contentRequiredstring

Visible text in the bubble: shown after a mouse rests on the trigger for 300ms, and at once on keyboard focus, a tap or with motion="off"; also read as the trigger's description.

labelstring

Accessible name for the tooltip's own trigger button, not shown, such as 'Billing help'. Leave it out when the child is your own trigger.

placement"top" | "bottom" | "left" | "right"

Preferred side for the bubble; it moves to stay on screen. Defaults to 'top'.

Default 'top'

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