0
Documentation

Theming

Configure color tokens, surface rules, and layout setup in taut ui.

Theme System

taut ui uses the official shadcn OKLCH color tokens with Tailwind CSS v4 variables for light (:root) and dark (.dark) themes:

  • Light mode (:root): Clean oklch(1 0 0) white surfaces paired with neutral OKLCH borders and foregrounds.
  • Dark mode (.dark): Deep neutral OKLCH surfaces (oklch(0.145 0 0)) with subtle translucent white borders (oklch(1 0 0 / 10%)) and elevated card and popover surfaces (oklch(0.205 0 0)).

All component animations are self-contained inside each component using inline CSS linear() spring curves. This covers popup entrances, accordion height transitions, and corner morphing.

Global Stylesheet

Copy the following configuration into your app/globals.css:

app/globals.css

Surface Rules

  • Floating overlays (Dialog, Popover, Menu, SelectPopup, PreviewCard): Use opaque bg-popover text-popover-foreground border border-border shadow-lg so background content never bleeds through.
  • Containers (Card, Accordion, Fieldset): Use bg-card text-card-foreground border border-border.
  • Form fields (Input, Textarea, SelectTrigger, Autocomplete, NumberField): Use crisp 1px inset borders (shadow-[inset_0_0_0_1px_var(--color-input)]) that snap immediately to a 2px primary ring on focus and a 2px destructive ring on invalid state.

Stacking Context & Overlays

Because portaled Base UI overlays (Dialog, Popover, Select, Menu, Toast) render outside your main DOM tree, add relative to <body> and isolate to your root application wrapper in app/layout.tsx:

app/layout.tsx

© taut ui — built with Base UI and Tailwind CSS v4.