# @quietbuildlab/ui — Full API Reference > Themed shadcn/ui component library. Ships six ready-made themes (Manuscript, Midnight, > Slate, Sunset, Ocean, Mono), each light + dark, and 31 components on Radix UI + Tailwind v4. > Pick a theme with one CSS import or switch at runtime via `data-theme`. Re-themable further > via CSS variable overrides. --- ## Install ```bash npm install @quietbuildlab/ui ``` Requires Tailwind CSS v4 and React 18 or 19. In the consumer app's main CSS file, pick ONE of these three setups. ### A) Single preset (most common) ```css @import "tailwindcss"; @import "@quietbuildlab/ui/themes/midnight.css"; /* manuscript | midnight | slate | sunset | ocean | mono */ @source "../node_modules/@quietbuildlab/ui/dist"; ``` ### B) Backward-compat (Manuscript only) ```css @import "tailwindcss"; @import "@quietbuildlab/ui/theme.css"; @source "../node_modules/@quietbuildlab/ui/dist"; ``` ### C) Runtime theme switching ```css @import "tailwindcss"; @import "@quietbuildlab/ui/themes.css"; @source "../node_modules/@quietbuildlab/ui/dist"; ``` Then set the theme on ``: ```ts document.documentElement.dataset.theme = "ocean" // any preset name ``` Default if no `data-theme` is set: Manuscript. Order matters in all setups: tailwind first, then theme/themes CSS, then @source so Tailwind scans the package's built JS for utility classes. ## Themes shipped | Theme | Vibe | Accent | Radius | Type | |---|---|---|---|---| | Manuscript | Warm paper, editorial | Forest green | 4px | Lora + Inter | | Midnight | Cool, focused | Indigo | 6px | Inter | | Slate | Neutral, corporate | Slate-blue | 4px | Inter | | Sunset | Warm, friendly | Coral | 10px | Inter | | Ocean | Calm SaaS | Teal | 6px | Inter | | Mono | Brutalist B/W | Black/white | 0px | Inter + mono | ## Importing All components are named exports from the package root: ```tsx import { Button, Card, CardHeader, Dialog, DialogTrigger, DialogContent, Sheet, SheetTrigger, SheetContent, AlertDialog, AlertDialogTrigger, AlertDialogContent, } from '@quietbuildlab/ui' ``` Do NOT deep-import (no `from '@quietbuildlab/ui/dist/...'`). ## Dark mode Toggle a `dark` class on ``: ```ts document.documentElement.classList.toggle('dark', isDark) ``` In runtime-switching mode, typically toggle both: ```ts document.documentElement.dataset.theme = "midnight" document.documentElement.classList.toggle('dark', isDark) ``` The library does NOT ship a theme-provider — apps own the toggle. ## Theming Override CSS variables AFTER the preset import: ```css :root { --primary: oklch(0.40 0.10 250); --ring: oklch(0.40 0.10 250); --radius: 0.5rem; } .dark { --primary: oklch(0.65 0.10 250); --ring: oklch(0.65 0.10 250); } ``` Token groups: surfaces (background, foreground, card, popover), accent (primary, ring), quiet UI (secondary, muted, accent), form (border, input), status (destructive), shape (radius), type (font-sans, font-serif), plus chart-1..5 and sidebar-*. --- ## Group: Foundations ### Button Clickable action element. Built on a native ` // Destructive with size // Polymorphic — renders as with button styling // Icon-only ``` ### Badge Small inline label for status, categories, or counts. ```tsx interface BadgeProps extends React.ComponentProps<"span"> { variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" asChild?: boolean } ``` ```tsx import { Badge } from '@quietbuildlab/ui' New Error Draft ``` ### Input Single-line text input. Accepts all standard `` props. ```tsx // Props: React.ComponentProps<"input"> — all native input attributes pass through ``` ```tsx import { Input, Label } from '@quietbuildlab/ui'
``` ### Textarea Multi-line text input. Accepts all standard `