Skip to content

Foundation

Khaeli's tokens and base layer: the Tailwind v4 @theme inline mapping, light and dark palettes (Underlay by default), the type scale, the 30px control height, the Kargul radius ladder, motion durations and eases, and the [data-slot] rules that restyle every registry primitive. A product swaps the brand through the --primary family, --tint-* and --chart-*.

The first item a product installs. It sets the colour tokens for light and dark, the type roles, the radius ladder, the shadows, the motion clock and the 30px control, and styles Registry components through their data-slot. The examples here use only the Tailwind utilities it defines, so each one pastes into a product that has nothing but foundation. Every value, with its token, is on the Colours, Radius, Shadows and Spacing and sizing pages under Foundations. A product changes the primary family, the tints, the chart series and the font families, and nothing else.

Palette

Surfaces
  • --background
  • --card
  • --secondary
  • --muted
  • --border
  • --input
Text
  • --foreground
  • --muted-foreground
  • --subtle-foreground
Primary
  • --primary
  • --primary-hover
  • --primary-subtle
  • --link
Status
  • --positive
  • --warning
  • --destructive
  • --positive-subtle
  • --info-subtle
  • --warning-subtle
  • --destructive-subtle
Tints
  • --tint-mint
  • --tint-peach
  • --tint-sky
  • --tint-blue
  • --tint-pink
  • --tint-lavender

Type roles

Displaytext-2xl
The notes go out on Wednesday
Headingtext-xl
The notes go out on Wednesday
Titletext-lg
The notes go out on Wednesday
Bodytext-base
The notes go out on Wednesday
Footnotetext-sm
The notes go out on Wednesday
Captiontext-xs
The notes go out on Wednesday
Microtext-2xs
The notes go out on Wednesday

Radius and controls

  • rounded-smallBadges, keycaps
  • rounded-mdRows
  • rounded-controlControls
  • rounded-cardCards, menus
  • rounded-trayTrays, dialogs
  • rounded-fullChips, avatars

A control is 30px tall: h-7.5 with rounded-control, on shadow-cta when filled and shadow-control when not.

Motion

  • --duration-fast
  • --duration-standard
  • --duration-considered

Installation

npx shadcn@latest add @khaeli/foundation

Install once per app before any component. Re-adding it resets the palette in your globals.css, so apply your Design Bundle's palette after it.

Installs with

npm packages
  • @fontsource-variable/geist-mono ^5.3.0
  • @fontsource-variable/inter ^5.3.0
  • tw-animate-css ^1.4.0

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/foundation.json