# Introduction
> Gaudi is a curated React design system for blogs and applications, with shared foundations, rich components and reusable interface patterns.
Gaudi brings reusable React components, design foundations and practical interface patterns into one coherent system. It began with a blog and grew to support application interfaces: forms, data views, navigation, dialogs, dashboards and complete workflows, alongside rich editorial and MDX experiences.
The package is `@gaudi/design-system`; the source lives at [ahmadassaf/design-system](https://github.com/ahmadassaf/design-system).
## How this site is built
Every component, block, chart, chat and hook page is **generated from the design system's own metadata** (its `ai/components.json`, the pattern coverage manifest and the owner fixtures), so the docs cannot drift from the code. Each example renders the real fixture in an isolated frame, and its **Code** tab shows the same copyable source as Storybook, rewritten to public `@gaudi/design-system/...` imports.
- [Installation](https://design.gaudi.site/docs/getting-started): Add the package, the stylesheet and the Next.js config.
- [Foundations](https://design.gaudi.site/docs/foundations): Colours and tokens, typography, icons, accessibility and states.
- [Theming](https://design.gaudi.site/docs/theming): Eight presets, the theme contract and StyleGlide/tweakcn/shadcn import.
- [AI & agents](https://design.gaudi.site/docs/ai): llms.txt, the agent skill, the MCP server and the registry.
- [Components](https://design.gaudi.site/docs/components): Controls, inputs, overlays, data display, feedback and navigation.
- [Blocks](https://design.gaudi.site/docs/blocks): App shells, auth, dashboards, forms, scheduling, settings and more.
## What belongs in Gaudi
- **Foundations:** shared tokens, typography, colours, icons, motion and accessibility conventions.
- **Components:** reusable controls and compositions, with variants and interaction states for real product use.
- **Patterns and blocks:** application shells, settings, onboarding, collections and editorial page sections.
- **Publishing:** post components, reading layouts and MDX primitives for blogs and other content experiences.
Source: https://design.gaudi.site/docs (Markdown with example code: https://design.gaudi.site/docs.md)
---
# Installation
> Install @gaudi/design-system and render your first component.
## Install the package
Install the package from its GitHub repository, then import it as `@gaudi/design-system`.
```sh
pnpm add github:ahmadassaf/design-system
```
React, React DOM, Next.js, `next-themes` and Tailwind CSS are shared framework **peers**; Gaudi installs its own implementation libraries. Install the optional peers only for the features that need them:
```sh
pnpm add recharts # Charts (@gaudi/design-system/charts)
pnpm add @xyflow/react # Flow (@gaudi/design-system/core/Flow + flow.css)
```
## Use a component
```jsx
import { Avatar, Button, Dialog } from '@gaudi/design-system';
import '@gaudi/design-system/global.css';
```
For route-level code that imports one or two components, prefer **leaf entries** so bundlers do not traverse the full barrel:
```jsx
import Button from '@gaudi/design-system/core/Button';
import Dialog from '@gaudi/design-system/core/Dialog';
```
Only the explicit entries in the package `exports` are public: owner paths such as `/core/Button`, `/chat/ChatInput` and `/hooks/state/use-controllable-state`.
## Next steps
- [Set up with Next.js](https://design.gaudi.site/docs/getting-started/nextjs): transpilePackages, the stylesheet and the theme script.
- [Tailwind preset](https://design.gaudi.site/docs/getting-started/tailwind): Use Gaudi's tokens in your own utilities.
- [styles.css](https://design.gaudi.site/docs/getting-started/styles): global.css versus styles.css, themes.css and flow.css.
- [Fonts](https://design.gaudi.site/docs/getting-started/fonts): Gaudi never downloads fonts; wire next/font or @fontsource.
Source: https://design.gaudi.site/docs/getting-started (Markdown with example code: https://design.gaudi.site/docs/getting-started.md)
---
# Setup with Next.js
> Configure the App Router for Gaudi's React source, stylesheet and themes.
Gaudi ships **React source (JSX)** for a JSX-aware bundler and Tailwind CSS v4 processing, so Next.js must transpile it.
## 1. Transpile the package
```js title="next.config.mjs"
export default {
transpilePackages: ['@gaudi/design-system']
};
```
## 2. Load the stylesheet once
```jsx title="app/layout.jsx"
import '@gaudi/design-system/global.css';
```
`global.css` loads Tailwind v4, Gaudi's tokens, foundations and component CSS, and scans the package source. If your app owns its Tailwind entry, use [styles.css](https://design.gaudi.site/docs/getting-started/styles) instead.
## 3. Add themes (optional)
Render the no-flash script in `
` and wrap the app in `ThemeProvider` from a client component:
```jsx title="app/layout.jsx"
import { getThemeScript } from '@gaudi/design-system/themes';
import { Providers } from './providers';
export default function RootLayout({ children }) {
return (
{children}
);
}
```
```jsx title="app/providers.jsx"
'use client';
import { ThemeProvider } from '@gaudi/design-system/themes';
export const Providers = ({ children }) => {children};
```
Apps that keep `next-themes` for light/dark pass `enableMode={false}` to `ThemeProvider` and `getThemeScript`. See the [theming guide](https://design.gaudi.site/docs/theming/guide).
## Site configuration
Site-aware components (navigation, footer, command launcher) read metadata from `SiteConfigProvider`; `LayoutContainer` wires it up. Gaudi never imports data from the consuming app.
```jsx
import { SiteConfigProvider } from '@gaudi/design-system/context';
```
> **Note:** This documentation site is itself a Next.js App Router app built this way: Gaudi's ThemeProvider, AppShell, Tabs, CodeBlock, Command and Button render its chrome.
Source: https://design.gaudi.site/docs/getting-started/nextjs (Markdown with example code: https://design.gaudi.site/docs/getting-started/nextjs.md)
---
# Tailwind preset
> Use Gaudi's colours, radii, typography and prose theme in your own Tailwind utilities.
Tailwind v4 loads Gaudi's configuration through `global.css`, so most apps need nothing else. For a JavaScript config, use the preset and the two plugins from the package:
```js title="tailwind.config.js"
const designSystemPreset = require('@gaudi/design-system/tailwind-preset');
const addVariablesColors = require('@gaudi/design-system/tailwind/addVariablesColors');
const tailwindGrid = require('@gaudi/design-system/tailwind/tailwindGrid');
module.exports = {
content: [
'./app/**/*.{js,jsx,ts,tsx,mdx}',
'./node_modules/@gaudi/design-system/src/**/*.{js,jsx,mdx}'
],
plugins: [addVariablesColors, tailwindGrid],
presets: [designSystemPreset]
};
```
With a CSS-first Tailwind v4 entry, point `@config` at the package config and add the package source:
```css title="app/globals.css"
@import 'tailwindcss';
@custom-variant dark (&:where(.dark, .dark *));
@config '../node_modules/@gaudi/design-system/src/tailwind/config.js';
@source '../node_modules/@gaudi/design-system/src';
@import '@gaudi/design-system/styles.css';
```
Use the **semantic utilities** (`bg-surface`, `text-text-muted`, `border-border`, `bg-accent`, `text-danger`…) built from the token names, never raw hex or palette shades for UI state. See [Colours & tokens](https://design.gaudi.site/docs/foundations/colours).
Source: https://design.gaudi.site/docs/getting-started/tailwind (Markdown with example code: https://design.gaudi.site/docs/getting-started/tailwind.md)
---
# styles.css
> Which stylesheet to import, and how corner radius and density are configured.
| Import | When |
| --- | --- |
| `@gaudi/design-system/global.css` | Apps without their own Tailwind entry: loads Tailwind v4, Gaudi tokens, foundations and component CSS, and scans the package source. |
| `@gaudi/design-system/styles.css` | Apps that own their Tailwind entry: import after `@import "tailwindcss";` and add `@source` for the package. |
| `@gaudi/design-system/themes.css` | Every theme preset, switched with `data-theme` (optional when you use `ThemeProvider`). |
| `@gaudi/design-system/flow.css` | Only with the Flow component. |
`src/styles.css` aggregates shared foundations and owner-local component styles; `src/global.css` adds Tailwind and application body defaults. CSS token definitions are authoritative; `tokens.json` is the JavaScript/preset projection.
## Corner radius
Elements use a soft 4px radius. Set `--ds-radius` on the root after importing the stylesheet to change every corner without rebuilding CSS:
```css
:root {
--ds-radius: 4px; /* 0px for square corners */
}
```
## Density
Inner padding, gaps and control heights scale with `--ds-space-scale` (default `1`):
```css
:root {
--ds-space-scale: 0.875; /* compact */
}
```
Density: Inner padding, gaps and control heights scale with --ds-space-scale (default 1). Prefer gap-* over space-x/y-*. Component CSS uses calc(var(--ds-space-scale, 1) * ).
| Scale | `--ds-space-scale` |
| --- | --- |
| tight | 0.75 |
| compact | 0.875 |
| default | 1 |
| relaxed | 1.25 |
| spacious | 1.5 |
Radius: All corners use --ds-radius (configurable down to 0px). Circles only for intrinsic shapes. Default `4px` via `--ds-radius`.
Source: https://design.gaudi.site/docs/getting-started/styles (Markdown with example code: https://design.gaudi.site/docs/getting-started/styles.md)
---
# Fonts
> Gaudi never downloads fonts; load them with next/font or @fontsource and put them first in the stack.
Theme font stacks name an open-source family first and fall back to system faces. `@fontsource/` registers the real family name, so the stack picks it up automatically.
`next/font` generates its own family name: expose it as a CSS variable and put it first in the theme's stack, as the default theme does with `--font-space-inter`.
```jsx title="app/layout.jsx"
import { Fraunces, Source_Sans_3 } from 'next/font/google';
const serif = Fraunces({ subsets: ['latin'], variable: '--font-fraunces' });
const sans = Source_Sans_3({ subsets: ['latin'], variable: '--font-source-sans' });
//
```
```css title="app/globals.css"
/* after the Gaudi stylesheets */
[data-theme='folio'] {
--ds-font-sans: var(--font-source-sans), ui-sans-serif, system-ui, sans-serif;
--ds-font-heading: var(--font-fraunces), ui-serif, Georgia, serif;
}
```
Curated pairs are exported as `FONT_PAIRS` from `@gaudi/design-system/themes`. See [Typography](https://design.gaudi.site/docs/foundations/typography) for the default stacks.
Source: https://design.gaudi.site/docs/getting-started/fonts (Markdown with example code: https://design.gaudi.site/docs/getting-started/fonts.md)
---
# Foundations
> Tokens, typography, icons, motion, accessibility and state conventions shared by every Gaudi owner.
Gaudi preserves a clear hierarchy, compact controls, neutral surfaces, restrained elevation and functional blue accents. Article reading stays comfortable and application layouts stay efficient, in both light and dark themes.
- [Colours & tokens](https://design.gaudi.site/docs/foundations/colours): Semantic colour tokens, charts, radius, density and motion.
- [Typography](https://design.gaudi.site/docs/foundations/typography): Font stacks, the type scale and prose.
- [Icons](https://design.gaudi.site/docs/foundations/icons): The icon registry behind ``.
- [Accessibility](https://design.gaudi.site/docs/foundations/accessibility): Semantics, focus, keyboard, motion, RTL and responsive checks.
- [States](https://design.gaudi.site/docs/foundations/states): Loading, empty, error, disabled and read-only states.
Source: https://design.gaudi.site/docs/foundations (Markdown with example code: https://design.gaudi.site/docs/foundations.md)
---
# Colours & tokens
> The semantic --ds-* contract. Every swatch below reads the live theme, so switch presets or modes to compare.
Runtime CSS (`src/tokens/tokens.css`) is the token authority; `tokens.json` is the supported JavaScript/preset projection exported from `@gaudi/design-system/tokens`.
```js
import tokens from '@gaudi/design-system/tokens';
```
## Colour
Use semantic Tailwind utilities (bg-*, text-*, border-*, ring-*) built from these names, never raw hex or palette shades for UI state. Status colours always pair with text or an icon.
Semantic colour utilities (`bg-*`, `text-*`, `border-*`, CSS variables `--ds-color-*`): `accent`, `accent-dark`, `accent-foreground`, `accent-muted`, `accent-subtle`, `attention`, `attention-border`, `attention-foreground`, `attention-muted`, `attention-subtle`, `background`, `border`, `border-dark`, `border-muted`, `danger`, `danger-border`, `danger-foreground`, `danger-muted`, `danger-subtle`, `dark`, `discovery`, `discovery-border`, `discovery-foreground`, `discovery-muted`, `discovery-subtle`, `foreground`, `info`, `info-border`, `info-foreground`, `info-muted`, `info-subtle`, `success`, `success-border`, `success-foreground`, `success-muted`, `success-subtle`, `surface`, `surface-dark`, `surface-muted`, `surface-raised`, `text`, `text-inverse`, `text-muted`, `text-subtle`, `ui-accent`, `ui-accent-foreground`, `ui-attention-ink`, `ui-background`, `ui-border`, `ui-card`, `ui-card-foreground`, `ui-chart-1`, `ui-chart-2`, `ui-chart-3`, `ui-chart-4`, `ui-chart-5`, `ui-danger-ink`, `ui-destructive`, `ui-destructive-foreground`, `ui-discovery-ink`, `ui-focus`, `ui-focus-foreground`, `ui-focus-ink`, `ui-foreground`, `ui-info-ink`, `ui-input`, `ui-invert`, `ui-invert-foreground`, `ui-muted`, `ui-muted-foreground`, `ui-popover`, `ui-popover-foreground`, `ui-primary`, `ui-primary-foreground`, `ui-primary-strong`, `ui-ring`, `ui-secondary`, `ui-secondary-foreground`, `ui-sidebar`, `ui-sidebar-accent`, `ui-sidebar-accent-foreground`, `ui-sidebar-border`, `ui-sidebar-foreground`, `ui-sidebar-primary`, `ui-sidebar-primary-foreground`, `ui-sidebar-ring`, `ui-success-ink`, `ui-warning-ink`, `warning`, `warning-border`, `warning-foreground`, `warning-muted`, `warning-subtle`.
Never use colour as the only status cue: status colours always pair with text or an icon.
## Radius and density
Density: Inner padding, gaps and control heights scale with --ds-space-scale (default 1). Prefer gap-* over space-x/y-*. Component CSS uses calc(var(--ds-space-scale, 1) * ).
| Scale | `--ds-space-scale` |
| --- | --- |
| tight | 0.75 |
| compact | 0.875 |
| default | 1 |
| relaxed | 1.25 |
| spacious | 1.5 |
Radius: All corners use --ds-radius (configurable down to 0px). Circles only for intrinsic shapes. Default `4px` via `--ds-radius`.
## Motion
Durations and easings respect `prefers-reduced-motion`.
| Token | Value |
| --- | --- |
| duration feedback | `120ms` |
| duration focal | `560ms` |
| duration overlay | `320ms` |
| duration state | `180ms` |
| ease in | `cubic-bezier(0.7, 0, 0.84, 0)` |
| ease out | `cubic-bezier(0.16, 1, 0.3, 1)` |
| ease standard | `cubic-bezier(0.2, 0, 0, 1)` |
Source: https://design.gaudi.site/docs/foundations/colours (Markdown with example code: https://design.gaudi.site/docs/foundations/colours.md)
---
# Typography
> Font stacks, line heights and the prose scale used by articles and docs.
| Family | Stack |
| --- | --- |
| mono | `JetBrains Mono, Menlo, Monaco, monospace` |
| sans | `var(--font-space-inter, 'Inter Variable'), Inter Variable, system-ui, sans-serif` |
| Line height | Value |
| --- | --- |
| body | 1.6 |
| prose | 1.7 |
| tight | 1.15 |
## Prose
Long-form content uses the `.prose` class from Gaudi's typography foundation: comfortable measure, a {'1.7'} line height and heading rhythm tuned for articles. This page is rendered inside `.prose`.
Use `Typography` and `typographyVariants` from the package root for headings, labels and descriptions in application UI, and the [fonts guide](https://design.gaudi.site/docs/getting-started/fonts) to load real families.
Source: https://design.gaudi.site/docs/foundations/typography (Markdown with example code: https://design.gaudi.site/docs/foundations/typography.md)
---
# Icons
> The icon registry behind Icon, plus brand marks and animated icons.
```jsx
import { Icon } from '@gaudi/design-system';
```
Pass `label` when the icon carries meaning and `decorative` otherwise. Sizes: `xs`, `sm`, `md`, `lg`, `xl`, `2xl` or a number. Brand marks are separate entries such as `@gaudi/design-system/icons/brands/github`.
## Registry
456 registry icon names for ``: `Accessibility`, `Activity`, `AlertCircle`, `AlertTriangle`, `AlignCenter`, `AlignLeft`, `AlignRight`, `Apple`, `AppWindow`, `Archive`, `ArrowDown`, `ArrowDownCircle`, `ArrowDownIcon`, `ArrowDownToLine`, `ArrowLeft`, `ArrowLeftFromLine`, `ArrowLeftRight`, `ArrowLeftToLine`, `ArrowLongLeftIcon`, `ArrowLongRightIcon`, `ArrowRight`, `ArrowRightFromLine`, `ArrowRightOnRectangleIcon`, `ArrowRightToLine`, `ArrowUp`, `ArrowUpCircle`, `ArrowUpDown`, `ArrowUpIcon`, `ArrowUpRight`, `ArrowUpToLine`, `AtSign`, `AudioLines`, `Award`, `BadgeCheck`, `Ban`, `Banknote`, `BarChart`, `BarChart2`, `BarChart3`, `Battery`, `Bell`, `BellOff`, `Bluetooth`, `Bold`, `Book`, `Bookmark`, `BookmarkCheck`, `BookOpen`, `BookOpenIcon`, `BookText`, `BookUser`, `Bot`, `Boxes`, `Braces`, `Brain`, `Briefcase`, `BriefcaseBusiness`, `Bug`, `Building`, `Building2`, `Cable`, `Calculator`, `Calendar`, `CalendarCheck`, `CalendarClock`, `CalendarDays`, `CalendarDaysIcon`, `CalendarOutline`, `CalendarRange`, `CalendarSearch`, `CardSim`, `ChartArea`, `ChartBar`, `ChartLine`, `ChartNoAxesColumnDecreasing`, `ChatBubbleLeftRightIcon`, `Check`, `CheckCheck`, `CheckCircle`, `CheckIcon`, `CheckSquare`, `ChessKnight`, `ChevronDown`, `ChevronDownIcon`, `ChevronFirst`, `ChevronLast`, `ChevronLeft`, `ChevronRight`, `ChevronRightIcon`, `ChevronsLeft`, `ChevronsRight`, `ChevronsUpDown`, `ChevronUp`, `Circle`, `CircleAlert`, `CircleCheck`, `CircleDashed`, `CircleDollarSign`, `CircleDot`, `CircleHelp`, `CircleMinus`, `CirclePause`, `CirclePlus`, `CircleUserRound`, `CircleX`, `Clipboard`, `ClipboardList`, `Clock`, `Clock3`, `ClockIcon`, `CloudDownload`, `CloudOff`, `CloudSun`, `CloudUpload`, `Code`, `Code2`, `CodeBracketIcon`, `Codepen`, `Coffee`, `Coins`, `Columns2`, `Columns3`, `Combine`, `Command`, `Compass`, `Copy`, `CopyIcon`, `CornerDownLeft`, `CornerDownRight`, `CornerUpLeft`, `CornerUpRight`, `Cpu`, `CreditCard`, `css`, `Cubes`, `Database`, `Distribution`, `docker`, `DollarSign`, `Download`, `EllipsisVertical`, `EnvelopeIcon`, `ExclamationTriangleIcon`, `ExternalLink`, `ExternalLinkOutline`, `Eye`, `EyeOff`, `FaceIdError`, `file`, `File`, `FileArchive`, `FileCheck`, `FileCode`, `FileImage`, `FileJson`, `FileSearch`, `FileSignature`, `FileSpreadsheet`, `FileText`, `FileType2`, `Filter`, `Fingerprint`, `FingerPrintIcon`, `FingerprintPattern`, `Flag`, `Flame`, `FlaskConical`, `FlipHorizontal`, `FlipVertical`, `folder`, `Folder`, `folder-open`, `FolderGit2`, `FolderOpen`, `FolderPlus`, `Fork`, `Funnel`, `Gaudi`, `Gauge`, `git`, `GitBranch`, `GitCompareArrows`, `GitFork`, `github`, `Github`, `GitMerge`, `GitPullRequest`, `GitPullRequestArrow`, `Globe`, `Google`, `GoogleCloud`, `GraduationCap`, `Grid`, `Grid2x2`, `Grid3X3`, `GripHorizontal`, `GripVertical`, `Hand`, `Handshake`, `HandshakeLine`, `Hash`, `Headphones`, `Heart`, `HeartPulse`, `HelpCircle`, `History`, `Home`, `HomeIcon`, `Hourglass`, `House`, `html`, `IdCard`, `IdentificationIcon`, `Image`, `Inbox`, `IndentDecrease`, `IndentIncrease`, `Info`, `InformationCircleIcon`, `Italic`, `javascript`, `json`, `Kanban`, `Key`, `Keyboard`, `KeyRound`, `KeySquare`, `LandPlot`, `Laptop`, `Layers`, `Layout`, `LayoutDashboard`, `LayoutGrid`, `LayoutTemplate`, `Library`, `LifeBuoy`, `Lightbulb`, `LightBulbIcon`, `LightbulbOff`, `LineChart`, `Link`, `Link2`, `Link2Off`, `linkedin`, `Linkedin`, `LinkIcon`, `LinkSlashIcon`, `List`, `ListChecks`, `ListFilter`, `ListFilterPlus`, `ListMusic`, `ListPlus`, `ListTodo`, `ListTree`, `Loader2`, `LoaderCircle`, `LocateFixed`, `Lock`, `LogOut`, `Magnet`, `MagnifyingGlassIcon`, `mail`, `Mail`, `MailOutline`, `Map`, `MapPin`, `MapPinCheckInside`, `MapPinned`, `markdown`, `Maximize`, `Maximize2`, `medium`, `Medium`, `Megaphone`, `Memory`, `Menu`, `Merge`, `MessageCircle`, `MessageSquare`, `MessageSquareMore`, `MessageSquareReply`, `Mic`, `Microsoft`, `Minimize`, `Minimize2`, `Minus`, `MinusIcon`, `Monitor`, `MonitorSmartphone`, `Moon`, `MoonFill`, `MoreHorizontal`, `MoreVertical`, `MousePointer2`, `Music`, `Network`, `NewspaperIcon`, `node`, `Package`, `Palette`, `PanelLeft`, `PanelLeftClose`, `PanelLeftOpen`, `PanelRightOpen`, `Panels`, `Paperclip`, `Pause`, `PauseCircle`, `Paypal`, `Pencil`, `PencilSparkles`, `PenSquare`, `PenTool`, `Percent`, `Phone`, `PhoneCall`, `PhotoIcon`, `PictureInPicture2`, `PieChart`, `Pin`, `PinOff`, `Pipette`, `Plane`, `Play`, `Plus`, `PlusIcon`, `Podcast`, `Presentation`, `Printer`, `Prisma`, `Puzzle`, `python`, `QrCode`, `Quote`, `Radio`, `RadioTower`, `react`, `Receipt`, `RectangleGroupIcon`, `RectangleStackIcon`, `Redo`, `RefreshCw`, `Repeat`, `Repeat2`, `Reply`, `Robot`, `Rocket`, `RotateCcw`, `RotateCw`, `Route`, `Save`, `Scale`, `Scan`, `ScanSearch`, `Scissors`, `Search`, `SearchCheck`, `Send`, `Server`, `Settings`, `Settings2`, `Share2`, `Shield`, `ShieldAlert`, `ShieldCheck`, `ShieldQuestionMark`, `Ship`, `ShoppingBag`, `ShoppingCart`, `Signal`, `Signpost`, `Siren`, `SkipBack`, `SkipForward`, `SlidersHorizontal`, `Smartphone`, `Smile`, `Sparkles`, `Split`, `Sprout`, `Square`, `Square3Stack3DIcon`, `SquareActivity`, `SquareCheck`, `SquareDashedMousePointer`, `SquarePen`, `SquareTerminal`, `SquareUser`, `Star`, `Store`, `Strikethrough`, `Sun`, `SunFill`, `Table`, `Tablet`, `Tag`, `TagIcon`, `Tags`, `Target`, `Terminal`, `TestTube2`, `ThumbsDown`, `ThumbsUp`, `Timer`, `TowerControl`, `Trash`, `Trash2`, `TrendingDown`, `TrendingUp`, `TriangleAlert`, `Trophy`, `Truck`, `twitter`, `Twitter`, `Type`, `typescript`, `Underline`, `Undo`, `Ungroup`, `Unlink`, `Upload`, `User`, `UserCheck`, `UserGroupIcon`, `UserMinus`, `UserPlus`, `UserRound`, `UserRoundCheck`, `UserRoundCog`, `UserRoundX`, `Users`, `UsersRound`, `Video`, `VideoOff`, `Volume2`, `VolumeOff`, `VolumeX`, `VscFile`, `VscFolder`, `VscFolderOpened`, `Wallet`, `WalletCards`, `Warning`, `Waypoints`, `Webhook`, `Wifi`, `Workflow`, `Wrench`, `X`, `XCircle`, `youtube`, `Youtube`, `Zap`, `ZoomIn`, `ZoomOut`.
Source: https://design.gaudi.site/docs/foundations/icons (Markdown with example code: https://design.gaudi.site/docs/foundations/icons.md)
---
# Accessibility
> The accessibility, keyboard, motion, RTL and responsive conventions every owner follows.
Each component page lists its own accessibility contract under **Accessibility**. These conventions apply across the system.
## Semantics and names
- Use semantic elements, visible labels, associated errors and meaningful accessible names.
- Name every navigation and complementary region; keep a skip link and a main landmark in app shells.
- Never use colour as the only status cue; pair status colours with text or an icon.
## Keyboard and focus
- Every interaction is keyboard reachable, with a visible focus ring from the `focus` token.
- Shortcuts respect editable fields and IME composition (see [useHotkey](https://design.gaudi.site/docs/hooks/use-hotkey)).
- Overlays trap focus and return it to a surviving, meaningful target when they close.
- Keys and DOM identity stay stable through selection, filtering and responsive changes, preserving focus and scroll position.
## Motion
Animations respect `prefers-reduced-motion` and forced colours ([usePrefersReducedMotion](https://design.gaudi.site/docs/hooks/use-prefers-reduced-motion)). Initial docs loads never steal focus or scroll the page.
## Right-to-left
Components use logical properties (`inline-start`, `inline-end`), so they mirror under `dir='rtl'`. Wrap RTL regions in `DirectionProvider` so Radix-based parts follow:
```jsx
import { DirectionProvider } from '@gaudi/design-system/core/Direction';
{controls}
```
Every example on this site has an **RTL** toggle in its toolbar.
## Responsive checks
Build for narrow containers as well as wide pages: let labels and actions wrap, keep full-width elements aligned, and contain deliberately scrollable charts, tables and boards within their own regions. Verify narrow phones, common phones, tablets, laptops and wide desktops (for example 320–360, 390, 768, 1280 and 1600px) in light and dark. Every example here has phone/tablet/desktop width toggles.
## Contrast
Every theme preset passes WCAG AA pairs in both modes (`checkContrast`); the `contrast` preset goes further with 7:1 body text. See the [theming guide](https://design.gaudi.site/docs/theming/guide#contrast).
Source: https://design.gaudi.site/docs/foundations/accessibility (Markdown with example code: https://design.gaudi.site/docs/foundations/accessibility.md)
---
# States & recovery
> Loading, empty, error, disabled and read-only states, and how components recover.
Interactive owners document their states alongside their examples. Shared conventions:
- **Loading:** compose Core [Skeleton](https://design.gaudi.site/docs/components/skeleton) and [Loader](https://design.gaudi.site/docs/components/loader); placeholder layouts are decorative and hidden from assistive technology.
- **Empty:** use [EmptyState](https://design.gaudi.site/docs/components/empty-state) with a clear next action.
- **Errors:** associate messages with their field ([Field](https://design.gaudi.site/docs/components/field)); use [Banner](https://design.gaudi.site/docs/components/banner) and [Toast](https://design.gaudi.site/docs/components/toast) for page-level feedback.
- **Disabled and read-only:** respect changes immediately, keep read-only values focusable and copyable.
- **Controlled values stay authoritative:** compose host callbacks and honour cancellation where the contract allows it.
- **Async work:** clean up listeners, timers and pending work, and prevent stale results from affecting a different request or an unmounted view.
Gaudi owns presentation, semantics, keyboard/focus behaviour and local interaction state. Applications own business rules, permissions, persistence and service requests; mocked uploads, messages and saves in examples never connect to real services.
Source: https://design.gaudi.site/docs/foundations/states (Markdown with example code: https://design.gaudi.site/docs/foundations/states.md)
---
# Theming
> One semantic contract, eight WCAG AA presets, a runtime provider and lossless import/export.
A theme overrides the semantic `--ds-*` contract (surfaces, text, borders, accent, focus, status, charts, sidebar and shadows for light and dark, plus fonts, radius and density). Every other token derives from it, so components need no theme-specific code.
```jsx
// Static: every preset, switched by an attribute
import '@gaudi/design-system/themes.css';
//
// Next.js App Router: no-flash script in app/layout.jsx, provider in a client component
import { getThemeScript, ThemeProvider, useTheme } from '@gaudi/design-system/themes';
//
// {children}
// const { theme, setTheme, mode, setMode } = useTheme();
```
## Presets
Try them live: each card is a nested `data-theme` scope; **Use** applies the preset to the whole site (the header picker does the same).
Theme presets: `contrast`, `ember`, `folio`, `gaudi`, `graphite`, `grove`, `midnight`, `pastel`.
**Bring any [StyleGlide](https://www.styleglide.ai/themes), [tweakcn](https://tweakcn.com) or [shadcn/ui](https://ui.shadcn.com/themes) theme:** the contract follows the shadcn CSS-variable convention, so their themes import as-is on the [Themes page](https://design.gaudi.site/themes), with `gaudi-ds theme import`, or through the `import_theme` MCP tool.
- [Theming guide](https://design.gaudi.site/docs/theming/guide): The full contract, runtime API, fonts, import/export and contrast.
- [Themes page](https://design.gaudi.site/themes): Gallery plus a paste-in importer and exporter.
- [Theme Studio](https://design.gaudi.site/docs/theming/studio): Edit, generate, check and export themes in Storybook.
Source: https://design.gaudi.site/docs/theming (Markdown with example code: https://design.gaudi.site/docs/theming.md)
---
# Theming guide
> The theme contract, runtime API, Next.js setup, fonts, import/export and contrast, rendered from the design system THEMING.md.
> Rendered from [src/tokens/THEMING.md](https://github.com/ahmadassaf/design-system/blob/main/src/tokens/THEMING.md) at build time.
A Gaudi theme overrides a fixed set of semantic `--ds-*` tokens (the **theme contract**) for light and dark. Every other token in `tokens.css` either aliases a contract token or is derived from one, so components never need theme-specific code. Themes are JSON (`themes/theme.schema.json`), compiled to CSS scoped by `[data-theme=""]`, and interchangeable with [shadcn/ui](https://ui.shadcn.com/themes), [tweakcn](https://tweakcn.com) and [StyleGlide](https://www.styleglide.ai/themes) themes. **Bring any StyleGlide, tweakcn or shadcn theme:** paste its CSS into Theme Studio or run `gaudi-ds theme import`, and it applies as-is.
The default theme, `gaudi`, is extracted programmatically from `tokens.css`; applying it changes nothing. Source of truth for the contract: `src/themes/contract.js`.
## Contract (134 values)
Per mode (`light`, `dark`): 58 colours + 6 shadows. Shared: 4 font families, radius and density.
| Group | Tokens (`--ds-color-`) | shadcn equivalent |
| --- | --- | --- |
| Surfaces | `surface`, `surface-muted`, `surface-raised` | background, muted, card/popover |
| Text | `text`, `text-muted`, `text-subtle`, `text-inverse` | foreground, muted-foreground |
| Borders | `border`, `border-muted` | border, input |
| Accent | `accent`, `accent-dark`, `accent-foreground`, `accent-muted`, `accent-subtle` | primary, primary-foreground, secondary, accent |
| Focus | `focus`, `focus-foreground` | ring |
| Status (×6) | `success`, `warning`, `danger`, `discovery`, `info`, `attention`, each with `-foreground`, `-muted`, `-subtle`, `-border` | destructive (+ success/warning/info when present) |
| Charts | `chart-1` … `chart-8` | chart-1 … chart-5 |
| Sidebar | `sidebar`, `sidebar-foreground`, `sidebar-accent`, `sidebar-border` | sidebar-* |
| Shared / per-mode value | Variable | Theme JSON |
| --- | --- | --- |
| Shadows (per mode) | `--ds-shadow-card`, `-card-hover`, `-floating`, `-popover`, `-launcher`, `-table` | `shadows.light`, `shadows.dark` |
| Fonts | `--ds-font-sans`, `--ds-font-serif`, `--ds-font-mono`, `--ds-font-heading` | `fonts` |
| Radius | `--ds-radius` (every corner token follows it) | `radius` |
| Density | `--ds-space-scale` | `spacing` (0.5–2, default 1) |
| Letter-spacing | body `letter-spacing` | `tracking` (optional) |
`focus`, `focus-foreground` and the `sidebar*` tokens default to `discovery`, `discovery-foreground`, `surface-muted`, `text`, `accent-subtle` and `border`; `--ds-font-heading` defaults to the sans stack.
### Derived tokens
- **Aliases** (`--ds-color-table-*`, `--ds-color-mermaid-*`, `--ds-radius-*`, `--radius-*` and the shadcn bridge `--background`, `--primary`, …) are re-declared inside themed scopes, so a nested `data-theme` element (a preview card) resolves them against its own values.
- **Recomputed for non-default themes**: chart cursor/grid/neutrals, sequential and heatmap ramps (from the accent and `chart-3`, with contrast-picked inks), positive/negative (`success`/`danger`), launcher, popover, citation, caption, scrollbar and aurora colours.
- Unchanged: code-block chrome and the diverging chart ramp.
### Contrast
Every preset passes these WCAG AA pairs in both modes (`checkContrast`, `gaudi-ds theme check`): 4.5:1 for `text`/`text-muted`/`text-subtle` on the surfaces, `text` on `accent-subtle`/`accent-muted`/status `-muted`, `surface` on `text`, `accent-foreground` on `accent`/`accent-dark`, `accent` on surfaces, `focus-foreground` on `focus`, each status on the surface and its `-subtle`, each `-foreground` on its status, and the sidebar pairs; 3:1 for `focus` and `chart-1…8` on the surface. Borders are decorative and not checked. The `contrast` preset goes further, with 7:1 body text.
`checkContrast(theme)` returns `{ pass, checked, failures, results }` (each result: `mode`, `fg`, `bg`, `min`, `ratio`, `pass`). The auto-fix, `repairContrast(theme)` (also `importTheme(input, { repair: true })` and `gaudi-ds theme import --fix`), nudges failing pairs by the smallest lightness change (tints first, then foregrounds); `generateTheme` and `randomTheme` run it on their output.
## Presets
`gaudi` (default), `folio` (warm editorial serif), `graphite` (cool minimal mono, square, flat), `contrast` (7:1 text), `pastel` (soft, rounded), `midnight` (dark-first indigo), `grove` (nature), `ember` (vivid orange). JSON in `themes/presets/`, registry items in `public/r/theme-.json`. Regenerate with `pnpm themes:build` (recipes in `scripts/themes/presets.mjs`; `pnpm themes:check` in CI).
## Applying a theme
**Static.** Import `@gaudi/design-system/themes.css` (every preset) and set `data-theme=""` on ``. Dark values apply with `.dark` on the themed element or an ancestor (or on a descendant); `.light` on a themed element opts out of an ancestor's `.dark`.
**Runtime (Next.js app router).**
```jsx
// app/layout.jsx (server component)
import { getThemeScript } from '@gaudi/design-system/themes';
import { Providers } from './providers';
export default function RootLayout({ children }) {
return (
{children}
);
}
// app/providers.jsx
'use client';
import { ThemeProvider } from '@gaudi/design-system/themes';
export const Providers = ({ children }) => {children};
// A settings picker
const { theme, themes, setTheme, mode, setMode, resolvedMode, applyCustomTheme } = useTheme();
```
`ThemeProvider` props: `themes` (default: presets), `defaultTheme` (`'gaudi'`), `defaultMode` (`'system'`), `storageKey` (`'gaudi-theme'`), `storage` (Web Storage-shaped `{ getItem, setItem, removeItem }`, default `localStorageAdapter`; `null` disables persistence), `enableMode` (`true`), `attribute` (`'data-theme'`), `darkClass` (`'dark'`), `nonce`, `onThemeChange(id)`. It injects the active non-default theme's CSS (so `themes.css` is optional) and stores it for `getThemeScript`, which applies `data-theme`, that CSS and `.dark` before first paint. Server and first client renders use the defaults; the stored choice is read after mount.
`useTheme()` returns `{ theme, themes, mode, resolvedMode, setTheme(id), setMode('light' | 'dark' | 'system'), applyCustomTheme(themeJson) }`; outside a provider it returns the defaults with no-op setters.
Apps that already manage light/dark with `next-themes` (Gaudi's `ThemeSwitch`, `Commander` and `LayoutContainer` use it) keep it and pass `enableMode={false}` to `ThemeProvider` and `getThemeScript({ enableMode: false })`.
```jsx
// app/providers.jsx: next-themes owns light/dark, Gaudi owns the theme
'use client';
import { ThemeProvider as ModeProvider } from 'next-themes';
import { ThemeProvider } from '@gaudi/design-system/themes';
export const Providers = ({ children }) => (
{children}
);
// app/layout.jsx:
```
Invalid saved custom themes and theme IDs that are no longer available fall back to `defaultTheme`. The provider reuses the same validation as theme imports.
`applyTheme(themeJson, { document?, nonce?, attribute?, darkClass? })` compiles and injects a theme anywhere (returns `{ css, remove }`). `compileTheme(theme, { attribute?, darkClass? })` returns the CSS string using the same selectors as the provider; `listThemes()` and `getThemePreset(id)` support pickers. A custom dark class controls theme tokens; applications must also configure their CSS dark variants to use that class.
### Fonts
Gaudi never downloads fonts. Theme font stacks name an open-source family first and fall back to system faces. `@fontsource/` registers the real family name, so the stack picks it up automatically. `next/font` (`next/font/google` or `next/font/local`) generates its own family name: expose it as a CSS variable and put it first in the theme's stack, as the default theme does with `--font-space-inter`. Curated pairs: `FONT_PAIRS` in `@gaudi/design-system/themes`.
```jsx
// app/layout.jsx
import { Fraunces, Source_Sans_3 } from 'next/font/google';
const serif = Fraunces({ subsets: ['latin'], variable: '--font-fraunces' });
const sans = Source_Sans_3({ subsets: ['latin'], variable: '--font-source-sans' });
//
```
```css
/* app/globals.css, after the Gaudi stylesheets */
[data-theme='folio'] {
--ds-font-sans: var(--font-source-sans), ui-sans-serif, system-ui, sans-serif;
--ds-font-heading: var(--font-fraunces), ui-serif, Georgia, serif;
}
```
## Import and export
`importTheme(input, { id?, name?, repair? })` accepts shadcn/tweakcn/StyleGlide CSS (`:root`/`.dark`, optionally inside `@layer base`; OKLCH, HSL, bare v3 HSL triplets, hex or rgb; `var()` references are resolved), a shadcn registry item (`cssVars.theme/light/dark`) or Gaudi theme JSON, and returns `{ theme, report, warnings, format }`. Mapped values are kept verbatim; missing tokens are derived (status families from conventional hues, tints from their base, `chart-6…8` by hue rotation, `text-subtle` contrast-solved). `repair: true` nudges failing pairs (tints move first, then foregrounds, by the smallest lightness change).
| shadcn variable | Gaudi token |
| --- | --- |
| `--background` / `--foreground` | `surface` / `text` |
| `--card` (also exported as `--popover`) | `surface-raised` |
| `--muted` / `--muted-foreground` | `surface-muted` / `text-muted` |
| `--primary` / `--primary-foreground` | `accent` / `accent-foreground` |
| `--secondary` | `accent-muted` |
| `--accent` | `accent-subtle` |
| `--destructive` / `--destructive-foreground` | `danger` / `danger-foreground` |
| `--success`, `--warning`, `--info` (+ `-foreground`) | matching status tokens |
| `--border` (also exported as `--input`) | `border` |
| `--ring` | `focus` |
| `--chart-1` … `--chart-5` | `chart-1` … `chart-5` |
| `--sidebar` (or `--sidebar-background`), `--sidebar-foreground`, `--sidebar-accent`, `--sidebar-border` | `sidebar*` |
| `--radius` | `radius` |
| `--font-sans`, `--font-serif`, `--font-mono` | `fonts` (heading = sans) |
| `--shadow-sm`, `-xs`, `-md`, `-lg`, `-xl`, `-2xl` | `card`, `table`, `floating`, `card-hover`, `popover`, `launcher` |
| `--spacing` (rem ÷ 0.25) / `--tracking-normal` | `spacing` / `tracking` |
`*-foreground` variables for card, popover, secondary, accent and sidebar are written by the exporter (as `text` or `sidebar-foreground`) and ignored on import.
`exportTheme(theme, format)`: `json`, `css` (scoped Gaudi CSS), `shadcn` (`:root`/`.dark` + `@theme inline`) or `registry` (a `registry:theme` item with `cssVars`; `meta.gaudiTheme` keeps the lossless Gaudi JSON).
### CLI and MCP
```sh
gaudi-ds theme list
gaudi-ds theme import ./tweakcn.css --id ocean --out themes/ [--fix]
gaudi-ds theme export folio --format shadcn|css|registry|json [--out file]
gaudi-ds theme check ./themes/ocean.json --verbose
gaudi-ds theme generate --brand '#0e7490' --secondary '#f59e0b' --id teal --out themes/
```
MCP tools: `list_themes`, `get_theme`, `import_theme` (returns theme JSON and the contrast report), `export_theme`.
## Generating
`generateTheme({ brand, secondary?, seed?, ... })` turns one or two seed colours into a full OKLCH palette for both modes (accent kept on the brand hue and moved only in lightness until it passes; status roles keep conventional hues; neutrals tinted towards the brand), with fonts, radius and shadows. `randomTheme(seed)` produces a harmonious random theme. Both are deterministic and offline. The Storybook **Theming / Theme Studio** page puts the gallery, editor, generator, contrast report and import/export together.
## Credits
Gaudi does not reinvent theme authoring. The theme contract follows the [shadcn/ui](https://ui.shadcn.com/themes) CSS-variable convention (`--background`, `--primary`, `--chart-1`, …), so any theme made in [StyleGlide](https://www.styleglide.ai/themes), [tweakcn](https://tweakcn.com) or the [shadcn/ui theme editor](https://ui.shadcn.com/themes) can be imported as-is; we encourage designing themes there. Theme Studio is inspired by those tools. No code was copied from them; their names are used only to describe compatibility.
Source: https://design.gaudi.site/docs/theming/guide (Markdown with example code: https://design.gaudi.site/docs/theming/guide.md)
---
# Presets
> gaudi, folio, graphite, contrast, pastel, midnight, grove and ember, each passing WCAG AA in both modes.
| Preset | Character |
| --- | --- |
| `gaudi` | The default, extracted from `tokens.css`; applying it changes nothing. |
| `folio` | Warm editorial serif. |
| `graphite` | Cool minimal mono, square and flat. |
| `contrast` | 7:1 body text. |
| `pastel` | Soft and rounded. |
| `midnight` | Dark-first indigo. |
| `grove` | Nature. |
| `ember` | Vivid orange. |
Theme presets: `contrast`, `ember`, `folio`, `gaudi`, `graphite`, `grove`, `midnight`, `pastel`.
Presets are JSON in `themes/presets/` and shadcn registry items named `theme-`. The CLI lists, checks and exports them:
```sh
gaudi-ds theme list
gaudi-ds theme export folio --format shadcn
```
Source: https://design.gaudi.site/docs/theming/presets (Markdown with example code: https://design.gaudi.site/docs/theming/presets.md)
---
# Theme Studio
> The Storybook page that puts the gallery, editor, generator, contrast report and import/export together.
Theme Studio lives in the design system's Storybook (**Theming / Theme Studio**). It edits every contract token, generates palettes from one or two brand colours (`generateTheme`, `randomTheme`), shows the contrast report and imports or exports themes in every format.
- [Open Theme Studio](https://storybook.gaudi.site/index.html?path=/story/theming-theme-studio--studio): Runs with the design system's Storybook (`pnpm storybook`, port 6006 locally).
- [Import and export here](https://design.gaudi.site/themes): The Themes page offers the importer and exporter without Storybook.
> **Note:** The Storybook URL is configurable with `NEXT_PUBLIC_STORYBOOK_URL` once Storybook is hosted.
Theme Studio is inspired by [StyleGlide](https://www.styleglide.ai/themes), [tweakcn](https://tweakcn.com) and the [shadcn/ui theme editor](https://ui.shadcn.com/themes).
Source: https://design.gaudi.site/docs/theming/studio (Markdown with example code: https://design.gaudi.site/docs/theming/studio.md)
---
# AI & agents
> Machine-readable docs, an agent skill, a local MCP server and a copy-in registry, all generated from the sources of truth.
Gaudi ships everything an agent needs to use it correctly, generated from the same sources as the components (owner docs, READMEs, the story catalogue, the coverage manifest, tokens, the icon registry and the package exports), so it cannot drift.
| Piece | Where | Ships in the npm package |
| --- | --- | --- |
| Metadata | `ai/components.json`, `blocks.json`, `tokens.json`, `icons.json`, `setup.json`, `exports.json` | yes |
| LLM docs | `llms.txt`, `llms-full.txt`, `docs/llm/.md` | `llms*.txt` yes |
| Agent skill | `skills/gaudi-design-system/SKILL.md` | yes |
| CLI / MCP | `bin/gaudi-ds.mjs`, `cli/` | yes |
| Registry | `registry.json`, `public/r/.json` | repository only until hosted |
- [llms.txt](https://design.gaudi.site/docs/ai/llms-txt): The index for language models, also served by this site.
- [Agent skill](https://design.gaudi.site/docs/ai/skill): Install the skill for Claude, Cursor, Codex, Windsurf, VS Code or OpenCode.
- [MCP server](https://design.gaudi.site/docs/ai/mcp): A local stdio server over the shipped metadata.
- [Registry](https://design.gaudi.site/docs/ai/registry): Copy-in blocks and patterns for the shadcn CLI.
This setup is inspired by [reui](https://reui.io) ([agent skills](https://reui.io/docs/agent-skills), [MCP](https://reui.io/docs/mcp), [registry](https://reui.io/docs/registry), [llms.txt](https://reui.io/llms.txt)) and builds on the [llms.txt proposal](https://llmstxt.org), the [shadcn registry spec](https://ui.shadcn.com/docs/registry) and the [Model Context Protocol](https://modelcontextprotocol.io).
Source: https://design.gaudi.site/docs/ai (Markdown with example code: https://design.gaudi.site/docs/ai.md)
---
# llms.txt
> A package summary, setup and an index of every docs page as Markdown, for language models.
`llms.txt` follows the [llms.txt convention](https://llmstxt.org): the design system's summary and setup (install, imports, CSS, preset), then every docs page in sidebar order, each linking to its Markdown version.
- [/llms.txt](https://design.gaudi.site/llms.txt): the index.
- [/llms-full.txt](https://design.gaudi.site/llms-full.txt): every page concatenated (API tables, usage, accessibility and notes; example code stays on each page's own Markdown).
- `/docs/.md`: any page as Markdown, for example [/docs.md](https://design.gaudi.site/docs.md). Requests for a docs URL with `Accept: text/markdown` get the same Markdown.
Every page also has **Copy Markdown** and **Open in ChatGPT / Claude** actions. Links are absolute once `NEXT_PUBLIC_SITE_URL` is set for the docs host.
```sh
curl -s https:///llms.txt
curl -s -H 'Accept: text/markdown' https:///docs/components/button
```
Source: https://design.gaudi.site/docs/ai/llms-txt (Markdown with example code: https://design.gaudi.site/docs/ai/llms-txt.md)
---
# Agent skill
> Install the Gaudi skill into your coding agent's rules or skills folder.
```sh
npx @gaudi/design-system skills install --agent claude # default
npx @gaudi/design-system skills install --agent all --dir ../my-app
npx @gaudi/design-system skills list
```
| Agent | Installed to |
| --- | --- |
| `claude` | `.claude/skills/gaudi-design-system/SKILL.md` and `references/` |
| `cursor` | `.cursor/rules/gaudi-design-system.mdc` (auto-attached for JS/TS/MDX) |
| `codex`, `opencode` | a managed section in `AGENTS.md` |
| `windsurf` | `.windsurf/rules/gaudi-design-system.md` |
| `vscode` | `.github/instructions/gaudi-design-system.instructions.md` |
Re-running is idempotent. Before publishing, run the same commands with `node /path/to/design-system/bin/gaudi-ds.mjs` in place of `npx @gaudi/design-system`.
Source: https://design.gaudi.site/docs/ai/skill (Markdown with example code: https://design.gaudi.site/docs/ai/skill.md)
---
# MCP server
> A local stdio Model Context Protocol server that reads the shipped metadata, with no network access.
Tools: `search`, `list_components`, `get_component`, `get_examples`, `list_blocks`, `get_block`, `get_tokens`, `get_install_command`, `validate_usage`, `get_agent_skill`, `get_project_setup`, plus theme tools `list_themes`, `get_theme`, `import_theme` and `export_theme`; prompt: `build`.
```sh
claude mcp add gaudi-ds -- npx -y @gaudi/design-system mcp
# before publishing (local checkout):
claude mcp add gaudi-ds -- node "/path/to/design-system/bin/gaudi-ds.mjs" mcp
```
Cursor (`.cursor/mcp.json`) and Windsurf:
```json
{ "mcpServers": { "gaudi-ds": { "command": "npx", "args": ["-y", "@gaudi/design-system", "mcp"] } } }
```
VS Code (`.vscode/mcp.json`):
```json
{ "servers": { "gaudi-ds": { "type": "stdio", "command": "npx", "args": ["-y", "@gaudi/design-system", "mcp"] } } }
```
The full client list (Codex, OpenCode) is in the [AI reference](https://design.gaudi.site/docs/ai/reference#mcp-server).
Source: https://design.gaudi.site/docs/ai/mcp (Markdown with example code: https://design.gaudi.site/docs/ai/mcp.md)
---
# Registry
> A shadcn-compatible registry of blocks and patterns whose components stay package imports.
The registry covers the curated examples: page-level **blocks** (`registry:block`: app shells, sidebars, screens, dashboards, forms, scheduling, stat cards, chat) and component **patterns** (`registry:example`). Each item's file is the owner fixture rewritten to public imports, exactly the source shown in every **Code** tab on this site, so it imports from `@gaudi/design-system` instead of copying components.
Add the namespace to `components.json`:
```json
{ "registries": { "@gaudi": "https://design.gaudi.site/r/{name}.json" } }
```
Then add any item by name, or by its full URL:
```sh
npx shadcn@latest add @gaudi/screens-account-settings
npx shadcn@latest add https://design.gaudi.site/r/screens-account-settings.json
```
Install the package first (`pnpm add github:ahmadassaf/design-system`). Some items reference demo assets (`/avatars/…`, `static/images/…`); supply your own. Copied compositions keep the [third-party notice](https://github.com/ahmadassaf/design-system#third-party-notices).
Source: https://design.gaudi.site/docs/ai/registry (Markdown with example code: https://design.gaudi.site/docs/ai/registry.md)
---
# AI reference
> llms.txt, the agent skill installer, the MCP server and the copy-in registry, rendered from the design system README.
> Rendered from the [README "AI & agents" section](https://github.com/ahmadassaf/design-system#ai--agents) at build time.
Gaudi ships machine-readable docs, an agent skill, a local MCP server and a copy-in block registry. All of it is generated from the sources of truth (owner `stories/docs/*.docs.js`, READMEs, the story catalogue, `coverage.json`, `public-names.json`, tokens, the icon registry and `package.json` exports) so it cannot drift from the components.
| Piece | Where | Ships in npm package |
| --- | --- | --- |
| Metadata | `ai/components.json`, `blocks.json`, `tokens.json`, `icons.json`, `setup.json`, `exports.json` | yes |
| LLM docs | `llms.txt` (index), `llms-full.txt` (every page), `docs/llm/.md` (one page per component/hook) | `llms*.txt` yes; `docs/llm` repo only (package excludes `docs/`) |
| Agent skill | `skills/gaudi-design-system/SKILL.md` + generated `references/catalogue.md` | yes |
| CLI / MCP | `bin/gaudi-ds.mjs`, `cli/` | yes |
| Registry | `registry.json`, `public/r/.json` | no (about 5 MB; repo only until hosted) |
This setup is inspired by [reui](https://reui.io): its [agent skills](https://reui.io/docs/agent-skills), [MCP server](https://reui.io/docs/mcp), [registry](https://reui.io/docs/registry) and [llms.txt](https://reui.io/llms.txt). It also builds on the [llms.txt proposal](https://llmstxt.org), the [shadcn registry spec](https://ui.shadcn.com/docs/registry) and the [Model Context Protocol](https://modelcontextprotocol.io) with its official [TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk). See [credits](https://github.com/ahmadassaf/design-system#credits--acknowledgements).
Regenerate after changing components, docs, stories or tokens. `pnpm catalogue:sync` now also runs `pnpm ai:build`; the registry is separate:
```sh
pnpm ai:build # ai/, docs/llm/, llms.txt, llms-full.txt, skill catalogue
pnpm ai:check # fails when any generated file is stale
pnpm registry:build # registry.json + public/r/*.json (--check to verify)
pnpm registry:validate # official shadcn schemas; installs shadcn into node_modules/.cache on first use
pnpm test:ai # search/validate unit tests, skill installer, MCP stdio smoke test
```
## llms.txt
`llms.txt` follows the llms.txt convention: package summary, install/import/CSS/preset setup, then Foundations, components by category (each linking to `docs/llm/.md`), Blocks & patterns, MCP & skills, and Registry. Links are repository-relative until a docs host is chosen. `llms-full.txt` concatenates every page (API table, usage, accessibility, notes, examples and the owner README).
## Agent skill
```sh
npx @gaudi/design-system skills install --agent claude # default
npx @gaudi/design-system skills install --agent all --dir ../my-app
npx @gaudi/design-system skills list
```
| Agent | Installed to |
| --- | --- |
| `claude` | `.claude/skills/gaudi-design-system/SKILL.md` and `references/` |
| `cursor` | `.cursor/rules/gaudi-design-system.mdc` (auto-attached for JS/TS/MDX) |
| `codex`, `opencode` | a managed section in `AGENTS.md` (between `gaudi-design-system:start/end` markers) |
| `windsurf` | `.windsurf/rules/gaudi-design-system.md` (`trigger: model_decision`) |
| `vscode` | `.github/instructions/gaudi-design-system.instructions.md` (Copilot, `applyTo` JS/TS/MDX) |
Re-running is idempotent: unchanged files are reported as such and the AGENTS.md section is replaced in place. Before publishing, run the same commands with `node /path/to/design-system/bin/gaudi-ds.mjs` in place of `npx @gaudi/design-system`.
## MCP server
A local stdio server reads the shipped `ai/` metadata (no network). Tools: `search`, `list_components`, `get_component`, `get_examples`, `list_blocks`, `get_block`, `get_tokens`, `get_install_command`, `validate_usage`, `get_agent_skill`, `get_project_setup`; prompt: `build`.
```sh
claude mcp add gaudi-ds -- npx -y @gaudi/design-system mcp
# before publishing (local checkout):
claude mcp add gaudi-ds -- node "/path/to/design-system/bin/gaudi-ds.mjs" mcp
```
Cursor (`.cursor/mcp.json`) and Windsurf (`~/.codeium/windsurf/mcp_config.json`):
```json
{ "mcpServers": { "gaudi-ds": { "command": "npx", "args": ["-y", "@gaudi/design-system", "mcp"] } } }
```
VS Code (`.vscode/mcp.json`):
```json
{ "servers": { "gaudi-ds": { "type": "stdio", "command": "npx", "args": ["-y", "@gaudi/design-system", "mcp"] } } }
```
Codex (`~/.codex/config.toml`):
```toml
[mcp_servers.gaudi-ds]
command = "npx"
args = ["-y", "@gaudi/design-system", "mcp"]
```
OpenCode (`opencode.json`): `{ "mcp": { "gaudi-ds": { "type": "local", "command": ["npx", "-y", "@gaudi/design-system", "mcp"] } } }`. For any client, `node /path/to/design-system/bin/gaudi-ds.mjs` runs the same server from a repository checkout in place of `npx -y @gaudi/design-system`. `get_block` returns block source when `public/r` exists (a repository checkout); otherwise it returns the install command.
## Registry (blocks & patterns)
`pnpm registry:build` emits a shadcn-compatible registry for the curated examples in `coverage.json`: page-level blocks (`registry:block`: app shells, sidebars, screens, dashboards, forms, scheduling, stat cards, chat) and component patterns (`registry:example`). Each item's file is the owner fixture rewritten by the Storybook `publicSource` helper, so it imports components from `@gaudi/design-system` (declared as a dependency) instead of copying them. `registry.json` is generated; do not edit it by hand, and do not use `shadcn build` (it would copy the fixtures' relative imports).
The registry is served from https://design.gaudi.site/r. Consumers add the namespace to their `components.json`:
```json
{ "registries": { "@gaudi": "https://design.gaudi.site/r/{name}.json" } }
```
```sh
npx shadcn@latest add @gaudi/screens-account-settings
npx shadcn@latest add https://design.gaudi.site/r/screens-account-settings.json
```
Install the package from GitHub first (`pnpm add github:ahmadassaf/design-system`), or build the registry with `GAUDI_PACKAGE_SPEC=github:ahmadassaf/design-system pnpm registry:build` so items declare that spec. Some items reference demo assets (`/avatars/…`, `static/images/…`) listed in their `docs`/`meta.assets`; supply your own. Copied compositions keep the [third-party notice](https://github.com/ahmadassaf/design-system#third-party-notices).
Source: https://design.gaudi.site/docs/ai/reference (Markdown with example code: https://design.gaudi.site/docs/ai/reference.md)
---
# Components
> Controls, inputs, overlays, data display, feedback and navigation primitives.
76 pages · 355 live examples, generated from the design system metadata.
## Layout & Containers
- [Accordion](https://design.gaudi.site/docs/components/accordion): Rich disclosure for FAQs, settings, member directories, nested help, and guided setup. Eleven patterns use Gaudi tokens, icons, avatars, cards, and pills.
- [Carousel](https://design.gaudi.site/docs/components/carousel): Carousel renders standard feature slides and editorial card rails.
- [Direction](https://design.gaudi.site/docs/components/direction): Scopes text direction for Gaudi controls that need directional keyboard and placement behavior.
- [Resizable](https://design.gaudi.site/docs/components/resizable): Resizable panes with accessible separators and bounded panel sizes.
- [ScrollArea](https://design.gaudi.site/docs/components/scroll-area): Contained scrolling with themed scrollbars and optional smooth wheel motion for article reading.
- [Sortable](https://design.gaudi.site/docs/components/sortable): Reorder lists and grids with drag handles, keyboard controls and cancellation.
## Basics
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups. The existing Avatar API and curated patterns share the same image and fallback primitives.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Checkbox](https://design.gaudi.site/docs/components/checkbox): Checkbox renders a token-styled binary control.
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [Icon](https://design.gaudi.site/docs/components/icon): Static and interactive artwork from Gaudi’s centralized icon registry. AnimatedIcon adds opt-in motion with shared size and color tokens, a searchable catalogue, and host-controlled activation.
- [ImageGallery](https://design.gaudi.site/docs/components/image-gallery): A responsive masonry or grid collection with an accessible image viewer. A one-item collection is a full-width, click-to-expand image.
- [Input](https://design.gaudi.site/docs/components/input): Text, search, numeric and date inputs with prefix and suffix slots.
- [Kbd](https://design.gaudi.site/docs/components/kbd): Kbd renders keyboard keys and multi-key shortcuts.
- [Link](https://design.gaudi.site/docs/components/link): Link centralizes navigation semantics for internal, anchor, and external links.
- [Loader](https://design.gaudi.site/docs/components/loader): An accessible loading indicator with arcs, dots, expanding rings, and an indeterminate bar. Loader replaces the former Spinner component and story.
- [Map](https://design.gaudi.site/docs/components/map): An interactive geographic map with selectable markers, route lines, and camera controls. Powered by MapLibre; applications supply their own style, geography, and prepared data.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
- [Pointer](https://design.gaudi.site/docs/components/pointer): A pointer effect scoped to its container, with direct, spring and lazy tracking, hover feedback, and native input fallbacks.
- [Progress](https://design.gaudi.site/docs/components/progress): Determinate and indeterminate progress with a readable task label.
- [RadioGroup](https://design.gaudi.site/docs/components/radio-group): Choose one option using native radio controls or selectable cards.
- [ReadingIndicator](https://design.gaudi.site/docs/components/reading-indicator): Reading progress as a classic top bar, a vertical ruler with a moving percentage, or a movable circular meter.
- [Select](https://design.gaudi.site/docs/components/select): Select renders a styled option picker with searchable combobox behavior and multi-select support.
- [Separator](https://design.gaudi.site/docs/components/separator): Separate related content with a horizontal or vertical rule.
- [Slider](https://design.gaudi.site/docs/components/slider): Adjust one value or a range with pointer and keyboard input.
- [Switch](https://design.gaudi.site/docs/components/switch): Switch renders a token-styled boolean preference control.
- [Tabs](https://design.gaudi.site/docs/components/tabs): Switch between related panels with keyboard-accessible tab controls.
- [Textarea](https://design.gaudi.site/docs/components/textarea): Multiline text entry that composes with the same labels and errors as Input.
- [TextHighlight](https://design.gaudi.site/docs/components/text-highlight): TextHighlight emphasizes short inline phrases inside prose.
- [ToggleGroup](https://design.gaudi.site/docs/components/toggle-group): Single or multiple pressed choices for view modes and compact formatting controls.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [VideoPlayer](https://design.gaudi.site/docs/components/video-player): A native video player with a complete toolbar, an elastic minimal timeline, and a poster that opens a focused viewing dialog.
## Messaging
- [Attachment](https://design.gaudi.site/docs/components/attachment): File attachments with metadata, previews, actions and upload states.
## Feedback & States
- [Banner](https://design.gaudi.site/docs/components/banner): Banner renders a compact announcement strip.
- [EmptyState](https://design.gaudi.site/docs/components/empty-state): Explain empty collections, unavailable results and the next useful action.
- [Skeleton](https://design.gaudi.site/docs/components/skeleton): Skeleton renders non-semantic loading placeholders on the theme border token, so blocks read clearly in light and dark themes. Shimmer is the text counterpart: a highlight that sweeps across a label such as Thinking… while work is in progress.
## Navigation
- [Breadcrumb](https://design.gaudi.site/docs/components/breadcrumb): Breadcrumb renders hierarchical page trails for navigation context.
- [FloatingMenu](https://design.gaudi.site/docs/components/floating-menu): A compact, inverted pill of destinations that floats over the page once the reader scrolls away from the header, with an optional Back to top button. LayoutContainer renders it for the site; pass targetRef and position sticky to use it inside a scroll container.
- [NavigationMenu](https://design.gaudi.site/docs/components/navigation-menu): NavigationMenu renders grouped site navigation with dropdown panels for categories, sections, and related destinations.
- [Pagination](https://design.gaudi.site/docs/components/pagination): Pagination renders blog-style previous/status/next navigation. Hovering or focusing the center status reveals direct page shortcuts.
- [Scrollspy](https://design.gaudi.site/docs/components/scrollspy): Track the visible section and navigate a long document using anchor links.
- [Stepper](https://design.gaudi.site/docs/components/stepper): Show progress through a sequence of labelled steps.
- [Tree](https://design.gaudi.site/docs/components/tree): Browse hierarchical content with expansion, selection, checkboxes and drag feedback.
## Advanced Inputs
- [Calendar](https://design.gaudi.site/docs/components/calendar): Date selection for single dates, ranges, bookings and localized calendars.
- [Cascader](https://design.gaudi.site/docs/components/cascader): Select items from hierarchical data using drill-down, columns, search and multiple selection.
- [ColorPicker](https://design.gaudi.site/docs/components/color-picker): An inline color canvas with hue, opacity, an eyedropper, and HEX/RGB/HSL/CSS editors.
- [FileUpload](https://design.gaudi.site/docs/components/file-upload): Choose or drop attachments with validation, upload progress and recovery actions.
- [InputOtp](https://design.gaudi.site/docs/components/input-otp): One-time code entry with grouped slots, paste support and completion feedback.
- [NumberField](https://design.gaudi.site/docs/components/number-field): Numeric entry with increment buttons, bounds, locale formatting and scrubbing.
- [PhoneInput](https://design.gaudi.site/docs/components/phone-input): International phone entry with country selection and formatted numbers.
- [Questionnaire](https://design.gaudi.site/docs/components/questionnaire): A sequence of form questions with selection, validation and progress.
- [Rating](https://design.gaudi.site/docs/components/rating): Display a rating or let people select a score using labelled stars.
- [SignaturePad](https://design.gaudi.site/docs/components/signature-pad): A composable signature input with pressure-aware SVG ink, undo and redo, native forms, saved previews, and image or JSON export.
## Data Display
- [CodeBlock](https://design.gaudi.site/docs/components/code-block): CodeBlock renders syntax-highlighted source with an optional header, copy button, line numbers, highlighted and focused lines, diffs, folding and line selection.
- [DataTable](https://design.gaudi.site/docs/components/data-table): DataTable is a TanStack table with a compact data anatomy: shared headers that preserve label casing, hairline rows, synced column and row hover, a tinted wash for selected rows, and declarative column alignment, width and pinning. It adds search with a live count, single or multi-column sorting, selection with bulk actions, expandable rows, row action menus, pinned rows, grouped bands, a totals footer, sticky headers, automatic virtualization, pagination or load-more, CSV export, and loading, refreshing, empty and error states. Sorting, selection, expansion and pinning work controlled or uncontrolled.
- [FilterBar](https://design.gaudi.site/docs/components/filter-bar): A collection toolbar: search with a live result count, a Filters popover of facets with counts, and removable Field: Value chips. The host owns matching and persistence.
- [Item](https://design.gaudi.site/docs/components/item): Flexible rows for people, settings, integrations, navigation and activity lists, composed from media, text, actions and optional header and footer rows.
- [SchemaDisplay](https://design.gaudi.site/docs/components/schema-display): Read an API endpoint or a JSON Schema: method badge, path with highlighted parameters, and request and response schemas as an expandable property tree.
- [Terminal](https://design.gaudi.site/docs/components/terminal): Terminal renders mac-style shell examples with typed commands and structured output lines.
- [Timeline](https://design.gaudi.site/docs/components/timeline): Display dated activity and milestones with readable descriptions and optional actions.
## Overlays & Menus
- [Commander](https://design.gaudi.site/docs/components/commander): Commander provides the site command palette with host-supplied destinations for navigation, content search, and theme actions.
- [Dialog](https://design.gaudi.site/docs/components/dialog): Modal, confirmation and bare full-screen dialogs for editing, detail inspection, explicit decisions, lightboxes and launchers.
- [DropdownMenu](https://design.gaudi.site/docs/components/dropdown-menu): Action menus with keyboard navigation, checkbox choices and destructive actions.
- [Popover](https://design.gaudi.site/docs/components/popover): Popover renders compact positioned supporting content next to its trigger.
- [Sheet](https://design.gaudi.site/docs/components/sheet): A panel that slides in from an edge over a dimmed page, for side tasks such as settings, details, comments, notifications or an assistant, without leaving the current screen.
- [Toast](https://design.gaudi.site/docs/components/toast): Transient feedback for completed actions, errors and recoverable background work.
## Media & Previews
- [Embed](https://design.gaudi.site/docs/components/embed): The shared preview vocabulary for messages and content: one switch that hands each piece of content to its owner. Links go to LinkPreview, code to CodeBlock, generated pages to WebPreview; images and videos default to a LinkPreview card until you pass a renderer.
- [LinkPreview](https://design.gaudi.site/docs/components/link-preview): A link enriched with what the destination is. One normaliser, normalizeLinkPreview, turns the app's preview payload into a kind (repository, video, article, social post, docs, Wikipedia, package, image, file, internal post or website) and the rich fields that kind earns; three variants present it.
- [WebPreview](https://design.gaudi.site/docs/components/web-preview): A framed browser for a live or generated page: back, forward and reload, an editable address bar, open in a new tab, device widths, a sandboxed iframe with a loading state, an optional console, and a link preview card when a site refuses framing.
## Planning
- [EventCalendar](https://design.gaudi.site/docs/components/event-calendar): Schedule events across day, week, month, agenda and resource views.
- [Flow](https://design.gaudi.site/docs/components/flow): A node-and-edge canvas for workflows, pipelines, agent trees and driver maps, themed with Gaudi tokens and built on React Flow.
- [Gantt](https://design.gaudi.site/docs/components/gantt): A timeline board for scheduled work, dependencies and resource planning.
- [Kanban](https://design.gaudi.site/docs/components/kanban): Move work items between columns while retaining an accessible move action.
Source: https://design.gaudi.site/docs/components (Markdown with example code: https://design.gaudi.site/docs/components.md)
---
# AspectRatio
> Keep media at a stable aspect ratio as its container resizes.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/AspectRatio` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/AspectRatio/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-aspectratio--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { AspectRatio } from '@gaudi/design-system/core/AspectRatio';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/aspect-ratio-common-ratios.json`.
## Usage
```jsx
import { AspectRatio } from '@gaudi/design-system/core/AspectRatio';
```
## Examples
### Common ratios
Registry: `npx shadcn@latest add https://design.gaudi.site/r/aspect-ratio-common-ratios.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `ratio` | `number` | `1` | no | Width divided by height; use 16 / 9 for landscape media. |
| `children` | `ReactNode` | — | no | Content composed from the exported parts. |
| `className` | `string` | — | no | Additional classes on the outer element. |
## Accessibility
Supply alternative text for images and accessible names for embedded media.
## Related
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Checkbox](https://design.gaudi.site/docs/components/checkbox): Checkbox renders a token-styled binary control.
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
Source: https://design.gaudi.site/docs/components/aspect-ratio (Markdown with example code: https://design.gaudi.site/docs/components/aspect-ratio.md)
---
# Avatar
> Profile images, resilient initials, presence, verification, account menus and collaborator groups.
The existing Avatar API and curated patterns share the same image and fallback primitives.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Avatar` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Avatar/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-avatar--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Avatar } from '@gaudi/design-system/core/Avatar';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/avatar-account-menu.json`.
## Usage
```jsx
import { Avatar } from '@gaudi/design-system';
```
## Examples
### Account dropdown menu
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-account-menu.json`
### Rings and activity
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-activity-rings.json`
### Empty state
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-empty-state.json`
### Groups
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-groups.json`
### Hover groups with tooltips
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-hover-groups.json`
### Inside buttons
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-in-buttons.json`
### Sizes, shapes and fallbacks
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-sizes-fallbacks.json`
### Social proof
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-social-proof.json`
### Status and icon badges
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-status-badges.json`
### User details and badge
Registry: `npx shadcn@latest add https://design.gaudi.site/r/avatar-user-details.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `src` | `string` | — | no | Remote, local or data image source; failed and pending images show the fallback. |
| `name / label` | `string` | — | no | Name generates Unicode initials; label preserves explicit legacy initials. |
| `alt` | `string` | — | no | Accessible identity override; an empty string is decorative. |
| `fallback` | `ReactNode \| boolean` | `initials` | no | Custom artwork or text; true shows the guest silhouette. |
| `size` | `2xs \| xs \| sm \| md \| lg \| xl` | `md` | no | Six sizes; existing xs through lg dimensions are preserved. |
| `shape` | `circle \| square \| tile` | `square` | no | Identity crop and background treatment. |
| `surface` | `solid \| tinted \| plain \| bare` | `solid` | no | Identity crop and background treatment. |
| `indicator` | `{ label, tone?, icon?, position? }` | — | no | Host-provided presence or verification; positions follow reading direction. |
| `imageProps` | `object` | — | no | Image attributes and per-layer appearance. |
| `imageClassName` | `string` | — | no | Image attributes and per-layer appearance. |
| `fallbackClassName` | `string` | — | no | Image attributes and per-layer appearance. |
| `tone` | `gray \| neutral \| blue \| teal \| green \| amber \| yellow \| red \| rose \| indigo` | `gray` | no | Fallback colour family. |
| `grayscale` | `boolean` | `false` | no | Desaturates the image. |
| `onLoadingStatusChange` | `(status) => void` | — | no | Receives loading, loaded or error; source changes recover automatically. |
| `AvatarGroup` (sub-component) | `avatars, max, size, shape, label, renderAvatar, renderOverflow` | — | no | Accepts data-driven identities or existing compound children. |
### Variants
- `size`: `2xs`, `xs`, `sm`, `md`, `lg`, `xl`
- `shape`: `circle`, `square`, `tile`
- `surface`: `solid`, `tinted`, `plain`, `bare`
- `tone`: `gray`, `neutral`, `blue`, `teal`, `green`, `amber`, `yellow`, `red`, `rose`, `indigo`
## Accessibility
A named Avatar exposes one image label, including host-provided presence. Use alt="" beside visible identity text. Wrap interactive avatars in Button, Tooltip or DropdownMenu; status badges never infer presence from image loading.
## Related
- [Profile](https://design.gaudi.site/docs/blocks/profile): Account and organisation pages for an application: profile details, organisation members and permissions, billing and usage, referrals, and connected mailboxes.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [DropdownMenu](https://design.gaudi.site/docs/components/dropdown-menu): Action menus with keyboard navigation, checkbox choices and destructive actions.
- [Image](https://design.gaudi.site/docs/mdx/image): Image renders editorial MDX images with caption, dark-mode source, fallback source, and click-to-open modal behavior.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
Source: https://design.gaudi.site/docs/components/avatar (Markdown with example code: https://design.gaudi.site/docs/components/avatar.md)
---
# Button
> Button renders the Gaudi action and link-button variants.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Button` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Button/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-button--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Button from '@gaudi/design-system/core/Button';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/button-async-success.json`.
## Usage
```jsx
import { Button } from '@gaudi/design-system';
```
## Examples
### Async loading and success
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-async-success.json`
### Avatar and two-line content
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-avatar-two-line.json`
### Copy with feedback
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-copy-feedback.json`
### Counts, badges and shortcuts
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-counts-shortcuts.json`
### Icons, loading and links
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-icons-loading.json`
### Social sign-in
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-social-sign-in.json`
### Toggling icon and label
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-toggling-label.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `children` | `ReactNode` | — | no | Visible button label or content. |
| `variant` | `solid \| soft \| outline \| ghost \| subtle` | `solid` | no | Reusable visual treatment. |
| `size` | `xs \| sm \| md \| lg \| icon \| icon-xs \| icon-sm \| icon-lg` | `md` | no | Compact heights: xs 24px, sm 28px, md/default 32px, lg 36px. Icon sizes match their text-button counterparts. Use matching sizes for controls in the same row. |
| `tone` | `accent \| neutral \| success \| warning \| danger \| attention \| discovery \| info` | `accent (solid, subtle); neutral (soft, outline, ghost)` | no | Semantic meaning for the action. Quiet variants default to neutral so screens do not turn blue. Legacy hue names remain supported as compatibility aliases. |
| `radius` | `sm \| md \| lg \| full` | `md` | no | Legacy aliases use the global --ds-radius setting (4px by default); none stays square where supported. |
| `href` | `string` | — | no | Renders an internal Next link or safe external anchor. |
| `disabled` | `boolean` | `false` | no | Disables native buttons and removes disabled links from the tab order. |
| `className` | `string` | — | no | Root class override. |
### Variants
- `variant`: `solid`, `soft`, `outline`, `ghost`, `subtle`
- `size`: `xs`, `sm`, `md`, `lg`, `icon`, `icon-xs`, `icon-sm`, `icon-lg`
- `tone`: `accent`, `neutral`, `success`, `warning`, `danger`, `attention`, `discovery`, `info`
- `radius`: `sm`, `md`, `lg`, `full`
## Accessibility
Button renders native buttons for actions and links for navigation. Disabled link variants are removed from tab order.
## Related
- [Link](https://design.gaudi.site/docs/components/link): Link centralizes navigation semantics for internal, anchor, and external links.
- [Icon](https://design.gaudi.site/docs/components/icon): Static and interactive artwork from Gaudi’s centralized icon registry.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Loader](https://design.gaudi.site/docs/components/loader): An accessible loading indicator with arcs, dots, expanding rings, and an indeterminate bar.
- [Kbd](https://design.gaudi.site/docs/components/kbd): Kbd renders keyboard keys and multi-key shortcuts.
Source: https://design.gaudi.site/docs/components/button (Markdown with example code: https://design.gaudi.site/docs/components/button.md)
---
# ButtonGroup
> Group related actions with joined borders and consistent sizing.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/ButtonGroup` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/ButtonGroup/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-buttongroup--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { ButtonGroup } from '@gaudi/design-system/core/ButtonGroup';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/button-group-collection-toolbar.json`.
## Usage
```jsx
import Button from '@gaudi/design-system/core/Button';
import { ButtonGroup } from '@gaudi/design-system/core/ButtonGroup';
```
## Examples
### Collection toolbar
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-collection-toolbar.json`
### Counts and labels
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-counts-labels.json`
### Editor header
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-editor-header.json`
### Inputs and selects
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-inputs-selects.json`
### Segmented choices
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-segmented.json`
### Split buttons
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-split-buttons.json`
### Steppers and pagination
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-steppers-pagination.json`
### Toolbars
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-toolbars.json`
### Vertical groups
Registry: `npx shadcn@latest add https://design.gaudi.site/r/button-group-vertical.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `orientation` | `horizontal \| vertical` | `horizontal` | no | Arrangement and accessible orientation of the group. |
| `children` | `ReactNode` | — | no | Content composed from the exported parts. |
| `className` | `string` | — | no | Additional classes on the outer element. |
| `ButtonGroupSeparator.orientation` | `horizontal \| vertical` | `vertical` | no | Direction of a divider between actions. |
### Variants
- `orientation`: `horizontal`, `vertical`
## Accessibility
Buttons retain independent names and focus targets. Use ToggleGroup when the actions represent a selection.
## Related
- [ToggleGroup](https://design.gaudi.site/docs/components/toggle-group): Single or multiple pressed choices for view modes and compact formatting controls.
- [Direction](https://design.gaudi.site/docs/components/direction): Scopes text direction for Gaudi controls that need directional keyboard and placement behavior.
- [DropdownMenu](https://design.gaudi.site/docs/components/dropdown-menu): Action menus with keyboard navigation, checkbox choices and destructive actions.
- [Select](https://design.gaudi.site/docs/components/select): Select renders a styled option picker with searchable combobox behavior and multi-select support.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
Source: https://design.gaudi.site/docs/components/button-group (Markdown with example code: https://design.gaudi.site/docs/components/button-group.md)
---
# Card
> Card frames reusable content with title, subtitle, and optional children.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Card` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Card/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-card--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Card from '@gaudi/design-system/core/Card';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/card-billing-usage.json`.
## Usage
```jsx
import { Card } from '@gaudi/design-system';
```
## Examples
### Usage meters that expand
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-billing-usage.json`
### Deployment status
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-deployment-status.json`
### Header badge and actions
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-header-actions.json`
### Link cards
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-link-cards.json`
### Login form
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-login-form.json`
### Media cards
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-media.json`
### Sections and dividers
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-sections.json`
### Stat with trend and menu
Registry: `npx shadcn@latest add https://design.gaudi.site/r/card-stat-trend.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `title` | `ReactNode` | — | no | Optional card heading. |
| `titleLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `3` | no | Semantic level for the optional card heading. |
| `subtitle` | `ReactNode` | — | no | Supporting description under the title. |
| `children` | `ReactNode` | — | no | Body content, actions, or nested composition. |
| `variant` | `elevated \| outline \| soft \| flat` | `elevated` | no | Container surface treatment. |
| `padding` | `none \| sm \| md \| lg` | `md` | no | Internal spacing. |
| `radius` | `none \| sm \| md \| lg` | `md` | no | Legacy aliases use the global --ds-radius setting (4px by default); none stays square where supported. |
| `interactive` | `boolean` | `false` | no | Adds hover elevation for cards containing a real link or button. |
| `className` | `string` | — | no | Root class override. |
| `classNames` | `{ root, body, title, subtitle }` | — | no | Slot-level class overrides. |
### Variants
- `titleLevel`: `2`, `3`, `4`, `5`, `6`
- `variant`: `elevated`, `outline`, `soft`, `flat`
- `padding`: `none`, `sm`, `md`, `lg`
- `radius`: `none`, `sm`, `md`, `lg`
## Accessibility
Card is a structural container. Put links or buttons inside it rather than making the whole card a fake control.
## Related
- [DropdownMenu](https://design.gaudi.site/docs/components/dropdown-menu): Action menus with keyboard navigation, checkbox choices and destructive actions.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [Input](https://design.gaudi.site/docs/components/input): Text, search, numeric and date inputs with prefix and suffix slots.
- [Accordion](https://design.gaudi.site/docs/components/accordion): Rich disclosure for FAQs, settings, member directories, nested help, and guided setup.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
Source: https://design.gaudi.site/docs/components/card (Markdown with example code: https://design.gaudi.site/docs/components/card.md)
---
# Checkbox
> Checkbox renders a token-styled binary control.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Checkbox` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Checkbox/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-checkbox--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Checkbox from '@gaudi/design-system/core/Checkbox';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/checkbox-corner-cards.json`.
## Usage
```jsx
import { Checkbox } from '@gaudi/design-system';
```
## Examples
### Corner-check cards
Registry: `npx shadcn@latest add https://design.gaudi.site/r/checkbox-corner-cards.json`
### Groups
Registry: `npx shadcn@latest add https://design.gaudi.site/r/checkbox-groups.json`
### Label extras and styles
Registry: `npx shadcn@latest add https://design.gaudi.site/r/checkbox-label-extras.json`
### Nested group
Registry: `npx shadcn@latest add https://design.gaudi.site/r/checkbox-nested-group.json`
### Row cards
Registry: `npx shadcn@latest add https://design.gaudi.site/r/checkbox-row-cards.json`
### States
Registry: `npx shadcn@latest add https://design.gaudi.site/r/checkbox-states.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | `string` | `generated id` | no | Connects the button control to its visible label. |
| `label` | `ReactNode` | — | no | Visible label text. |
| `checked` | `boolean` | — | no | Controlled checked state. |
| `defaultChecked` | `boolean` | `false` | no | Initial checked state for uncontrolled usage. |
| `disabled` | `boolean` | `false` | no | Prevents changes and lowers visual emphasis. |
| `onCheckedChange` | `(checked) => void` | — | no | Called with the next checked state. |
| `className` | `string` | — | no | Root class override. |
## Accessibility
Checkbox exposes role checkbox, aria-checked, disabled state, and a visible label when provided.
## Related
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Separator](https://design.gaudi.site/docs/components/separator): Separate related content with a horizontal or vertical rule.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
Source: https://design.gaudi.site/docs/components/checkbox (Markdown with example code: https://design.gaudi.site/docs/components/checkbox.md)
---
# Field
> Field composes form label, description, error, and input building blocks.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Field` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Field/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-field--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Field } from '@gaudi/design-system/core/Field';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/field-controls.json`.
## Usage
```jsx
import { Field, FieldDescription, EmailInput, FieldLabel } from '@gaudi/design-system';
EmailUsed for article updates only.
```
## Examples
### Controls in fields
Registry: `npx shadcn@latest add https://design.gaudi.site/r/field-controls.json`
### Validation errors
Registry: `npx shadcn@latest add https://design.gaudi.site/r/field-errors.json`
### Fieldsets of choices
Registry: `npx shadcn@latest add https://design.gaudi.site/r/field-fieldsets.json`
### Fields that reflow by width
Registry: `npx shadcn@latest add https://design.gaudi.site/r/field-responsive.json`
### Preferences form that checks itself
Registry: `npx shadcn@latest add https://design.gaudi.site/r/field-settings-validation.json`
### Label accessories
Registry: `npx shadcn@latest add https://design.gaudi.site/r/label-accessories.json`
### Inline edit
Registry: `npx shadcn@latest add https://design.gaudi.site/r/label-inline-edit.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `caretMode` | `native \| smooth` | `provider / smooth` | no | FieldInput overrides the nearest InputConfigProvider. Native editing stays intact. |
| `children` | `ReactNode` | — | no | Composes label, input, description, and error slots or supplies slot text. |
| `htmlFor` | `string` | — | no | Connects the visible label to the input id. |
| `id` | `string` | — | no | Input id paired with FieldLabel htmlFor. |
| `type` | `string` | `text` | no | Native input type. |
| `name` | `string` | — | no | Native input name for form submission. |
| `value` | `string` | — | no | Controlled input value. |
| `defaultValue` | `string` | — | no | Initial uncontrolled input value. |
| `placeholder` | `string` | — | no | Native input placeholder. |
| `required` | `boolean` | `false` | no | Marks the input as required. |
| `invalid` | `boolean` | `true when a FieldError is rendered` | no | Forces aria-invalid and the error border on FieldInput. |
| `disabled` | `boolean` | `false` | no | Disables the input. |
| `onChange` | `(event) => void` | — | no | Native input change handler. |
| `className` | `string` | — | no | Class override on each Field slot. |
### Variants
- `caretMode`: `native`, `smooth`
## Accessibility
Field keeps label, input, description, and error markup colocated so form controls can be wired with id/htmlFor.
## Related
- [Input](https://design.gaudi.site/docs/components/input): Text, search, numeric and date inputs with prefix and suffix slots.
- [Select](https://design.gaudi.site/docs/components/select): Select renders a styled option picker with searchable combobox behavior and multi-select support.
- [InputOtp](https://design.gaudi.site/docs/components/input-otp): One-time code entry with grouped slots, paste support and completion feedback.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Checkbox](https://design.gaudi.site/docs/components/checkbox): Checkbox renders a token-styled binary control.
- [RadioGroup](https://design.gaudi.site/docs/components/radio-group): Choose one option using native radio controls or selectable cards.
Source: https://design.gaudi.site/docs/components/field (Markdown with example code: https://design.gaudi.site/docs/components/field.md)
---
# Icon
> Static and interactive artwork from Gaudi’s centralized icon registry.
AnimatedIcon adds opt-in motion with shared size and color tokens, a searchable catalogue, and host-controlled activation.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Icon` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Icon/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-icon--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Icon from '@gaudi/design-system/core/Icon';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/icon-stack-in-context.json`.
## Usage
```jsx
import { Icon } from '@gaudi/design-system';
```
## Examples
### In an empty state and list row
Registry: `npx shadcn@latest add https://design.gaudi.site/r/icon-stack-in-context.json`
### Sizes, colors and badge
Registry: `npx shadcn@latest add https://design.gaudi.site/r/icon-stack-sizes-badge.json`
### In a card, list row and empty state
Registry: `npx shadcn@latest add https://design.gaudi.site/r/icon-tile-in-context.json`
### Tones
Registry: `npx shadcn@latest add https://design.gaudi.site/r/icon-tile-tones.json`
### Variants, sizes and shapes
Registry: `npx shadcn@latest add https://design.gaudi.site/r/icon-tile-variants.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | `registry icon name` | — | no | Renders an icon from the Gaudi registry. |
| `kind` | `github \| linkedin \| twitter \| youtube \| mail \| ...` | — | no | Compatibility alias for social/link icon use. |
| `href` | `string` | — | no | Renders the icon as a safe link when provided. |
| `label` | `string` | — | no | Accessible label for informative icons and icon links. |
| `decorative` | `boolean` | `false` | no | Hides the SVG from assistive technology when the icon is visual only. |
| `size` | `xs \| sm \| md \| lg \| xl \| 2xl \| number` | `md` | no | Controls icon dimensions. |
| `color` | `neutral \| muted \| primary \| info \| success \| warning \| danger \| attention \| blue \| teal \| green \| amber \| yellow \| red \| rose \| dim` | `currentColor` | no | Token color shortcut. |
| `strokeWidth` | `number` | `icon default` | no | Adjusts line icon stroke width. Filled brand icons such as Github ignore it. |
| `active` | `boolean (AnimatedIcon)` | `false` | no | Starts motion when the host is active and visible. Reduced motion and hidden documents keep the resting artwork. |
| `className` | `string` | — | no | Root class override. |
### Variants
- `kind`: `github`, `linkedin`, `twitter`, `youtube`, `mail`, `...`
- `color`: `neutral`, `muted`, `primary`, `info`, `success`, `warning`, `danger`, `attention`, `blue`, `teal`, `green`, `amber`, `yellow`, `red`, `rose`, `dim`
## Accessibility
Decorative icons are hidden from assistive technology. Informative or icon-only links need a readable label.
## Related
- [EmptyState](https://design.gaudi.site/docs/components/empty-state): Explain empty collections, unavailable results and the next useful action.
- [Item](https://design.gaudi.site/docs/components/item): Flexible rows for people, settings, integrations, navigation and activity lists, composed from media, text, actions and optional header and footer rows.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
Source: https://design.gaudi.site/docs/components/icon (Markdown with example code: https://design.gaudi.site/docs/components/icon.md)
---
# ImageGallery
> A responsive masonry or grid collection with an accessible image viewer.
A one-item collection is a full-width, click-to-expand image.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/ImageGallery` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/ImageGallery/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-imagegallery--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { ImageGallery } from '@gaudi/design-system/core/ImageGallery';
```
## Usage
```jsx
import { ImageGallery } from '@gaudi/design-system/core/ImageGallery';
```
## Examples
Examples (rendered from Storybook):
- [Playground](https://storybook.gaudi.site/index.html?path=/story/core-imagegallery--playground)
- [Single expandable image](https://storybook.gaudi.site/index.html?path=/story/core-imagegallery--single)
- [Controlled grid](https://storybook.gaudi.site/index.html?path=/story/core-imagegallery--controlled)
- [Empty & unavailable images](https://storybook.gaudi.site/index.html?path=/story/core-imagegallery--recovery)
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `images` | `Array<{ id, src, alt, caption?, thumbnailSrc?, width?, height? }>` | `[]` | no | Prepared images with unique, stable string IDs. src is the full image; thumbnailSrc optionally supplies a smaller preview. width and height reserve the thumbnail aspect ratio; a different ratio crops the preview. The viewer always contains the full image. |
| `label` | `string` | `Image gallery` | no | Accessible name of the gallery region. |
| `layout` | `masonry \| grid` | `masonry` | no | Masonry keeps each thumbnail ratio and reads down each column. Grid reads across rows and crops thumbnails to 4:3. |
| `columns` | `{ mobile?, tablet?, desktop? }` | `{ mobile: 1, tablet: 2, desktop: 3 }` | no | Positive integer column counts at gallery widths below 640px, from 640px, and from 1024px. A single image always occupies one full-width column. |
| `showCaptions` | `boolean` | `true` | no | Shows captions below thumbnails. The viewer always shows the active caption or alternative text. |
| `selectedId` | `string \| null` | `uncontrolled` | no | Controls or initializes the viewer selection. null closes it; selecting a thumbnail, navigating, swiping, and closing request a change. Controlled hosts remain authoritative. An ID absent from images closes the viewer. |
| `defaultSelectedId` | `string \| null` | `null` | no | Controls or initializes the viewer selection. null closes it; selecting a thumbnail, navigating, swiping, and closing request a change. Controlled hosts remain authoritative. An ID absent from images closes the viewer. |
| `onSelectedIdChange` | `(id) => void` | — | no | Controls or initializes the viewer selection. null closes it; selecting a thumbnail, navigating, swiping, and closing request a change. Controlled hosts remain authoritative. An ID absent from images closes the viewer. |
| `disabled` | `boolean` | `false` | no | Disables thumbnail activation and hides the viewer while true, retaining the selection. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `layout`: `masonry`, `grid`
## Accessibility
Thumbnails are named buttons. Enter or Space opens the viewer. Arrow keys move between images (respecting direction), Home and End select the first and last images, and Escape closes. Touch supports swiping and browser pinch zoom. Dialog contains focus and restores the opener, or the gallery region if that opener was removed or disabled. Reduced motion removes animated slide movement.
## Notes
- Provide useful alt text; captions add visible context. Offscreen slides are hidden from assistive technology. Navigation stops at either end and disappears for a single image.
- Images load lazily, with the selected full image loaded eagerly. Failed sources show an accessible placeholder; replace thumbnailSrc (or src when no thumbnail is supplied) to recover a preview, and src to recover the full image. Empty collections show an explicit empty state.
- Use one image in images for an expandable article figure. No separate single-image wrapper is needed. Existing MDX/Image and MDX/ImageModal share the same viewer while preserving their APIs.
- The Shadix UI gallery informed the masonry and expansion behavior. The implementation uses Gaudi Dialog, Carousel, Button and Icon; it does not load remote demo resources.
## Related
- [Navigation](https://design.gaudi.site/docs/blocks/navigation): The site header block: brand, primary NavigationMenu with a two-block Blog panel (categories beside recent posts) or a Categories panel on the supplied blog route, search, theme switch, and a phone sheet below lg.
- [Image](https://design.gaudi.site/docs/mdx/image): Image renders editorial MDX images with caption, dark-mode source, fallback source, and click-to-open modal behavior.
- [ImageModal](https://design.gaudi.site/docs/mdx/image-modal): A focused view of an article image with a caption and dismiss action.
- [Dialog](https://design.gaudi.site/docs/components/dialog): Modal, confirmation and bare full-screen dialogs for editing, detail inspection, explicit decisions, lightboxes and launchers.
- [Carousel](https://design.gaudi.site/docs/components/carousel): Carousel renders standard feature slides and editorial card rails.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
Source: https://design.gaudi.site/docs/components/image-gallery (Markdown with example code: https://design.gaudi.site/docs/components/image-gallery.md)
---
# Input
> Text, search, numeric and date inputs with prefix and suffix slots.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Input` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Input/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-input--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Input from '@gaudi/design-system/core/Input';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/input-group-addons.json`.
## Usage
```jsx
import Input, { EmailInput } from '@gaudi/design-system/core/Input';
<>
setName(event.target.value)} />
>
```
## Examples
### Addon placement
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-group-addons.json`
### AI prompt inputs
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-group-ai-prompts.json`
### Multi-field composer
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-group-composer.json`
### Dropdown selectors
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-group-dropdowns.json`
### Hints and states
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-group-hints-states.json`
### Inline actions
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-group-inline-actions.json`
### Search with filters
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-group-search-filters.json`
### Labels and messages
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-labels-messages.json`
### Password with strength meter
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-password-strength.json`
### Style variants
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-style-variants.json`
### Input types
Registry: `npx shadcn@latest add https://design.gaudi.site/r/input-types.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `caretMode` | `native \| smooth` | `provider / smooth` | no | Overrides InputConfigProvider for this field. Smooth mode animates the collapsed caret while supported native text controls retain their editing behavior. |
| `type` | `text \| email \| search \| url \| tel \| password \| number \| date` | `text` | no | Native input type. Use EmailInput for addresses and NumberField for numeric values to retain the default smooth caret. |
| `prefix / suffix` | `ReactNode` | — | no | Content before or after the native control. |
| `placeholder` | `string` | — | no | Example value; never a replacement for a label. |
| `required / disabled` | `boolean` | `false` | no | Native form constraint and availability. |
| `invalid` | `boolean` | — | no | Marks the underlying FieldInput as invalid. |
| `inputClassName` | `string` | — | no | Classes on the input itself. |
| `className` | `string` | — | no | Additional classes on the outer element. |
| `Native input props / ref` (pass-through) | `InputHTMLAttributes` | — | no | Forwards value, defaultValue, onChange, disabled, required, name, autocomplete and ARIA attributes to the input. |
### Variants
- `caretMode`: `native`, `smooth`
## Accessibility
Compose Field, FieldLabel, FieldDescription and FieldError. Keep labels visible and connect errors to their control.
## Notes
- EmailInput is a named export from the Input entry. It composes Input with a text editor, an email keyboard hint, email autocomplete and single-address pattern validation, so it supports smooth caret mode.
- EmailInput fixes type=text and inputMode=email; multiple addresses are unsupported. An additional pattern narrows the allowed addresses. Invalid author patterns are ignored while email validation remains active.
- EmailInput keeps raw text (spaces are invalid), reports patternMismatch instead of typeMismatch, and leaves custom error copy to FieldError/onInvalid. required, minLength/maxLength, name, form, value/defaultValue, refs and event handlers reach the native editor.
- Smooth caret is enabled by default. Use EmailInput for addresses and NumberField for numeric values throughout forms and examples; reserve native email/number types for documented semantic exceptions. Provider and per-field caretMode=native overrides remain available.
## Related
- [NumberField](https://design.gaudi.site/docs/components/number-field): Numeric entry with increment buttons, bounds, locale formatting and scrubbing.
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [DropdownMenu](https://design.gaudi.site/docs/components/dropdown-menu): Action menus with keyboard navigation, checkbox choices and destructive actions.
- [Popover](https://design.gaudi.site/docs/components/popover): Popover renders compact positioned supporting content next to its trigger.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
Source: https://design.gaudi.site/docs/components/input (Markdown with example code: https://design.gaudi.site/docs/components/input.md)
---
# Kbd
> Kbd renders keyboard keys and multi-key shortcuts.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Kbd` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Kbd/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-kbd--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Kbd from '@gaudi/design-system/core/Kbd';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/kbd-in-controls.json`.
## Usage
```jsx
import { Kbd } from '@gaudi/design-system';
```
## Examples
### Shortcuts in controls
Registry: `npx shadcn@latest add https://design.gaudi.site/r/kbd-in-controls.json`
### Keys, groups and icons
Registry: `npx shadcn@latest add https://design.gaudi.site/r/kbd-keys-groups.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `children` | `ReactNode` | — | no | Single visible key when keys is not provided. |
| `keys` | `string \| string[]` | — | no | Shortcut list such as "command,shift,k". |
| `size` | `xs \| sm \| md \| lg` | `md` | no | Controls key dimensions and text size. |
| `variant` | `raised \| outline \| flat` | `raised` | no | Visual keycap treatment. |
| `className` | `string` | — | no | Root class override. |
### Variants
- `size`: `xs`, `sm`, `md`, `lg`
- `variant`: `raised`, `outline`, `flat`
## Accessibility
Keyboard shortcuts expose readable aria-label text such as Command plus K while keeping visual symbols compact.
## Related
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Input](https://design.gaudi.site/docs/components/input): Text, search, numeric and date inputs with prefix and suffix slots.
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
Source: https://design.gaudi.site/docs/components/kbd (Markdown with example code: https://design.gaudi.site/docs/components/kbd.md)
---
# Link
> Link centralizes navigation semantics for internal, anchor, and external links.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Link` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Link/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-link--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Link from '@gaudi/design-system/core/Link';
```
## Usage
```jsx
import { Link } from '@gaudi/design-system';
Read the blog
```
## Examples
Examples (rendered from Storybook):
- [Playground](https://storybook.gaudi.site/index.html?path=/story/core-link--playground)
- [Link Types](https://storybook.gaudi.site/index.html?path=/story/core-link--link-types)
- [Variants and tones](https://storybook.gaudi.site/index.html?path=/story/core-link--variants)
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `children` | `ReactNode` | — | no | Visible link label. |
| `href` | `internal \| anchor \| external URL` | — | no | Internal routes use Next Link; anchors and external URLs use native anchors. |
| `prefetch` | `boolean` | `true` | no | Next.js prefetch behavior for internal links. |
| `variant` | `inline \| muted \| nav \| bare` | `inline` | no | Text link style: inline takes tone, muted is secondary gray, nav is strong gray turning blue on hover, bare inherits the parent color. |
| `tone` | `accent \| attention \| danger \| discovery \| info \| neutral \| success \| warning` | `neutral` | no | Color family of the inline variant. Default is black/gray and turns blue on hover. muted, nav, and bare have fixed colors and ignore tone. |
| `className` | `string` | — | no | Root class override. |
### Variants
- `variant`: `inline`, `muted`, `nav`, `bare`
- `tone`: `accent`, `attention`, `danger`, `discovery`, `info`, `neutral`, `success`, `warning`
## Accessibility
Link renders Next links for internal URLs, anchors for fragments, and safe external anchors with noopener noreferrer.
## Related
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Checkbox](https://design.gaudi.site/docs/components/checkbox): Checkbox renders a token-styled binary control.
Source: https://design.gaudi.site/docs/components/link (Markdown with example code: https://design.gaudi.site/docs/components/link.md)
---
# Loader
> An accessible loading indicator with arcs, dots, expanding rings, and an indeterminate bar.
Loader replaces the former Spinner component and story.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Loader` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Loader/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-loader--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Loader } from '@gaudi/design-system/core/Loader';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/loader-inline-controls.json`.
## Usage
```jsx
import { Loader } from '@gaudi/design-system/core/Loader';
```
## Examples
### In buttons, badges and inputs
Registry: `npx shadcn@latest add https://design.gaudi.site/r/loader-inline-controls.json`
### Inline status
Registry: `npx shadcn@latest add https://design.gaudi.site/r/loader-inline-status.json`
### Overlays and empty states
Registry: `npx shadcn@latest add https://design.gaudi.site/r/loader-overlays.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `variant` | `arc \| dual-arc \| bar \| beat \| bounce \| circle-dots \| clip \| puff \| three-dots \| triangle \| two-dots` | `arc` | no | Selects the motion and shape. Every variant represents an unknown wait; use Progress when completion can be measured. |
| `size` | `xs \| sm \| md \| lg` | `md` | no | 12, 16, 20, or 32px tall. The bar is three times as wide; other variants are square. Shapes keep these dimensions across spacing presets. |
| `label` | `string` | `Loading` | no | Accessible status label describing the operation. A visible label belongs beside the indicator. |
| `LoaderRoot` (sub-component) | `component` | `currentColor, sm` | no | Composition primitive with the same variants and sizing. Inherits text color and accepts aria-label rather than label. Loader adds the accent color and md default. |
| `loaderVariants` | `string[]` | — | no | Supported variant names for controls or a variant picker. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `variant`: `arc`, `dual-arc`, `bar`, `beat`, `bounce`, `circle-dots`, `clip`, `puff`, `three-dots`, `triangle`, `two-dots`
- `size`: `xs`, `sm`, `md`, `lg`
## Accessibility
Each loader exposes role="status" and a readable label. Motion is decorative to that status. With reduced motion, rotation, travel, scaling and bouncing stop; the whole indicator breathes slowly in place. For an already-labelled button or busy region, use aria-hidden="true" to avoid duplicate announcements.
## Notes
- Use className="text-current" to inherit surrounding text, or a semantic tone such as text-text-muted. Explicit size utility classes can override the dimensions. Keep the bar at its natural 3:1 ratio.
- All animation is CSS and SVG; there are no timers or browser-only rendering dependencies. Unmount the loader when the operation finishes. Loading state, cancellation, progress and recovery belong to the host.
- Import Loader from the root, core, or core/Loader entry. Spinner, SpinnerRoot and core/Spinner have been renamed to Loader, LoaderRoot and core/Loader; update existing imports.
- The Shadix UI loader reference informed the variant family. Geometry and motion are implemented locally using Gaudi colors, density and motion conventions.
## Related
- [Progress](https://design.gaudi.site/docs/components/progress): Determinate and indeterminate progress with a readable task label.
- [EmptyState](https://design.gaudi.site/docs/components/empty-state): Explain empty collections, unavailable results and the next useful action.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Input](https://design.gaudi.site/docs/components/input): Text, search, numeric and date inputs with prefix and suffix slots.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
- [ChatActivityIndicator](https://design.gaudi.site/docs/chat/chat-activity-indicator): What the assistant is doing: idle, thinking, streaming, tool, done or error.
Source: https://design.gaudi.site/docs/components/loader (Markdown with example code: https://design.gaudi.site/docs/components/loader.md)
---
# Map
> An interactive geographic map with selectable markers, route lines, and camera controls.
Powered by MapLibre; applications supply their own style, geography, and prepared data.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Map` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Map/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-map--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Map } from '@gaudi/design-system/core/Map';
```
## Usage
```jsx
'use client';
import { useState } from 'react';
import { Map } from '@gaudi/design-system/core/Map';
const meeting = {
id: 'meeting',
coordinates: [-73.983, 40.7535],
label: 'Bryant Park meeting point'
};
// Pass the host application's MapLibre style object or URL as mapStyle.
// Load @gaudi/design-system/styles.css once in the application's stylesheet entry.
export function MeetingMap({ mapStyle }) {
const [selectedId, setSelectedId] = useState(null);
return (
Bryant Park, 42nd Street and Sixth Avenue, New York.
{selectedId === meeting.id && (
Meet at the Sixth Avenue entrance.
)}
);
}
```
## Examples
Examples (rendered from Storybook):
- [Playground](https://storybook.gaudi.site/index.html?path=/story/core-map--playground)
- [Single location](https://storybook.gaudi.site/index.html?path=/story/core-map--location)
- [Unavailable map & recovery](https://storybook.gaudi.site/index.html?path=/story/core-map--recovery)
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `mapStyle` | `MapLibre StyleSpecification \| string` | `required` | no | A stable style object or an application-configured style URL. Gaudi has no built-in map service, access token, geocoding, or routing endpoint. Memoize object styles. Changing the style preserves the camera. |
| `initialViewState` | `{ center: [longitude, latitude], zoom?, bearing?, pitch? }` | `{ center: [0, 0], zoom: 2 }` | no | Initial camera. Later changes use ref.flyTo, ref.fitBounds, or ref.reset. Coordinates always use longitude before latitude. |
| `markers` | `Array<{ id, coordinates, label, tone?, icon?, badge? }>` | `[]` | no | Stable unique IDs, [longitude, latitude] coordinates, and an accessible label. tone uses Button tones, icon is a React slot, and badge is optional visible metadata; include its meaning in label. |
| `selectedMarkerId` | `string \| number` | — | no | Controlled selection. Pointer and keyboard activation request a selection; the host chooses whether to accept it. Selection does not move the camera. |
| `onMarkerClick` | `(id) => void` | — | no | Controlled selection. Pointer and keyboard activation request a selection; the host chooses whether to accept it. Selection does not move the camera. |
| `routes` | `Array<{ id, coordinates, color?, width?, dashed? }>` | `[]` | no | Prepared line strings (at least two coordinates each). The app supplies color and status meaning. Defaults: blue, 3px, solid. Preserve attribution in your map style. |
| `label` | `string` | `Map` | no | Accessible name for the map region and keyboard canvas. |
| `controls` | `boolean` | `true` | no | Shows reset, zoom in, and zoom out controls when interactive. |
| `interactive` | `boolean` | `true` | no | Enables camera gestures and keyboard navigation. False disables those and hides camera controls; marker buttons remain selectable. |
| `scrollZoom` | `boolean` | `false` | no | Enables wheel zoom. Off by default so a map embedded in a page does not trap page scrolling. |
| `minZoom` | `number` | `0` | no | Camera zoom bounds. Changes clamp the current view without replacing the map. |
| `maxZoom` | `number` | `20` | no | Camera zoom bounds. Changes clamp the current view without replacing the map. |
| `onViewStateChange` | `(view) => void` | — | no | Camera movement completion, map readiness, and renderer/style/source errors. view includes center, zoom, bearing, and pitch. onViewStateChange reports state; it is not a controlled camera prop. |
| `onLoad` | `(view) => void` | — | no | Camera movement completion, map readiness, and renderer/style/source errors. view includes center, zoom, bearing, and pitch. onViewStateChange reports state; it is not a controlled camera prop. |
| `onError` | `(error) => void` | — | no | Camera movement completion, map readiness, and renderer/style/source errors. view includes center, zoom, bearing, and pitch. onViewStateChange reports state; it is not a controlled camera prop. |
| `ref` | `{ flyTo(view), fitBounds(bounds, options?), reset(), getViewState() }` | — | no | Imperative camera access after readiness. fitBounds accepts southwest/northeast coordinate pairs and optional MapLibre fit options. Camera motion honors reduced motion. getViewState returns null before mount. |
| `labels` | `{ loading?, unavailable?, retry?, zoomIn?, zoomOut?, reset? }` | `English labels` | no | Localized state and control text. |
| `children` | `ReactNode` | — | no | Bottom-left overlay content and custom unavailable-state content. Retry remains available. Keep overlay content concise and provide a textual alternative for important geographic information. |
| `fallback` | `ReactNode` | `location buttons` | no | Bottom-left overlay content and custom unavailable-state content. Retry remains available. Keep overlay content concise and provide a textual alternative for important geographic information. |
| `style` | `CSSProperties` | — | no | Container styling, including height (default 32rem). The map follows its container size. |
| `className` | `string` | — | no | Additional classes on the outer element. |
## Accessibility
The named region contains a focusable map canvas: arrows pan, plus/minus zoom. Marker buttons and controls work with Enter/Space and show focus. Selected markers expose aria-pressed. Browser touch gestures and reduced motion are supported. Geographic canvas content itself is not a screen-reader equivalent: provide a linked list or textual route summary, as the tracking example does.
## Notes
- Use an app-owned basemap and preserve the provider’s attribution. Style URLs, tiles, sprites, and glyphs are only requested when configured by the host. For local demos, the bundled NYC geometry and system fonts need no external services.
- The tracking story is a composition of Map, Button, Input, Select, Icon, and Pill. Vehicles and journeys are fictional, stored locally, and do not imply live tracking, traffic, or route calculation.
- Keep markers and route IDs stable. Updating coordinates moves the existing marker and preserves its button identity. Resource failures show a recoverable state with a list fallback; WebGL support is required to draw the map.
## Related
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [Input](https://design.gaudi.site/docs/components/input): Text, search, numeric and date inputs with prefix and suffix slots.
- [Select](https://design.gaudi.site/docs/components/select): Select renders a styled option picker with searchable combobox behavior and multi-select support.
- [Icon](https://design.gaudi.site/docs/components/icon): Static and interactive artwork from Gaudi’s centralized icon registry.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
- [Pointer](https://design.gaudi.site/docs/components/pointer): A pointer effect scoped to its container, with direct, spring and lazy tracking, hover feedback, and native input fallbacks.
Source: https://design.gaudi.site/docs/components/map (Markdown with example code: https://design.gaudi.site/docs/components/map.md)
---
# Pill
> Pill renders compact category and status labels.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Pill` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Pill/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-pill--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Pill from '@gaudi/design-system/core/Pill';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/badge-icons-avatars.json`.
## Usage
```jsx
import { Pill } from '@gaudi/design-system';
Engineering
```
## Examples
### Icons, dots, avatars and images
Registry: `npx shadcn@latest add https://design.gaudi.site/r/badge-icons-avatars.json`
### Removable filters and links
Registry: `npx shadcn@latest add https://design.gaudi.site/r/badge-removable-filters.json`
### Sizes, counts and labels
Registry: `npx shadcn@latest add https://design.gaudi.site/r/badge-sizes-counts.json`
### Variants
Registry: `npx shadcn@latest add https://design.gaudi.site/r/badge-variants.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `children` | `ReactNode` | — | no | Visible category, status, or tag label. |
| `size` | `xs \| sm \| md \| lg` | `md` | no | Controls padding and text size. |
| `tone` | `gray \| neutral \| blue \| teal \| green \| amber \| yellow \| red \| rose \| indigo` | `blue` | no | Semantic tone alias mapped through Gaudi tokens rather than raw palette utilities. |
| `variant` | `solid \| soft \| outline \| ghost \| subtle` | `solid` | no | Visual treatment. |
| `radius` | `sm \| md \| full` | `sm` | no | Legacy aliases use the global --ds-radius setting (4px by default); none stays square where supported. |
| `href` | `string` | — | no | Renders the pill as a navigation link. |
| `icon` | `ReactNode` | — | no | Decorative leading icon. |
| `pulse` | `boolean` | `false` | no | Adds a pulsing status dot. |
| `className` | `string` | — | no | Root class override. |
### Variants
- `size`: `xs`, `sm`, `md`, `lg`
- `tone`: `gray`, `neutral`, `blue`, `teal`, `green`, `amber`, `yellow`, `red`, `rose`, `indigo`
- `variant`: `solid`, `soft`, `outline`, `ghost`, `subtle`
- `radius`: `sm`, `md`, `full`
## Accessibility
Pill includes visible text so status or category meaning is not color-only.
## Related
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Checkbox](https://design.gaudi.site/docs/components/checkbox): Checkbox renders a token-styled binary control.
Source: https://design.gaudi.site/docs/components/pill (Markdown with example code: https://design.gaudi.site/docs/components/pill.md)
---
# Pointer
> A pointer effect scoped to its container, with direct, spring and lazy tracking, hover feedback, and native input fallbacks.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Pointer` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Pointer/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-pointer--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Pointer } from '@gaudi/design-system/core/Pointer';
```
## Usage
```jsx
import { Pointer, Button } from '@gaudi/design-system';
```
## Examples
Examples (rendered from Storybook):
- [Playground](https://storybook.gaudi.site/index.html?path=/story/core-pointer--playground)
- [Direct, spring and lazy](https://storybook.gaudi.site/index.html?path=/story/core-pointer--tracking)
- [Contextual labels](https://storybook.gaudi.site/index.html?path=/story/core-pointer--labels)
- [Inputs and native fallbacks](https://storybook.gaudi.site/index.html?path=/story/core-pointer--native-fallbacks)
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `variant` | `dot \| ring \| frame \| label` | `frame` | no | Follower appearance. Ring and frame keep a precise dot at the actual pointer; label places a hint beside it. |
| `tracking` | `direct \| spring \| lazy` | `lazy` | no | Immediate movement, a responsive spring, or a slower trailing frame. |
| `tone` | `neutral \| accent` | `neutral` | no | Theme-aware foreground or accent color. |
| `label` | `string` | `Explore` | no | Default label for the label variant. A descendant data-pointer-label overrides it while hovered. |
| `hideCursor` | `boolean` | `true` | no | Hides the native cursor only while the effect is active inside this container. |
| `disabled` | `boolean` | `false` | no | Turns off the decorative effect. Descendant controls stay usable. |
| `data-pointer-native` | `HTML attribute on descendants` | — | no | Opt any subtree into the native cursor, for example selectable article text. |
| `children` | `ReactNode` | — | no | Content composed from the exported parts. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `variant`: `dot`, `ring`, `frame`, `label`
- `tracking`: `direct`, `spring`, `lazy`
- `tone`: `neutral`, `accent`
## Accessibility
The overlay is aria-hidden and never captures pointer events. Touch, pen, reduced motion, editable fields, keyboard use, and disabled effects retain the native cursor. Give every action its normal visible label; pointer text is supplementary. No global cursor styles are changed.
## Related
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Checkbox](https://design.gaudi.site/docs/components/checkbox): Checkbox renders a token-styled binary control.
Source: https://design.gaudi.site/docs/components/pointer (Markdown with example code: https://design.gaudi.site/docs/components/pointer.md)
---
# Progress
> Determinate and indeterminate progress with a readable task label.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Progress` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Progress/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-progress--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Progress from '@gaudi/design-system/core/Progress';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/progress-multi-step.json`.
## Usage
```jsx
import Progress from '@gaudi/design-system/core/Progress';
```
## Examples
### Multi-step
Registry: `npx shadcn@latest add https://design.gaudi.site/r/progress-multi-step.json`
### Sizes and colors
Registry: `npx shadcn@latest add https://design.gaudi.site/r/progress-sizes-colors.json`
### Status messages
Registry: `npx shadcn@latest add https://design.gaudi.site/r/progress-status-messages.json`
### File upload list
Registry: `npx shadcn@latest add https://design.gaudi.site/r/progress-upload-list.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | `string` | — | no | Accessible name of the progress indicator. |
| `value` | `number` | — | no | Completed amount; omit for indeterminate progress. |
| `max` | `number` | `100` | no | Total amount. |
| `valueText` | `string` | — | no | Human-readable progress such as 3 of 8 files. |
| `tone` | `accent \| success \| warning \| danger` | `accent` | no | Status color. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `tone`: `accent`, `success`, `warning`, `danger`
## Accessibility
Provide a task label and meaningful value text. Avoid announcing every small progress update.
## Related
- [Item](https://design.gaudi.site/docs/components/item): Flexible rows for people, settings, integrations, navigation and activity lists, composed from media, text, actions and optional header and footer rows.
- [Slider](https://design.gaudi.site/docs/components/slider): Adjust one value or a range with pointer and keyboard input.
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
Source: https://design.gaudi.site/docs/components/progress (Markdown with example code: https://design.gaudi.site/docs/components/progress.md)
---
# RadioGroup
> Choose one option using native radio controls or selectable cards.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/RadioGroup` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/RadioGroup/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-radiogroup--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import RadioGroup from '@gaudi/design-system/core/RadioGroup';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/radio-group-corner-cards.json`.
## Usage
```jsx
import RadioGroup from '@gaudi/design-system/core/RadioGroup';
```
## Examples
### Corner-radio cards
Registry: `npx shadcn@latest add https://design.gaudi.site/r/radio-group-corner-cards.json`
### Fieldset, descriptions and states
Registry: `npx shadcn@latest add https://design.gaudi.site/r/radio-group-fieldset-states.json`
### Framed lists
Registry: `npx shadcn@latest add https://design.gaudi.site/r/radio-group-framed-lists.json`
### Label extras and layouts
Registry: `npx shadcn@latest add https://design.gaudi.site/r/radio-group-label-extras.json`
### Row cards
Registry: `npx shadcn@latest add https://design.gaudi.site/r/radio-group-row-cards.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `label / description` | `ReactNode` | — | no | Legend and supporting instructions. |
| `options` | `Array<{ value, label, description?, disabled? }>` | `[]` | no | Mutually exclusive choices. |
| `value / defaultValue / onValueChange` | `string / function` | — | no | Controlled or initial selected value. |
| `name` | `string` | `Generated ID` | no | Shared form field name. |
| `disabled / required` | `boolean` | — | no | Native form constraints. |
| `variant` | `list \| cards` | `list` | no | Choice layout. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `variant`: `list`, `cards`
## Accessibility
Native radios provide Arrow-key navigation and form submission. Keep the legend and option labels descriptive.
## Related
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Separator](https://design.gaudi.site/docs/components/separator): Separate related content with a horizontal or vertical rule.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
Source: https://design.gaudi.site/docs/components/radio-group (Markdown with example code: https://design.gaudi.site/docs/components/radio-group.md)
---
# ReadingIndicator
> Reading progress as a classic top bar, a vertical ruler with a moving percentage, or a movable circular meter.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/ReadingIndicator` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/ReadingIndicator/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-readingindicator--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { ReadingIndicator } from '@gaudi/design-system/core/ReadingIndicator';
```
## Usage
```jsx
import { ReadingIndicator } from '@gaudi/design-system/core/ReadingIndicator';
// Render once near the page root.
```
## Examples
Examples (rendered from Storybook):
- [Playground](https://storybook.gaudi.site/index.html?path=/story/core-readingindicator--playground)
- [Bar, ruler and ring](https://storybook.gaudi.site/index.html?path=/story/core-readingindicator--styles)
- [Article range](https://storybook.gaudi.site/index.html?path=/story/core-readingindicator--article)
- [Top of page](https://storybook.gaudi.site/index.html?path=/story/core-readingindicator--page)
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `variant` | `bar \| ruler \| ring` | `bar` | no | A thin horizontal bar, a vertical tick scale, or a compact circular meter. |
| `position` | `fixed \| absolute \| inline` | `fixed` | no | Fixed to the viewport, anchored inside a positioned parent, or placed in normal layout. Bar sits at the top; ruler at the end edge; ring at the bottom end. |
| `targetRef` | `Ref` | `window` | no | Ref to a scrolling element or a Gaudi ScrollArea root. Omit to track the document. |
| `contentRef` | `Ref` | `whole scroll range` | no | Optional article inside the scroll target. Starts when its top reaches the viewport top; finishes when its bottom comes into view. |
| `value` | `number (0–100)` | `automatic` | no | Supply an external reading percentage to bypass scroll tracking. Clamped to 0–100; non-finite values become 0. |
| `tone` | `accent \| neutral` | `accent` | no | Accent or foreground marks, adapted to the current theme. |
| `showValue` | `boolean` | `false for bar; true otherwise` | no | Shows the percentage next to the indicator. |
| `label` | `string` | `Reading progress` | no | Accessible name for the progressbar. aria-labelledby can name it from an existing heading. |
| `draggable` | `boolean` | `false` | no | Adds a movement handle to a fixed or absolute ring. Arrow keys move it; Home or Escape resets it. |
| `dragBoundsRef` | `Ref` | `viewport` | no | Constrains the movable ring to this container. Set it for a ring positioned inside a panel. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `variant`: `bar`, `ruler`, `ring`
- `position`: `fixed`, `absolute`, `inline`
- `tone`: `accent`, `neutral`
## Accessibility
Exposes a named progressbar without live announcements on every scroll. The indicator does not capture scrolling or text selection; only the optional ring handle receives input. Reduced motion removes the number transition. Progress measures scroll position, not comprehension.
## Notes
- Resizes and content growth are measured automatically. A non-scrollable document is complete (100%); an unresolved target starts at 0%.
- Reserve a side gutter for the ruler and room for the ring so they do not cover reading text. Set style.top to place a fixed bar below a site header. For a top bar with no extra configuration, render once in the page.
- The ruler and ring are independently implemented interpretations of the Skiper UI scroll progress references; no remote assets or registry code are loaded.
## Related
- [Progress](https://design.gaudi.site/docs/components/progress): Determinate and indeterminate progress with a readable task label.
- [ScrollArea](https://design.gaudi.site/docs/components/scroll-area): Contained scrolling with themed scrollbars and optional smooth wheel motion for article reading.
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
Source: https://design.gaudi.site/docs/components/reading-indicator (Markdown with example code: https://design.gaudi.site/docs/components/reading-indicator.md)
---
# Select
> Select renders a styled option picker with searchable combobox behavior and multi-select support.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Select` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Select/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-select--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Select from '@gaudi/design-system/core/Select';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/autocomplete-async-search.json`.
## Usage
```jsx
import { Select } from '@gaudi/design-system';
```
## Examples
### Async search results
Registry: `npx shadcn@latest add https://design.gaudi.site/r/autocomplete-async-search.json`
### Autocomplete in a form
Registry: `npx shadcn@latest add https://design.gaudi.site/r/autocomplete-in-form.json`
### Input options
Registry: `npx shadcn@latest add https://design.gaudi.site/r/autocomplete-input-options.json`
### Grouped people search
Registry: `npx shadcn@latest add https://design.gaudi.site/r/autocomplete-people-search.json`
### Date presets with a custom picker
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-date-presets.json`
### Grouped options
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-grouped.json`
### Combobox inside a dialog
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-in-dialog.json`
### Combobox in a form
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-in-form.json`
### Input options
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-input-options.json`
### Member tags
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-member-tags.json`
### Multiple selection with chips
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-multiple-chips.json`
### Property pickers
Registry: `npx shadcn@latest add https://design.gaudi.site/r/combobox-property-pickers.json`
### Native select fields
Registry: `npx shadcn@latest add https://design.gaudi.site/r/native-select-fields.json`
### Clearable select
Registry: `npx shadcn@latest add https://design.gaudi.site/r/select-clearable.json`
### Options with descriptions
Registry: `npx shadcn@latest add https://design.gaudi.site/r/select-descriptions.json`
### Form fields and states
Registry: `npx shadcn@latest add https://design.gaudi.site/r/select-form-states.json`
### Grouped options
Registry: `npx shadcn@latest add https://design.gaudi.site/r/select-grouped.json`
### Select inside a dialog
Registry: `npx shadcn@latest add https://design.gaudi.site/r/select-in-dialog.json`
### Rich option content
Registry: `npx shadcn@latest add https://design.gaudi.site/r/select-rich-options.json`
### Select in a toolbar
Registry: `npx shadcn@latest add https://design.gaudi.site/r/select-toolbar.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `options` | `Array<{ label, value, disabled }>` | `[]` | no | Selectable options. Option children are also normalized when options is empty. |
| `value` | `string \| string[]` | — | no | Controlled selected value. Arrays are used for multiple mode. |
| `defaultValue` | `string \| string[]` | — | no | Initial uncontrolled selected value. |
| `onValueChange` | `(value, option) => void` | — | no | Called when selection changes. |
| `multiple` | `boolean` | `false` | no | Allows selecting more than one option. |
| `searchable` | `boolean` | `false` | no | Shows a search field inside the popup and filters options. |
| `placeholder` | `string` | `Select option` | no | Trigger placeholder when nothing is selected. |
| `searchPlaceholder` | `string` | `Search options...` | no | Search input placeholder. |
| `emptyText` | `string` | `No options found.` | no | Empty result text. |
| `defaultOpen` | `boolean` | `false` | no | Initial open state for demos or controlled-looking examples. |
| `disabled` | `boolean` | `false` | no | Disables the trigger. |
| `invalid` | `boolean` | `false` | no | Applies aria-invalid and error styling. |
| `name` | `string` | — | no | Renders hidden form inputs for selected values. |
| `aria-label` | `string` | — | no | Accessible label for icon-only or unlabeled select controls. |
| `children` | `ReactNode` | — | no | Option children normalized when options is empty. |
| `className` | `string` | — | no | Root class override. |
| `classNames` | `{ root, trigger, value, placeholder, chevron, popup, search, option, check, empty }` | — | no | Slot-level class overrides. |
## Accessibility
Select uses a native button trigger, listbox semantics, aria-expanded, aria-selected, aria-multiselectable for multi-select, and keyboard support for Arrow keys, Enter, Space, Home, End, and Escape.
## Related
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [Dialog](https://design.gaudi.site/docs/components/dialog): Modal, confirmation and bare full-screen dialogs for editing, detail inspection, explicit decisions, lightboxes and launchers.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Item](https://design.gaudi.site/docs/components/item): Flexible rows for people, settings, integrations, navigation and activity lists, composed from media, text, actions and optional header and footer rows.
- [Toast](https://design.gaudi.site/docs/components/toast): Transient feedback for completed actions, errors and recoverable background work.
- [Banner](https://design.gaudi.site/docs/components/banner): Banner renders a compact announcement strip.
Source: https://design.gaudi.site/docs/components/select (Markdown with example code: https://design.gaudi.site/docs/components/select.md)
---
# Separator
> Separate related content with a horizontal or vertical rule.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Separator` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Separator/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-separator--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Separator } from '@gaudi/design-system/core/Separator';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/separator-horizontal.json`.
## Usage
```jsx
import { Separator } from '@gaudi/design-system/core/Separator';
```
## Examples
### Horizontal rules
Registry: `npx shadcn@latest add https://design.gaudi.site/r/separator-horizontal.json`
### Text label
Registry: `npx shadcn@latest add https://design.gaudi.site/r/separator-text-label.json`
### Vertical rules
Registry: `npx shadcn@latest add https://design.gaudi.site/r/separator-vertical.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `orientation` | `horizontal \| vertical` | `horizontal` | no | Direction of the rule. |
| `decorative` | `boolean` | `true` | no | Keep visual-only separators out of the accessibility tree. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `orientation`: `horizontal`, `vertical`
## Accessibility
Set decorative={false} only when the separator conveys meaningful structure.
## Related
- [Direction](https://design.gaudi.site/docs/components/direction): Scopes text direction for Gaudi controls that need directional keyboard and placement behavior.
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
Source: https://design.gaudi.site/docs/components/separator (Markdown with example code: https://design.gaudi.site/docs/components/separator.md)
---
# Slider
> Adjust one value or a range with pointer and keyboard input.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Slider` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Slider/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-slider--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Slider } from '@gaudi/design-system/core/Slider';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/slider-number-sync.json`.
## Usage
```jsx
import { Slider } from '@gaudi/design-system/core/Slider';
```
## Examples
### Paired with a number field
Registry: `npx shadcn@latest add https://design.gaudi.site/r/slider-number-sync.json`
### Custom readouts
Registry: `npx shadcn@latest add https://design.gaudi.site/r/slider-readouts.json`
### Scale labels and ticks
Registry: `npx shadcn@latest add https://design.gaudi.site/r/slider-scale-ticks.json`
### Thumbs and states
Registry: `npx shadcn@latest add https://design.gaudi.site/r/slider-thumbs-states.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `getValueText` | `(value, index) => string` | — | no | Text a thumb announces instead of the number, such as a level name; use it with a controlled value. |
| `value / defaultValue` | `number[]` | — | no | Controlled or initial thumb positions. |
| `onValueChange / onValueCommit` | `(values: number[]) => void` | — | no | Continuous updates or the committed selection. |
| `min / max` | `number` | `0 / 100` | no | Allowed range. |
| `step` | `number` | `1` | no | Keyboard and pointer increment. |
| `orientation` | `horizontal \| vertical` | `horizontal` | no | Control orientation. |
| `disabled` | `boolean` | `false` | no | Prevent adjustment. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `orientation`: `horizontal`, `vertical`
## Accessibility
Label every thumb and provide a readable value. Use range examples when the two endpoints have different meanings.
## Related
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [NumberField](https://design.gaudi.site/docs/components/number-field): Numeric entry with increment buttons, bounds, locale formatting and scrubbing.
- [AspectRatio](https://design.gaudi.site/docs/components/aspect-ratio): Keep media at a stable aspect ratio as its container resizes.
- [Avatar](https://design.gaudi.site/docs/components/avatar): Profile images, resilient initials, presence, verification, account menus and collaborator groups.
- [Button](https://design.gaudi.site/docs/components/button): Button renders the Gaudi action and link-button variants.
- [ButtonGroup](https://design.gaudi.site/docs/components/button-group): Group related actions with joined borders and consistent sizing.
Source: https://design.gaudi.site/docs/components/slider (Markdown with example code: https://design.gaudi.site/docs/components/slider.md)
---
# Switch
> Switch renders a token-styled boolean preference control.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Switch` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Switch/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-switch--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Switch from '@gaudi/design-system/core/Switch';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/switch-card-grid.json`.
## Usage
```jsx
import { Switch } from '@gaudi/design-system';
```
## Examples
### Card grid with descriptions
Registry: `npx shadcn@latest add https://design.gaudi.site/r/switch-card-grid.json`
### Colours and destructive settings
Registry: `npx shadcn@latest add https://design.gaudi.site/r/switch-colours-destructive.json`
### Labels and states
Registry: `npx shadcn@latest add https://design.gaudi.site/r/switch-labels-states.json`
### Settings panel
Registry: `npx shadcn@latest add https://design.gaudi.site/r/switch-settings-panel.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | `string` | `generated id` | no | Connects the switch to its visible label. |
| `label` | `ReactNode` | — | no | Visible label text. |
| `checked` | `boolean` | — | no | Controlled checked state. |
| `defaultChecked` | `boolean` | `false` | no | Initial checked state for uncontrolled usage. |
| `size` | `sm \| md \| lg` | `md` | no | Controls track, thumb, and label scale. |
| `disabled` | `boolean` | `false` | no | Prevents changes and lowers visual emphasis. |
| `onCheckedChange` | `(checked) => void` | — | no | Called with the next checked state. |
| `className` | `string` | — | no | Root class override. |
### Variants
- `size`: `sm`, `md`, `lg`
## Accessibility
Switch exposes role switch, aria-checked, disabled state, and a visible label when provided.
## Related
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [Tooltip](https://design.gaudi.site/docs/components/tooltip): Brief contextual help attached to an independently labelled control.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
- [Separator](https://design.gaudi.site/docs/components/separator): Separate related content with a horizontal or vertical rule.
Source: https://design.gaudi.site/docs/components/switch (Markdown with example code: https://design.gaudi.site/docs/components/switch.md)
---
# Tabs
> Switch between related panels with keyboard-accessible tab controls.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Tabs` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Tabs/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-tabs--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import { Tabs } from '@gaudi/design-system/core/Tabs';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/tabs-badge-counts.json`.
## Usage
```jsx
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@gaudi/design-system/core/Tabs';
OverviewActivity{overview}{activity}
```
## Examples
### Badge counts
Registry: `npx shadcn@latest add https://design.gaudi.site/r/tabs-badge-counts.json`
### Period switch
Registry: `npx shadcn@latest add https://design.gaudi.site/r/tabs-period-switch.json`
### Settings form tabs
Registry: `npx shadcn@latest add https://design.gaudi.site/r/tabs-settings-form.json`
## API
| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `value / defaultValue / onValueChange` | `string / function` | — | no | Controlled or initial active tab. |
| `orientation` | `horizontal \| vertical` | `horizontal` | no | Visual layout and keyboard direction. |
| `activationMode` | `automatic \| manual` | `automatic` | no | Whether focus also activates a tab. |
| `TabsList.variant` | `underline \| outline \| type` | `underline` | no | How the active tab is marked: a short underline, a fine outline, or weight alone. default and line still map to underline. |
| `TabsList.tone` | `neutral \| accent \| info \| success \| warning \| danger \| discovery \| attention` | `neutral` | no | Colour of the underline or outline marker; neutral follows the text colour. |
| `TabsTrigger.value / TabsContent.value` | `string` | `Required` | no | Matching identity for the trigger and panel. |
| `TabsTrigger.disabled` | `boolean` | `false` | no | Exclude an unavailable tab from navigation. |
| `children` | `ReactNode` | — | no | Content composed from the exported parts. |
| `className` | `string` | — | no | Additional classes on the outer element. |
### Variants
- `orientation`: `horizontal`, `vertical`
- `activationMode`: `automatic`, `manual`
## Accessibility
Radix associates tabs and panels. Label the tab list; use manual activation when loading panels is expensive.
## Related
- [Switch](https://design.gaudi.site/docs/components/switch): Switch renders a token-styled boolean preference control.
- [Card](https://design.gaudi.site/docs/components/card): Card frames reusable content with title, subtitle, and optional children.
- [Field](https://design.gaudi.site/docs/components/field): Field composes form label, description, error, and input building blocks.
- [Pill](https://design.gaudi.site/docs/components/pill): Pill renders compact category and status labels.
- [Input](https://design.gaudi.site/docs/components/input): Text, search, numeric and date inputs with prefix and suffix slots.
Source: https://design.gaudi.site/docs/components/tabs (Markdown with example code: https://design.gaudi.site/docs/components/tabs.md)
---
# Textarea
> Multiline text entry that composes with the same labels and errors as Input.
- Category: Core · Basics
- Import: `@gaudi/design-system/core/Textarea` (also `@gaudi/design-system/core`)
- Source: https://github.com/ahmadassaf/design-system/tree/main/src/components/core/Textarea/
- Storybook: https://storybook.gaudi.site/index.html?path=/docs/core-textarea--docs
## Installation
```bash
pnpm add github:ahmadassaf/design-system
```
Import from `@gaudi/design-system`. Load `@gaudi/design-system/global.css` once and add `transpilePackages: ['@gaudi/design-system']` in Next.js.
```jsx
import Textarea from '@gaudi/design-system/core/Textarea';
```
Copy an example into your project with the shadcn CLI: `npx shadcn@latest add https://design.gaudi.site/r/textarea-auto-resize.json`.
## Usage
```jsx
import Textarea from '@gaudi/design-system/core/Textarea';