# Gelatin UI: every item > Free and pro React components and blocks, ready for the shadcn registry. # Button > A button for an action on the page, such as Save or Delete. It has 9 looks and 5 sizes, and a spinner that keeps its width while the action runs. Page: https://gelatinui.com/components/button ## When to use it Best for: An action on the page, such as Save, Send, or Delete, with a busy state that keeps its width. - Use it for an action on the page: submit, save, open, delete. - Set `busy` while the action runs. With the default `spinnerPlacement`, the button keeps its width and focus. - Use an icon size (`icon`, `icon-sm`) for an action with only an icon, and give it an `aria-label`. ## When not to use it - To go to another page, use a link, not a button. Put `buttonVariants` on the link to give it the look of a button. - For a value that stays on or off, use a [Switch](https://gelatinui.com/components/switch.md). ## Notes for agents - Button renders a native ` ); } ``` ## Compose Build it with: - [Sidebar](https://gelatinui.com/components/sidebar.md): Moves between the settings sections. - [Frame](https://gelatinui.com/components/frame.md): Groups the fields of one section, with Save in its footer. - [Field](https://gelatinui.com/components/field.md): Names each control and shows its help or error text. - [Switch](https://gelatinui.com/components/switch.md): Turns one setting on or off at once. - [Select](https://gelatinui.com/components/select.md): Picks one value from a short list. - [Toast](https://gelatinui.com/components/toast.md): Confirms the save. - [Form](https://gelatinui.com/components/form.md): Owns the submit and the errors. - [Input](https://gelatinui.com/components/input.md): Takes short text. Rules: - Group with a Frame (`group-in-frames`): Put related panels in one `Frame` with its header and footer outside the panels, and keep a plain `Card` for one block of content. - Name every control (`label-every-control`): Give every field a visible `Label` (or a `Field`), and every icon button a `Tooltip` or an `aria-label`. - Labels real apps use (`real-labels`): Write the button and menu labels that real apps use ("Create API key", "Invite members"), with no "…" at the end. - No layout jump (`no-layout-jump`): When a state change adds, removes, or resizes content, reserve its space or animate its size, so nothing below it jumps. Patterns: `gelatin://patterns/settings-page`, `gelatin://patterns/form-flow`, `gelatin://patterns/confirm-action` ## Add it ```bash npx shadcn@latest add @gelatin-ui/button ``` It adds 8 registry items: 5 files, 1351 lines, and the npm packages `@base-ui/react`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Spinner](https://gelatinui.com/components/spinner.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Copy Button](https://gelatinui.com/components/copy-button.md) - [Spinner](https://gelatinui.com/components/spinner.md) - [Alert Dialog](https://gelatinui.com/components/alert-dialog.md) ## Keyboard | Keys | Action | | --- | --- | | Enter | Presses the button. | | Space | Presses the button. | ## Accessibility Button is a Base UI `Button`, a native ` }> Tomorrow morning Monday morning ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/button-group ``` It adds 6 registry items: 4 files, 592 lines, and the npm packages `@base-ui/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Separator](https://gelatinui.com/components/separator.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Animated Sparkles Icon](https://gelatinui.com/components/animated-sparkles-icon.md) - [Animated Arrow Icon](https://gelatinui.com/components/animated-arrow-icon.md) - [Separator](https://gelatinui.com/components/separator.md) - [Button](https://gelatinui.com/components/button.md) --- # Copy Button > A button that copies a value, such as a key or a link, with one press. Its icon turns into a check for 2 seconds, or a cross when the copy fails. Page: https://gelatinui.com/components/copy-button ## When to use it Best for: A value that people paste somewhere else: an API key, a link, or a command. - Use it next to a value that people paste somewhere else: a key, a link, a command. - Use `getValue` for a value that comes from the server. The button shows a spinner while it waits. - With text children ("Copy link") the icon takes the leading slot, and the width stays the same. ## When not to use it - For an action that does not copy, use a [Button](https://gelatinui.com/components/button.md). ## Notes for agents - Pass the text in `value`, or an async `getValue` for a value from the server. - After a press, the icon shows a check or an X for 2 seconds, then comes back. ## Anatomy ```text CopyButton ``` ## API reference ### CopyButton | Prop | Type | Default | Description | | --- | --- | --- | --- | | `aria-label` | `string` | | Defines a string value that labels the current element. The name of the button. An icon-only button defaults to "Copy"; one with text uses its text. | | `className` | `string` | | | | `busy` | `boolean` | false | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. | | `spinnerPlacement` | `"center" \| "start"` | "start" | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. | | `glass` | `"clear" \| "dark" \| "light"` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "icon" \| "icon-lg" \| "icon-sm" \| "icon-xs" \| "lg" \| "sm" \| "xl" \| "xs"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | "ghost" | | | `value` | `string` | | The text to copy. An empty value with no `getValue` disables the button. | | `getValue` | `function` | | Gets the text at press time: a value that is costly to build, or that comes from the server (a new token). While its promise runs, the button shows the Button spinner (`pending`). | | `timeout` | `number` | 2000 | How long the result (check or X) shows, in ms. Default 2000. | | `onCopy` | `function` | | Runs after the clipboard has the text, with the text. | | `onCopyError` | `function` | | Runs when the copy fails: no Clipboard API, the browser refused, or `getValue` failed. | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | CopyButton | `copy-button` | | | | ## Usage Pass the text in `value`, or use `getValue` for text from the server. Give an icon-only button a `label` that names the value. ```tsx title="api-key-row.tsx" import { CopyButton } from "@/components/ui/copy-button"; export function ApiKeyRow({ apiKey }: { apiKey: string }) { return (
{apiKey}
); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/copy-button ``` It adds 27 registry items: 24 files, 3936 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`, `xstate`. ## Built on - [Animated Copy Icon](https://gelatinui.com/components/animated-copy-icon.md) - [Button](https://gelatinui.com/components/button.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Button](https://gelatinui.com/components/button.md) - [Animated Copy Icon](https://gelatinui.com/components/animated-copy-icon.md) - [QR Code](https://gelatinui.com/components/qr-code.md) ## Keyboard | Keys | Action | | --- | --- | | Enter | Copies the value. | | Space | Copies the value. | ## Accessibility Copy Button is a Button, so it renders a ` ); } ``` ## Compose Build it with: - [Form](https://gelatinui.com/components/form.md): Owns the submit and the errors. - [Field](https://gelatinui.com/components/field.md): Names each control and shows its error text. - [Input](https://gelatinui.com/components/input.md): Takes short text. - [Textarea](https://gelatinui.com/components/textarea.md): Takes long text. - [Stepper](https://gelatinui.com/components/stepper.md): Shows the steps of a long form. - [Dialog](https://gelatinui.com/components/dialog.md): Holds a short form over the page. - [Button](https://gelatinui.com/components/button.md): Submits or moves to the next step. Rules: - Name every control (`label-every-control`): Give every field a visible `Label` (or a `Field`), and every icon button a `Tooltip` or an `aria-label`. - Labels real apps use (`real-labels`): Write the button and menu labels that real apps use ("Create API key", "Invite members"), with no "…" at the end. - No layout jump (`no-layout-jump`): When a state change adds, removes, or resizes content, reserve its space or animate its size, so nothing below it jumps. - Touch targets (`touch-targets`): Give every control a hit area of at least 44 px on touch screens, even when it looks smaller. Patterns: `gelatin://patterns/form-flow` ## Add it ```bash npx shadcn@latest add @gelatin-ui/alert ``` It adds 7 registry items: 4 files, 1170 lines, and the npm packages `clsx`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Toast](https://gelatinui.com/components/toast.md): Pick Toast for a short note after an action that stacks in a corner and closes on its own. - [Alert Dialog](https://gelatinui.com/components/alert-dialog.md): Pick Alert Dialog to ask a yes or no question before an action, in a window that blocks the page. - [Badge](https://gelatinui.com/components/badge.md) - [Announcement Bar](https://gelatinui.com/components/announcement-bar.md): Pick Announcement Bar for one site-wide message across the top of the page, such as news or an offer. ## Accessibility Alert is a `
` with `role="alert"`. A screen reader reads it at once when it shows, and stops what it reads. Pass `role="status"` for a message that is not urgent: the screen reader waits until the user is idle. Pass `role="none"` for a note that is in the page from the start. The variant changes only colors. Put the meaning in the words of `AlertTitle` and `AlertDescription`, so the message does not depend on color. The alert takes no focus and does not close on its own. A Button in `AlertAction` stays in the normal tab order. --- # Announcement > A small rounded link above a hero headline that points to news, such as a launch post. A light can run around its border for a big launch. Page: https://gelatinui.com/components/announcement ## When to use it Best for: A small link above a hero headline that points to one piece of news. - Put it above the headline of a landing page or a docs home. - Use `beam` or `shine` for a big launch, and `outline` for a quiet one. - Pass a router link through `render`, or a `
` for a pill with no link. ## When not to use it - For a bar across the top of every page, use the [Announcement Bar](https://gelatinui.com/components/announcement-bar.md). - For a short status word on an item, use a [Badge](https://gelatinui.com/components/badge.md). ## Notes for agents - The root is one ``. Compose `AnnouncementTag`, `AnnouncementTitle`, `AnnouncementSeparator`, and `AnnouncementArrow` in it. - `loopDuration` sets the seconds of one loop of the `beam` or the `shine`. - The light loops stop off screen and in a hidden tab. - A long title cuts with an ellipsis. The tag and the arrow keep their size. ## Anatomy ```text Announcement ├─ AnnouncementTag (0..n) ├─ AnnouncementTitle (0..n) ├─ AnnouncementSeparator (0..n) └─ AnnouncementArrow (0..n) ``` ## API reference ### Announcement | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"default" \| "lg" \| "sm"` | "default" | | | `variant` | `"beam" \| "inverse" \| "outline" \| "secondary" \| "shine"` | "outline" | | | `loopDuration` | `number` | 4 | Seconds of one loop of the light: one lap of the `beam`, one cycle of the `shine` (the band crosses in the first 30%, then waits). | Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ### AnnouncementTag | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"dashed" \| "default" \| "destructive" \| "ghost" \| "info" \| "link" \| "media" \| "outline" \| "secondary" \| "success" \| "warning"` | | | Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ### AnnouncementTitle No props of its own: `className`, `children`, and every other prop go to the element it renders. ### AnnouncementSeparator No props of its own: `className`, `children`, and every other prop go to the element it renders. ### AnnouncementArrow | Prop | Type | Default | Description | | --- | --- | --- | --- | | `alt` | `string` | | | | `color` | `string` | | | | `weight` | `IconWeight` | | | | `mirrored` | `boolean` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Announcement | `announcement` | `data-stage-hover` | `--foreground` | `hit-area`, `motion-timing` | | AnnouncementTag | `announcement-tag` | | | | | AnnouncementTitle | `announcement-title` | | | | | AnnouncementSeparator | `announcement-separator` | | | | | AnnouncementArrow | `announcement-arrow` | | | | ## Usage Import Announcement and compose its parts. ```tsx title="announcement.tsx" import { AnnouncementArrow, AnnouncementSeparator, AnnouncementTitle, AnnouncementTag, Announcement } from "@/components/effects/announcement"; export function AnnouncementDemo() { return ( New Charts 2.0 — 32 chart types on one engine ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/announcement ``` It adds 20 registry items: 17 files, 2842 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Badge](https://gelatinui.com/components/badge.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Announcement Bar](https://gelatinui.com/components/announcement-bar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Button](https://gelatinui.com/components/button.md) ## Keyboard | Keys | Action | | --- | --- | | Tab | Moves to the pill. | | Enter | Opens the link. | ## Motion | Part | Motion | | --- | --- | | Arrow | hover · the arrow moves 2px to the end | | Beam and shine | none · one loop of `loopDuration` seconds (4 by default), not a motion token | --- # Announcement Bar > A bar across the top of a site for news, offers, and outages. Visitors can close it, and it can count down or rotate several messages. Page: https://gelatinui.com/components/announcement-bar ## When to use it Best for: One message across the top of a site that a visitor can close, with a link, a countdown, or a rotator. - Put it above the site header, so it shows on every page. - Set `dismissKey` to keep a closed bar closed after a reload and in other tabs. - Use a status `variant` (`info`, `success`, `warning`, `destructive`) for an incident or a fix. ## When not to use it - For a small link above a hero headline, use an [Announcement](https://gelatinui.com/components/announcement.md). - For a message about one part of a page, use an [Alert](https://gelatinui.com/components/alert.md). ## Notes for agents - Compose the parts: an icon, `AnnouncementBarBadge`, `AnnouncementBarTitle`, `AnnouncementBarDescription`, `AnnouncementBarAction`, and `AnnouncementBarClose`. - `AnnouncementBarCountdown` takes `to`; `dismissOnComplete` closes the bar when the time is up. - `AnnouncementBarRotator` holds `AnnouncementBarItem` children and turns every 5s. It holds on hover and on focus. - `stretched` on the action makes the whole bar the link. - It is a `
` with the name Announcement. Change it with `aria-label`. ## Anatomy ```text AnnouncementBar ├─ AnnouncementBarBadge (0..n) ├─ AnnouncementBarTitle (0..n) ├─ AnnouncementBarDescription (0..n) ├─ AnnouncementBarAction (0..n) ├─ AnnouncementBarClose (0..n) ├─ AnnouncementBarCountdown (0..n) ├─ AnnouncementBarRotator (0..n) └─ AnnouncementBarItem (0..n) ``` ## API reference ### AnnouncementBar | Prop | Type | Default | Description | | --- | --- | --- | --- | | `aria-label` | `string` | | Defines a string value that labels the current element. The name of the region for screen readers. Default "Announcement". Translate it. | | `nonce` | `string` | | The CSP nonce of the page, for the inline script that hides a stored dismiss before the first paint (`dismissKey`). Pass it when your Content Security Policy allows scripts by nonce, as the `nonce` of next-themes. | | `align` | `"center" \| "start"` | "center" | | | `size` | `"default" \| "lg" \| "sm"` | "default" | | | `sticky` | `boolean` | false | | | `variant` | `"default" \| "destructive" \| "info" \| "inverse" \| "muted" \| "success" \| "warning"` | "default" | | | `ref` | `Ref` | | The region element (`
`). | | `dismissKey` | `string` | | Remembers a dismiss in `localStorage` under this key, so the bar stays closed on the next visit and in other tabs. Use a new key for a new message (`"launch-2026-11"`). A controlled bar (`open`) does not read it: the page decides. | | `defaultOpen` | `boolean` | true | Whether the bar shows at first. | | `onOpenChange` | `function` | | Called when the bar opens or closes (`false` after a dismiss). | | `className` | `string` | | Classes for the bar, the part that you see. | | `labels` | `Partial` | | The words of the parts (`ANNOUNCEMENT_BAR_LABELS`). Translate them. Keep the object stable. | Also takes every prop of Base UI `Collapsible.Root`: https://base-ui.com/react/components/collapsible ### AnnouncementBarBadge No props of its own: `className`, `children`, and every other prop go to the element it renders. ### AnnouncementBarTitle No props of its own: `className`, `children`, and every other prop go to the element it renders. ### AnnouncementBarDescription No props of its own: `className`, `children`, and every other prop go to the element it renders. ### AnnouncementBarAction | Prop | Type | Default | Description | | --- | --- | --- | --- | | `arrow` | `boolean` | true | Show the arrow after the text. It moves 2px on hover and points the other way in RTL. | | `stretched` | `boolean` | false | Make the whole bar the link (a `::after` over the bar). Use it when the action is the only link; the close button stays on top. | Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ### AnnouncementBarClose | Prop | Type | Default | Description | | --- | --- | --- | --- | | `label` | `string` | "Dismiss announcement" | The name of the button for screen readers. Translate it. | ### AnnouncementBarCountdown | Prop | Type | Default | Description | | --- | --- | --- | --- | | `to` | `string \| number \| Date` | | The end: a `Date`, a time in ms, or a date string (`"2026-11-30T23:59:00Z"`). | | `locale` | `LocalesArgument` | | The language of the units ("2d 04h", "2j 04h") and of the default `label`. The browser language by default, which can differ from the page: pass the page language. | | `label` | `function` | defaultCountdownLabel | The name for screen readers, from the end date. Translate it. | | `onComplete` | `function` | | Called once when the time is up (also when the end is already past). | | `dismissOnComplete` | `boolean` | false | Close the bar when the time is up (and remember it with `dismissKey`). | ### AnnouncementBarRotator | Prop | Type | Default | Description | | --- | --- | --- | --- | | `interval` | `number` | 5000 | Time on each message in ms. 0 turns the rotation off. | | `index` | `number` | | The message that shows (controlled). A turn or a button press calls `onIndexChange`. | | `defaultIndex` | `number` | 0 | The message that shows first (uncontrolled). | | `onIndexChange` | `function` | | Called when another message shows. | | `controls` | `boolean` | true | Show the previous and next buttons. | | `label` | `string` | "Announcements" | The names for screen readers. Translate them. | | `slideLabel` | `function` | defaultSlideLabel | | ### AnnouncementBarItem No props of its own: `className`, `children`, and every other prop go to the element it renders. ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | AnnouncementBar | `announcement-bar` | `data-active`, `data-animate` | `--radius` | `hit-area`, `motion-timing` | | AnnouncementBarBadge | `announcement-bar-badge` | | | | | AnnouncementBarTitle | `announcement-bar-title` | | | | | AnnouncementBarDescription | `announcement-bar-description` | | | | | AnnouncementBarAction | `announcement-bar-action` | | | | | AnnouncementBarClose | `announcement-bar-close` | | | | | AnnouncementBarCountdown | `announcement-bar-countdown` | | | | | AnnouncementBarRotator | `announcement-bar-rotator` | | | | | AnnouncementBarItem | `announcement-bar-item` | | | | ## Usage Put a title, an action link, and a close button in the bar, so people read the news and can hide it. ```tsx title="launch-bar.tsx" import { AnnouncementBar, AnnouncementBarAction, AnnouncementBarBadge, AnnouncementBarClose, AnnouncementBarTitle, } from "@/components/layout/announcement-bar"; export function LaunchBar() { return ( New Lumen 3.0: shared dashboards for every team Read the launch post ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/announcement-bar ``` It adds 40 registry items: 37 files, 6210 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`, `xstate`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Announcement](https://gelatinui.com/components/announcement.md) - [Alert](https://gelatinui.com/components/alert.md): Pick Alert for a message about one part of a page, such as an error in a form. - [Countdown](https://gelatinui.com/components/countdown.md) ## Keyboard | Keys | Action | | --- | --- | | Tab | Moves to the action, the rotator buttons, and the close button. | | Enter | Opens the action link, or closes the bar from the close button. | ## Motion | Part | Motion | | --- | --- | | Close | panel · the bar height closes in 260ms, so the page slides up | | Rotator | fade · the old message fades out in 100ms, then the new one fades in over 150ms | --- # Circular Meter > A small ring or half gauge that shows one measured value, such as used storage. It changes color when the value reaches a warning or critical level. Page: https://gelatinui.com/components/circular-meter ## When to use it Best for: One measured value at rest in a small ring or half gauge, such as storage or a quota. - Use `low`, `high`, and `optimum` for warning and critical levels. - Use `segments` for a count of units. ## When not to use it - For work that moves to an end, use a [Circular Progress](https://gelatinui.com/components/circular-progress.md). - For the same value as a straight bar, use a [Meter](https://gelatinui.com/components/meter.md). ## Notes for agents - `optimum` keeps the ink fill, `suboptimum` is `warning`, `critical` is `destructive`. - It shares the ring, parts, sizes, and variants of Circular Progress. - Name it with `CircularMeterLabel` or `aria-label`. ## Anatomy ```text CircularMeter ├─ CircularMeterTrack (0..n) ├─ CircularMeterIndicator (0..n) ├─ CircularMeterValue (0..n) └─ CircularMeterLabel (0..n) ``` ## API reference ### CircularMeter | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"default" \| "lg" \| "sm" \| "xl" \| "xs"` | "default" | | | `variant` | `"full" \| "half"` | "full" | | | `className` | `string` | | | | `low` | `number` | | The top of the low region, as on the native ``. Set it or `high` to get levels. | | `high` | `number` | | The bottom of the high region, as on the native ``. | | `optimum` | `number` | | The best value. Under `low`: low is good. Over `high`: high is good. Between: the middle. | | `glow` | `boolean` | | A soft halo in the fill color (`glow`, `@gelatin-ui/glow`). Default: `false`. | | `segments` | `number` | | Cut the ring into this many arcs that fill one by one. Unset: one solid ring. | | `animated` | `boolean` | true | Move the arc and count the value text to each new value, as `CircularProgress` does. `false` jumps to each value. Default `true`. | Also takes every prop of Base UI `Meter.Root`: https://base-ui.com/react/components/meter ### CircularMeterTrack | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### CircularMeterIndicator | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### CircularMeterValue | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `Meter.Value`: https://base-ui.com/react/components/meter ### CircularMeterLabel | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | CircularMeter | `circular-meter` | | | | | CircularMeterTrack | `circular-meter-track` | | | | | CircularMeterIndicator | `circular-meter-indicator` | `data-level` | | `status-colors` | | CircularMeterValue | `circular-meter-value` | | | | | CircularMeterLabel | `circular-meter-label` | | | | ## Usage Set the value and put the parts inside. ```tsx title="storage-meter.tsx" import { CircularMeter, CircularMeterIndicator, CircularMeterLabel, CircularMeterTrack, CircularMeterValue, } from "@/components/ui/circular-meter"; export function StorageMeter() { return ( Storage used ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/circular-meter ``` It adds 18 registry items: 14 files, 3878 lines, and the npm packages `@base-ui/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Circular Progress](https://gelatinui.com/components/circular-progress.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Circular Progress](https://gelatinui.com/components/circular-progress.md) - [Meter](https://gelatinui.com/components/meter.md) ## Accessibility It is the Base UI Meter, so it has the meter role and its value. A level changes the color and the value stays in text. ## Motion | Part | Motion | | --- | --- | | Value | chartUpdate · the arc springs to each new value and the value text counts with it; `animated={false}` jumps | --- # Circular Progress > A small ring or half gauge that fills as a task moves on, such as an upload. It can show the percent inside, spin for an unknown wait, or fill in steps. Page: https://gelatinui.com/components/circular-progress ## When to use it Best for: A task in a small round shape: an upload in a list, a table cell step, or a tile. - Use it when a task needs a small round shape: a list row, a table cell, a tile. - Use `value={null}` while the size of the task is not known. - Use `variant="half"` for a gauge. - Use `ink="inverse"` for a ring on a solid `primary` fill, such as a Stop button. - Use `animated={false}` when each new value must show at once. ## When not to use it - For a value at rest, such as disk use, use a [Meter](https://gelatinui.com/components/meter.md). - For a task in a wide row, use a [Progress](https://gelatinui.com/components/progress.md). - For a wait with no value to show, use a [Spinner](https://gelatinui.com/components/spinner.md). ## Notes for agents - Put `CircularProgressIndicator` in `CircularProgressTrack`. The track holds the ring box and the background ring. - Put text inside the ring only at `lg` and `xl`. The hole of a `default` ring is 32px wide. - `ink="inverse"` changes only the strokes. Color a `CircularProgressValue` yourself on a solid fill. - The ring keeps its size on phones. The row around it is the touch target. - `CircularProgressValue` can take a function of the formatted and the raw value ("12 of 19 files"). - `segments` cuts the ring into arcs that fill one by one. A ring shows only the dots that fit. ## Anatomy ```text CircularProgress ├─ RingFill (0..n) ├─ RingTrackSvg (0..n) ├─ RingIndicatorSvg (0..n) ├─ CircularProgressTrack (0..n) ├─ CircularProgressIndicator (0..n) ├─ CircularProgressValue (0..n) └─ CircularProgressLabel (0..n) ``` ## API reference ### CircularProgress | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"default" \| "lg" \| "sm" \| "xl" \| "xs"` | "default" | | | `variant` | `"full" \| "half"` | "full" | | | `className` | `string` | | | | `ink` | `"default" \| "destructive" \| "foreground" \| "inverse" \| "muted" \| "success" \| "warning"` | "default" | `default`: the `primary` fill on a `foreground` 10% track. `inverse`: for a ring on a solid `primary` fill (a Stop button): `primary-foreground` on `primary-foreground` at 25%. It changes the strokes only: a `CircularProgressValue` keeps its `foreground` text, so color it yourself when you show a value on the fill. `muted`: a `muted-foreground` fill, for a ring that only counts (a countdown). `warning`: a `warning` fill, for a time that is nearly up. The fill color fades on the `fade` clock between `muted` and `warning`. `foreground`, `success`, `destructive`: a fill that tells the status of a to-do list. | | `animated` | `boolean` | true | Move the arc and count the value text to each new value (`useShareSpring`), so a value that ticks reads as one motion. `false` jumps to each value. Default `true`. | | `glow` | `boolean` | | A soft halo in the fill color (`glow`, `@gelatin-ui/glow`). Default: `false`. | | `segments` | `number` | | Cut the ring into this many arcs that fill one by one. Unset: one solid ring. | Also takes every prop of Base UI `Progress.Root`: https://base-ui.com/react/components/progress ### CircularProgressTrack | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### CircularProgressIndicator | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### CircularProgressValue | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `Progress.Value`: https://base-ui.com/react/components/progress ### CircularProgressLabel | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | RingFill | `circular-progress-fill` | | | | | RingTrackSvg | `circular-progress-track-ring` | | | | | RingIndicatorSvg | `circular-progress-fill-ring` | | | | | CircularProgress | `circular-progress` | | | | | CircularProgressTrack | `circular-progress-track` | | | | | CircularProgressIndicator | `circular-progress-indicator` | | | | | CircularProgressValue | `circular-progress-value` | `data-complete` | | | | CircularProgressLabel | `circular-progress-label` | | | | ## Usage Put `CircularProgressIndicator` in `CircularProgressTrack`. Put text inside the ring only at `lg` and `xl`. ```tsx title="profile-ring.tsx" import { CircularProgress, CircularProgressIndicator, CircularProgressLabel, CircularProgressTrack, CircularProgressValue, } from "@/components/ui/circular-progress"; export function ProfileRing() { return ( Profile complete ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/circular-progress ``` It adds 16 registry items: 12 files, 3573 lines, and the npm packages `@base-ui/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Progress](https://gelatinui.com/components/progress.md) - [Meter](https://gelatinui.com/components/meter.md) - [Spinner](https://gelatinui.com/components/spinner.md) ## Accessibility It is a Base UI Progress with the `progressbar` role. `CircularProgressLabel` names it; with no label, pass `aria-label`. Pass `getAriaValueText` to translate the indeterminate text. The ring keeps its size on phones. The row around it is the touch target. ## Motion | Part | Motion | | --- | --- | | Value | chartUpdate · the arc springs to each new value and the value text counts with it; `animated={false}` jumps | | Indeterminate | animate-spin · a 25% arc turns once a second | --- # Dot Matrix > A grid of small cells that light up in a pattern while something loads, and turn into a check or an x when the work ends. Page: https://gelatinui.com/components/dot-matrix ## When to use it Best for: A loader that shows AI work or a running job, and ends with a check or an x. - Pick one of the `pattern` values to match the feel of your product. - Set `state` to `done` or `error` when the work ends. Add `text-success` or `text-destructive` for color. - Name it with `aria-label`, or set `aria-hidden` when a text label is next to it. - Set `colors` to two or more colors for a gradient over the cells, and `gradient` for its direction. ## When not to use it - For a plain loading ring in a button or a field, use a [Spinner](https://gelatinui.com/components/spinner.md). - For a task with a known share done, use a [Progress](https://gelatinui.com/components/progress.md). ## Notes for agents - It is an `` (role `status`). It takes the current text color in every state, unless `colors` is set. - `colors` takes any CSS colors or tokens (`var(--info)`). Each cell mixes the two colors around its place in OKLCH. One color paints every cell. `gradient` is `diagonal` (default), `horizontal`, `vertical`, or `radial`. - `grid` sets 3, 4, or 5 cells on each side. `size` sets the box from `xs` to `xl`. - `speed` changes the loop speed: 2 is twice as fast. `paused` holds the frame. - The loop pauses off screen and in a hidden tab. The server renders the first frame. ## Anatomy ```text DotMatrix ``` ## API reference ### DotMatrix | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xl" \| "xs"` | | | | `pattern` | `"border" \| "checker" \| "columns" \| "converge" \| "corners" \| "fill" \| "heartbeat" \| "pulse" \| "radar" \| "rain" \| "ripple" \| "scan" \| "snake" \| "spiral" \| "twinkle" \| "wave"` | "twinkle" | How the cells light up. Default `twinkle`. | | `grid` | `DotMatrixGrid` | 3 | Cells on each side: 3 (default), 4, or 5. | | `state` | `DotMatrixState` | "running" | `running` (default) loops; `paused` holds the frame at 40%; `done` and `error` turn the cells into a check or an x, in the same color (add `text-success` or `text-destructive` for color). | | `speed` | `number` | 1 | Loop speed: 2 is twice as fast. Default 1 (one loop in 1.6s, the `flow` kind). | | `colors` | `readonly string[]` | | The colors of the cells, as gradient stops: any CSS color, a token too (`var(--color-info)`). One color paints every cell. Default: the text color. | | `gradient` | `"diagonal" \| "horizontal" \| "radial" \| "vertical"` | "diagonal" | How the `colors` lie over the cells: `diagonal` (default), `horizontal`, `vertical`, `radial`. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | DotMatrix | `dot-matrix` | `data-off`, `data-state` | `--dot-matrix-color`, `--dot-matrix-grid`, `--dot-matrix-size` | `motion-timing` | ## Usage Import Dot Matrix and compose its parts. ```tsx title="dot-matrix.tsx" import { DotMatrix } from "@/components/effects/dot-matrix"; export function DotMatrixDemo() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/dot-matrix ``` It adds 14 registry items: 12 files, 2529 lines, and the npm packages `@mantine/hooks`, `motion`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Spinner](https://gelatinui.com/components/spinner.md) - [Progress](https://gelatinui.com/components/progress.md) - [Skeleton](https://gelatinui.com/components/skeleton.md) ## Motion | Part | Motion | | --- | --- | | Loop | flow · one loop in 1.6s; only the opacity of each cell moves | | End | fade · the cells turn into a check or an x from the light each cell shows | --- # Dynamic Island > A pill at an edge of the screen that grows to fit a notice, a call, or a song, like the Dynamic Island on iPhone, then shrinks back. Page: https://gelatinui.com/components/dynamic-island ## When to use it Best for: A live status that grows into a notice or a card and shrinks back, at an edge of the screen. - Use it when one place on the page shows a live status that changes, and the shape must grow from the old content to the new one. - Give each view a name. The app sets `view` to the name, or to `null` for the idle shape. - Use `dismissAfterMs` for a notice that goes by itself. A new `key` on the view shows the same notice again with the full time. ## When not to use it - For a stack of messages that can show at the same time, use a [Toast](https://gelatinui.com/components/toast.md). - For a message that must stay on the page, use an [Alert](https://gelatinui.com/components/alert.md). ## Notes for agents - The app owns the state: pass `view` and `onViewChange`. Each `DynamicIslandView` shows while `view` equals its `name`. - Size a view through its content (a width class such as `w-80`, or `DynamicIslandCompact`). Text that must truncate needs a width. - Leave `dismissTo` out on a view that a page button shows again: the press of that button is outside the island and would close the view first. - Give each `DynamicIslandTrigger` an `aria-label` that says what the press shows. ## Anatomy ```text DynamicIsland ├─ DynamicIslandView (0..n) ├─ DynamicIslandCompact (0..n) ├─ DynamicIslandLeading (0..n) ├─ DynamicIslandTrailing (0..n) ├─ DynamicIslandTrigger (0..n) └─ DynamicIslandBubble (0..n) ``` ## API reference ### DynamicIsland | Prop | Type | Default | Description | | --- | --- | --- | --- | | `view` | `string \| null` | | The name of the active `DynamicIslandView` (controlled). `null`: the idle pill. | | `defaultView` | `string \| null` | null | The view at first render when `view` is not set (uncontrolled). Default: `null`, the idle pill. | | `onViewChange` | `function` | | Called with the next view: a `DynamicIslandTrigger` press, or a dismiss (Escape, a press outside). | | `placement` | `"bottom" \| "top"` | "top" | The edge the island hangs from. `top` (default): it grows down from the top center, as on iOS. `bottom`: it grows up from the bottom center (a phone page with the island above the home bar), and a swipe down closes a view. Place the root at that edge. | | `align` | `"center" \| "end" \| "start"` | "center" | Where across the root the shape grows from. `center` (default): from the middle, as on iOS. `start` and `end`: from that side (right to left aware), for a shape in a corner (a notice at the top end of a desktop app, a button at the bottom end that grows into a panel). With `end`, a `DynamicIslandBubble` leaves from the start side. | | `idle` | `"hidden" \| "pill"` | "pill" | The shape at rest with no view. `pill` (default): the 126 × 37 idle pill stays. `hidden`: the idle size is 0, so a view grows out of nothing and folds back to nothing (a notice or a status on a page with no camera). The root then takes no space in the page. | | `scheme` | `"dark" \| "inherit"` | "dark" | The color scheme of the content. `dark` (default): the content takes the dark look of the components on the black shape. `inherit`: the page scheme, for a light surface (`data-[scheme=inherit]:[--dynamic-island-surface:var(--popover)]` on the root). | ### DynamicIslandView | Prop | Type | Default | Description | | --- | --- | --- | --- | | `name` | `string` | | The view's name: it shows while the root `view` equals it. | | `dismissTo` | `string \| null` | | The view that Escape and a press outside go to (`null`: the idle pill). Leave it out for a view that stays until the app changes it (a timer, a call), and for a view that a page button shows again or hides: that button is outside, so its `pointerdown` would close the view first. | | `dismissAfterMs` | `number` | | The time the view shows before the island goes to `dismissTo` (the idle pill when it has none), in ms: a notice that goes by itself. It counts from the morph to this view, waits while a hover pointer is over the island or focus is in it, and starts again from the full time when they leave. A new `key` on the view starts the full time again (the same notice a second time). Leave it out for a view that stays. | | `style` | `MotionStyle` | | Styles of the content box (Motion style: plain CSS or motion values). | ### DynamicIslandCompact No props of its own: `className`, `children`, and every other prop go to the element it renders. ### DynamicIslandLeading No props of its own: `className`, `children`, and every other prop go to the element it renders. ### DynamicIslandTrailing No props of its own: `className`, `children`, and every other prop go to the element it renders. ### DynamicIslandTrigger | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `view` | `string \| null` | | The view to show on press (`null`: the idle pill). Leave it out to only run `onClick`. | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ### DynamicIslandBubble | Prop | Type | Default | Description | | --- | --- | --- | --- | | `open` | `boolean` | | Shows the bubble: it splits out of the pill end, and merges back in when it turns `false`. | | `style` | `MotionStyle` | | Styles of the circle (Motion style: plain CSS or motion values). | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | DynamicIsland | `dynamic-island` | `data-align`, `data-placement` | `--dynamic-island-bubble`, `--dynamic-island-corner`, `--dynamic-island-height`, `--dynamic-island-idle-height`, `--dynamic-island-idle-width`, `--dynamic-island-keyline`, `--dynamic-island-origin-x`, `--dynamic-island-origin-y`, `--dynamic-island-radius`, `--dynamic-island-scale`, `--dynamic-island-sensor`, `--dynamic-island-surface`, `--dynamic-island-width` | | | DynamicIslandView | `dynamic-island-view` | | | | | DynamicIslandCompact | `dynamic-island-compact` | | `--dynamic-island-idle-height` | | | DynamicIslandLeading | `dynamic-island-leading` | | `--dynamic-island-sensor` | | | DynamicIslandTrailing | `dynamic-island-trailing` | | | | | DynamicIslandTrigger | `dynamic-island-trigger` | | | `hit-area` | | DynamicIslandBubble | `dynamic-island-bubble` | `data-align`, `data-placement` | `--dynamic-island-bubble`, `--dynamic-island-bubble-gap`, `--dynamic-island-bubble-side`, `--dynamic-island-bubble-travel`, `--dynamic-island-corner`, `--dynamic-island-goo`, `--dynamic-island-press`, `--dynamic-island-split`, `--dynamic-island-surface` | | ## Usage Render the root with the views. The app sets `view` to a name, or to `null` for the idle shape. A view with `dismissAfterMs` goes by itself. The sample also uses `button`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/dynamic-island @gelatin-ui/button ``` ```tsx title="copy-link.tsx" import { useState } from "react"; import { DynamicIsland, DynamicIslandView } from "@/components/effects/dynamic-island"; import { Button } from "@/components/ui/button"; export function CopyLink() { const [view, setView] = useState(null); return (

Link copied

); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/dynamic-island ``` It adds 28 registry items: 26 files, 5438 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`, `xstate`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Toast](https://gelatinui.com/components/toast.md) - [Button](https://gelatinui.com/components/button.md) - [Progress](https://gelatinui.com/components/progress.md) ## Keyboard | Keys | Action | | --- | --- | | Enter | On a trigger, shows its view and moves focus into it. | | Space | On a trigger, shows its view and moves focus into it. | | Esc | Closes a view that has `dismissTo`, and returns focus to where it came from. | ## Accessibility Only the active view renders. A view that leaves is `inert` and `aria-hidden` while it fades, so Tab and a screen reader skip it. A `DynamicIslandTrigger` is a Base UI `Button` over the whole shape, with a 44px target on touch (`hit-area`) and an outline focus ring 2px out from the shape. Give it an `aria-label`. A trigger press moves focus into the next view: its first control, else the view box. Escape and a press outside close a view with `dismissTo`, and focus goes back to where it came from. A timed view waits while a mouse pointer is over the island or focus is in it, and starts again from the full time when both leave. So a person who reads or acts never loses the view. The island announces nothing by itself. Put words that a screen reader must hear in the page text next to it. ## Motion | Part | Motion | | --- | --- | | Morph | island · the shape springs to the size of the next view, and keeps its speed when the view changes mid-way | | Content | fade · the next content blurs in 50ms after the change; the old content leaves on popup-exit | | Press and hover | island · the shape scales to 0.96 on a press and 1.02 on a mouse hover, from the edge it hangs from | | Bubble | island · a second circle splits out of the pill end, with a liquid neck while it moves | --- # Empty > What a page, a panel, or a list shows when it has no content yet: an icon, a short title and text, and buttons for the next step. Page: https://gelatinui.com/components/empty ## When to use it Best for: A page, a panel, or a list with no content yet: what is missing, and the next step. - Use it in place of a list with no rows. - Use `className="border"` for a dashed outline. - Use `className="bg-muted/50"` for a soft fill. ## When not to use it - For a failed action, use an [Alert](https://gelatinui.com/components/alert.md). - For a load that will finish soon, use a [Skeleton](https://gelatinui.com/components/skeleton.md). ## Notes for agents - It has no border and no fill by default, so it sits in any surface. - It grows to fill a flex parent. - `EmptyMedia` has the `icon` and `default` looks. - Structure comes in as parts: `EmptyHeader`, `EmptyTitle`, `EmptyDescription`, and `EmptyContent`. ## Anatomy ```text Empty ├─ EmptyHeader (0..n) ├─ EmptyMedia (0..n) ├─ EmptyTitle (0..n) ├─ EmptyDescription (0..n) └─ EmptyContent (0..n) ``` ## API reference ### Empty No props of its own: `className`, `children`, and every other prop go to the element it renders. ### EmptyHeader No props of its own: `className`, `children`, and every other prop go to the element it renders. ### EmptyMedia | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"default" \| "icon"` | "default" | | ### EmptyTitle No props of its own: `className`, `children`, and every other prop go to the element it renders. ### EmptyDescription No props of its own: `className`, `children`, and every other prop go to the element it renders. ### EmptyContent No props of its own: `className`, `children`, and every other prop go to the element it renders. ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Empty | `empty` | | | | | EmptyHeader | `empty-header` | | | | | EmptyMedia | `empty-media` | | | | | EmptyTitle | `empty-title` | | | | | EmptyDescription | `empty-description` | | | | | EmptyContent | `empty-content` | | | | ## Usage Put the parts in the root. Add the next step in `EmptyContent`. The sample also uses `button`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/empty @gelatin-ui/button ``` ```tsx title="no-projects.tsx" import { FolderIcon } from "@phosphor-icons/react/ssr"; import { Button } from "@/components/ui/button"; import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, } from "@/components/ui/empty"; export function NoProjects() { return ( No projects yet Create your first project to start. ); } ``` ## Compose Build it with: - [Filters](https://gelatinui.com/components/filters.md): Narrows the records. - [Data Table](https://gelatinui.com/components/data-table.md): Shows the records in rows, with sort and select. - [Badge](https://gelatinui.com/components/badge.md): Shows the status of each record. - [Menu](https://gelatinui.com/components/menu.md): Holds the actions of one row. - [Pagination](https://gelatinui.com/components/pagination.md): Moves between pages. - [Skeleton](https://gelatinui.com/components/skeleton.md): Holds the layout while the rows load. - [Command](https://gelatinui.com/components/command.md): Holds the search field and the results. - [Kbd](https://gelatinui.com/components/kbd.md): Shows the shortcut that opens it. Rules: - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. - Color has a job (`color-has-a-job`): Use color only for a status, the brand action, or data; keep the rest neutral, and show a level with a small mark (a dot, a tinted badge) before a big fill. - Real content (`real-content`): Fill the UI with content of the real product (real names, amounts, dates, and states), never lorem text or "Item 1". - Steady text weight (`steady-weight`): Never change the font weight on hover, focus, selected, active, or open; change the color or the fill, so the text does not jump. Patterns: `gelatin://patterns/data-list`, `gelatin://patterns/command-search` ## Add it ```bash npx shadcn@latest add @gelatin-ui/empty ``` It adds 6 registry items: 4 files, 1063 lines, and the npm packages `clsx`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Frame](https://gelatinui.com/components/frame.md) - [Icon Tile](https://gelatinui.com/components/icon-tile.md) - [Skeleton](https://gelatinui.com/components/skeleton.md) ## Accessibility The title and the description are plain text in reading order. It adds no tab stop of its own. --- # Face Scan > A small face icon for a face ID check. It blinks while it waits, turns into a ring while it scans, then shows a check or shakes when the scan fails. Page: https://gelatinui.com/components/face-scan ## When to use it Best for: A face check that runs, then answers with a check or a frown, on an unlock or approval screen. - Set `status` to `scanning` while the check runs, then to `success` or `error`. - Use `FaceScanSurface variant="hud"` for a dark box in the middle of the screen. - Give each stage its own words with `labels`, or a function child on `FaceScanStatus`. ## When not to use it - For a job that is not a face check, use a [Dot Matrix](https://gelatinui.com/components/dot-matrix.md). - For a plain loading ring in a button, use a [Spinner](https://gelatinui.com/components/spinner.md). ## Notes for agents - Compose `FaceScanGlyph` and `FaceScanStatus` in `FaceScan`. With no children, the root shows both. - The app owns `status`: `idle`, `scanning`, `success`, or `error`. Each change morphs from the live shape. - `size` is `sm` (24 px), `default` (48), `lg` (72), or `xl` (96). `FaceScanSurface` takes the size of the root. - In the idle stage the face looks toward the pointer over the root. Set `lookAtPointer={false}` to stop it. - The loops stop off screen and in a hidden tab. The glyph is `aria-hidden`; the status line says the stage. - With no `FaceScanStatus`, nothing names the stage: give the root `role="img"` and an `aria-label` that you change with `status`. ## Anatomy ```text FaceScan ├─ FaceScanGlyph (0..n) ├─ FaceScanStatus (0..n) └─ FaceScanSurface (0..n) ``` ## API reference ### FaceScan | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"default" \| "lg" \| "sm" \| "xl"` | "default" | | | `status` | `"error" \| "idle" \| "scanning" \| "success"` | "idle" | The stage: `idle` (default), `scanning`, `success`, or `error`. The app sets it. | | `lookAtPointer` | `boolean` | true | In the idle stage, the face looks toward the pointer over the root. Default `true`. | | `labels` | `Partial` | | The words of each stage for `FaceScanStatus`. | | `children` | `ReactNode` | | The parts. With none, the root shows the glyph and the status line. | ### FaceScanGlyph No props of its own: `className`, `children`, and every other prop go to the element it renders. ### FaceScanStatus | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | `function \| ReactNode` | | The words, or a function that answers per stage. With none, the root `labels` answer. | ### FaceScanSurface | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"hud" \| "plain" \| "tile"` | "plain" | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | FaceScan | `face-scan` | | | | | FaceScanGlyph | `face-scan-glyph` | `data-status` | | `motion-timing`, `status-colors` | | FaceScanStatus | `face-scan-status` | | | | | FaceScanSurface | `face-scan-surface` | | | | ## Usage Set `status` from your face check, and compose the parts. ```tsx title="face-unlock.tsx" import { FaceScan, FaceScanGlyph, FaceScanStatus, FaceScanSurface } from "@/components/pro/effects/face-scan"; export function FaceUnlock({ status }: { status: "idle" | "scanning" | "success" | "error" }) { return ( ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/face-scan ``` It adds 27 registry items: 25 files, 4272 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Dot Matrix](https://gelatinui.com/components/dot-matrix.md) - [Spinner](https://gelatinui.com/components/spinner.md) ## Motion | Part | Motion | | --- | --- | | Curl | glide · the corners curl into a ring as the scan starts | | Scan | progress · the ring turns once in 1.2 s while the eyes look around | | Success | iconDraw · the ring closes, the check draws, and the glyph pops | | Error | iconHover · the face frowns and shakes once | | Idle | follow · the face looks toward the pointer and blinks every 4.2 s | --- # Meter > A bar that shows one measured value in a known range, such as used storage. It changes color when the value reaches a low or high level. Page: https://gelatinui.com/components/meter ## When to use it Best for: One measured value in a known range at rest, such as storage used, a quota, or a battery level. - Use it for a value at rest in a known range. - Use `low`, `high`, and `optimum` to turn on the warning and critical colors. - Use `variant` `ticks`, `segments`, `steps`, or `dots` on `MeterTrack` for a row of cells. - Use `thickness="thin"` in a table cell. ## When not to use it - For a task that moves toward done, use a [Progress](https://gelatinui.com/components/progress.md). - For a value that people set, use a [Slider](https://gelatinui.com/components/slider.md). - For a password score, use a [Password Strength](https://gelatinui.com/components/password-strength.md). ## Notes for agents - With neither `low` nor `high`, the root has no `data-level` and the meter stays one color. - Say the level in text too, with `MeterValue`, the label, or `getAriaValueText` ("82 of 100 GB used, almost full"). - A `format` formats the raw value. `{ style: "percent" }` with `value={24}` prints "2,400%". Leave out `format`, or pass a fraction with `max={1}`. - A bar needs a `MeterIndicator`. A segmented track draws its own cells and does not render children. - A segment fills when the value covers at least half of it. 1% of 30 ticks fills none. - `MeterIndicator` takes `variant="muted"` for a quiet fill with no level color. - A new value takes its width at once, with no transition. ## Anatomy ```text Meter ├─ MeterLabel (0..n) ├─ MeterValue (0..n) ├─ MeterTrack (0..n) └─ MeterIndicator (0..n) ``` ## API reference ### Meter | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `low` | `number` | | The top of the low region, as on the native ``. Set it or `high` to get levels. | | `high` | `number` | | The bottom of the high region, as on the native ``. | | `optimum` | `number` | | The best value. Under `low`: low is good. Over `high`: high is good. Between: the middle. | | `glow` | `boolean` | | A soft halo in the fill color (`glow`, `@gelatin-ui/glow`). Default: `false`. | Also takes every prop of Base UI `Meter.Root`: https://base-ui.com/react/components/meter ### MeterLabel | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### MeterValue | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `Meter.Value`: https://base-ui.com/react/components/meter ### MeterTrack | Prop | Type | Default | Description | | --- | --- | --- | --- | | `thickness` | `"thick" \| "thin"` | "thick" | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `className` | `string` | | | | `variant` | `"bar" \| "dots" \| "segments" \| "steps" \| "ticks"` | "bar" | `bar` (default): one fill. The others draw a row of segments. | | `segments` | `number` | | The segment count of a segmented look. Default: ticks 30, segments 10, steps 5, dots 20. | ### MeterIndicator | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `variant` | `"default" \| "muted"` | "default" | `default`: the ink fill (and the level colors). `muted`: a quiet gray fill (`muted-foreground` at 50%) with no level color, for the bars of a comparison where only the one that leads takes the ink: the results of a Poll before its winner. The color is never the only signal: the value text says which one leads. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Meter | `meter` | | | | | MeterLabel | `meter-label` | | | | | MeterValue | `meter-value` | | | | | MeterTrack | `meter-track` | `data-level` | | `status-colors` | | MeterIndicator | `meter-indicator` | | | | ## Usage A meter shows a value in a known range; for a task that moves, use a Progress. Set `low`, `high`, and `optimum` to color the levels. ```tsx title="storage-meter.tsx" import { Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue } from "@/components/ui/meter"; export function StorageMeter() { return ( Storage ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/meter ``` It adds 15 registry items: 11 files, 2745 lines, and the npm packages `@base-ui/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Progress](https://gelatinui.com/components/progress.md) - [Circular Progress](https://gelatinui.com/components/circular-progress.md) - [Password Strength](https://gelatinui.com/components/password-strength.md) - [Spinner](https://gelatinui.com/components/spinner.md) ## Accessibility It is a Base UI Meter with the `meter` role. `MeterLabel` names it; with no label, pass `aria-label`. Say the level in text too, with `MeterValue`, the label, or `getAriaValueText`. Pass `locale` on a server-rendered page, so the digits match after hydration. ## Motion | Part | Motion | | --- | --- | | Value | none · the fill takes each new width at once | --- # Progress > A bar that fills as a task moves on, such as an upload or an import. It shows a label and the percent, or moves back and forth when the size is not known. Page: https://gelatinui.com/components/progress ## When to use it Best for: A task that takes time, such as an upload or an import, as a bar or a row of segments. - Use it for a task that moves toward done: an upload, an import, a long save. - Use `value={null}` while the size of the task is not known. - Use `tone` when the state has a meaning, and say the same state in the label or value. - Use `variant` `ticks`, `segments`, `steps`, or `dots` on `ProgressTrack` for a row of cells. ## When not to use it - For a value at rest, such as disk use, use a [Meter](https://gelatinui.com/components/meter.md). - For a wait inside a button, use `loading` on the [Button](https://gelatinui.com/components/button.md). - For a task in a small round shape, use a [Circular Progress](https://gelatinui.com/components/circular-progress.md). ## Notes for agents - A `format` formats the raw value. `{ style: "percent" }` with `value={24}` prints "2,400%". Leave out `format`, or pass a fraction with `max={1}`. - A bar needs a `ProgressIndicator` inside `ProgressTrack`. A segmented track draws its own cells and does not render children. - Give it a `ProgressLabel`, or `aria-label` on the root. - The indeterminate text from Base UI is English. In another language, pass `getAriaValueText`. - `thickness` works on the bar only. `size` and `rounded` set the segmented look. - With no `tone`, the fill stays ink when complete. Let the value text say "Done". ## Anatomy ```text Progress ├─ ProgressLabel (0..n) ├─ ProgressValue (0..n) ├─ ProgressTrack (0..n) └─ ProgressIndicator (0..n) ``` ## API reference ### Progress | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `glow` | `boolean` | | A soft halo in the fill color (`glow`, `@gelatin-ui/glow`). Default: `false`. | | `tone` | `TrackTone` | "neutral" | The fill color: `default` (`primary`), or a status for a task whose state has a meaning: `success` done, `warning` slow or nearly full, `info` a neutral step, `destructive` failed. Color is never the only signal: say the state in the label or value. | Also takes every prop of Base UI `Progress.Root`: https://base-ui.com/react/components/progress ### ProgressLabel | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### ProgressValue | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `Progress.Value`: https://base-ui.com/react/components/progress ### ProgressTrack | Prop | Type | Default | Description | | --- | --- | --- | --- | | `thickness` | `"thick" \| "thin"` | "thin" | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `className` | `string` | | | | `variant` | `"bar" \| "dots" \| "segments" \| "steps" \| "ticks"` | "bar" | `bar` (default): one fill. The others draw a row of segments. | | `segments` | `number` | | The segment count of a segmented look. Default: ticks 30, segments 10, steps 5, dots 20. | ### ProgressIndicator | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Progress | `progress` | | | | | ProgressLabel | `progress-label` | | | | | ProgressValue | `progress-value` | `data-complete` | | | | ProgressTrack | `progress-track` | | | | | ProgressIndicator | `progress-indicator` | `data-indeterminate` | `--progress-slide` | | ## Usage Put the label, the value, and the track inside `Progress`. Pass `value={null}` when the size of the task is not known. ```tsx title="upload-progress.tsx" import { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, } from "@/components/ui/progress"; export function UploadProgress() { return ( Uploading files ); } ``` ## Compose Build it with: - [Dropzone](https://gelatinui.com/components/dropzone.md): Takes the files by drop or by a press. - [Attachment](https://gelatinui.com/components/attachment.md): Shows each file with its state. - [Files Illustration 01](https://gelatinui.com/components/files-illustration-01.md): Fills the empty drop area. Rules: - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. - No layout jump (`no-layout-jump`): When a state change adds, removes, or resizes content, reserve its space or animate its size, so nothing below it jumps. - Real content (`real-content`): Fill the UI with content of the real product (real names, amounts, dates, and states), never lorem text or "Item 1". - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. Patterns: `gelatin://patterns/file-upload` ## Add it ```bash npx shadcn@latest add @gelatin-ui/progress ``` It adds 14 registry items: 10 files, 2679 lines, and the npm packages `@base-ui/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Circular Progress](https://gelatinui.com/components/circular-progress.md) - [Meter](https://gelatinui.com/components/meter.md) - [Dropzone](https://gelatinui.com/components/dropzone.md) - [Spinner](https://gelatinui.com/components/spinner.md) ## Accessibility It is a Base UI Progress with the `progressbar` role. `ProgressLabel` names it; with no label, pass `aria-label`. The indeterminate text from Base UI is English. In another language, pass `getAriaValueText`. Pass `locale` on a server-rendered page, so the digits match after hydration. ## Motion | Part | Motion | | --- | --- | | Value | none · the fill takes each new width at once | --- # Pull to Refresh > A scroll area that people pull down at the top to load new content. A liquid drop stretches out of a handle, then turns into a spinner. Page: https://gelatinui.com/components/pull-to-refresh ## When to use it Best for: Lists and feeds on touch screens where people check for new items at the top. - Use it on a list that people read from the top and that gets new items from a server. - Return a promise from `onRefresh`: the spinner stays until it settles, and at least 700ms. - Add `PullToRefreshTrigger` so keyboard, mouse, and agent users can refresh with no drag. ## When not to use it - To load older items at the end of a list, use a [Button](https://gelatinui.com/components/button.md). - To act on one row with a sideways swipe, use [Swipe Actions](https://gelatinui.com/components/swipe-actions.md). ## Notes for agents - Put `PullToRefreshIndicator`, then the content in `PullToRefreshContent`, inside `PullToRefresh`. Give the root a height: it is the scroll area. - A pull starts only when the area is scrolled to the top. Below the top, the finger scrolls the list as usual. - `onRefresh` errors go to `onRefreshError`, or to `reportError` when it is not set. The spinner stops and the content springs back. - `PullToRefreshLabel` shows its words for one `state`: `pulling`, `armed`, or `refreshing`. ## Anatomy ```text PullToRefresh ├─ PullToRefreshIndicator (0..n) ├─ PullToRefreshLabel (0..n) ├─ PullToRefreshContent (0..n) └─ PullToRefreshTrigger (0..n) ``` ## API reference ### PullToRefresh | Prop | Type | Default | Description | | --- | --- | --- | --- | | `onRefresh` | `function` | | Runs on a refresh. Return a promise: the spinner stays until it settles. | | `onRefreshError` | `function` | | Gets what `onRefresh` threw or rejected with. Without it, the error goes to `reportError`. | | `threshold` | `number` | PULL_TO_REFRESH.threshold | The pull in px that arms a refresh. Default 88. | | `disabled` | `boolean` | false | No pull and no refresh. | ### PullToRefreshIndicator No props of its own: `className`, `children`, and every other prop go to the element it renders. ### PullToRefreshLabel | Prop | Type | Default | Description | | --- | --- | --- | --- | | `state` | `"armed" \| "pulling" \| "refreshing"` | | The state that shows this label. Put one label per state you want words for. | ### PullToRefreshContent No props of its own: `className`, `children`, and every other prop go to the element it renders. ### PullToRefreshTrigger | Prop | Type | Default | Description | | --- | --- | --- | --- | | `glass` | `"clear" \| "dark" \| "light"` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "icon" \| "icon-lg" \| "icon-sm" \| "icon-xs" \| "lg" \| "sm" \| "xl" \| "xs"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | | | | `className` | `string` | | | | `busy` | `boolean` | | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. | | `spinnerPlacement` | `"center" \| "start"` | | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | PullToRefresh | `pull-to-refresh` | `data-state` | | | | PullToRefreshIndicator | `pull-to-refresh-indicator` | | | | | PullToRefreshLabel | `pull-to-refresh-label` | `data-visible` | | `motion-timing` | | PullToRefreshContent | `pull-to-refresh-content` | | | | | PullToRefreshTrigger | `pull-to-refresh-trigger` | | | | ## Usage Put the indicator and the content in the root, and give the root a height. ```tsx title="inbox.tsx" import { PullToRefresh, PullToRefreshContent, PullToRefreshIndicator, PullToRefreshLabel, PullToRefreshTrigger, } from "@/components/data/pull-to-refresh"; const MESSAGES = ["Launch moodboard", "Invoice #2048 is paid", "Design review notes"]; async function loadInbox() { await fetch("/api/inbox"); } export function Inbox() { return ( Release to refresh
    {MESSAGES.map((message) => { return (
  • {message}
  • ); })}
Refresh
); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/pull-to-refresh ``` It adds 22 registry items: 19 files, 3899 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`, `xstate`. ## Built on - [Button](https://gelatinui.com/components/button.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Swipe Actions](https://gelatinui.com/components/swipe-actions.md) - [Scroll Area](https://gelatinui.com/components/scroll-area.md) - [Spinner](https://gelatinui.com/components/spinner.md) ## Keyboard | Keys | Action | | --- | --- | | Tab | Moves to `PullToRefreshTrigger`, when the content has one. | | Enter, Space | Runs the refresh from the trigger. The button is busy until it ends. | ## Motion | Part | Motion | | --- | --- | | Pull | sheet · the content follows the finger on a rubber band, and a drop stretches out of the handle on a liquid neck | | Armed | panel · at 88px the neck breaks with a small spring pop; a release now refreshes | | Refreshing | progress · the drop opens into a ring, and a liquid head turns once each 900ms | | Settle | sheet · the ring closes, the head spirals home into the handle, and the content springs back to rest | --- # Skeleton > Grey shapes in the place of content that is still loading, such as a card, a row, or lines of text. They pulse, so people see that the page works. Page: https://gelatinui.com/components/skeleton ## When to use it Best for: A placeholder in the shape of content that loads: a card, a row, an avatar, or text. - Use it where content of a known shape loads: a card, a row, an avatar, a paragraph. - Use `SkeletonText` for lines of text, so the block is as tall as the text. - Set `pulse={false}` where something else already shows that the page works. ## When not to use it - For a wait with no known shape, use a Spinner. [Spinner](https://gelatinui.com/components/spinner.md). ## Notes for agents - Give it the size and the corner of the content it stands for, so the page does not shift when the content comes. - It is hidden from screen readers; use `SkeletonText` for lines of text. ## Anatomy ```text Skeleton └─ SkeletonText (0..n) ``` ## API reference ### Skeleton | Prop | Type | Default | Description | | --- | --- | --- | --- | | `pulse` | `boolean` | true | | | `rounded` | `"default" \| "full"` | "default" | | Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ### SkeletonText | Prop | Type | Default | Description | | --- | --- | --- | --- | | `text` | `"meta" \| "prose" \| "title" \| "ui"` | "ui" | | | `lines` | `number \| readonly number[]` | 3 | How many lines (default 3), or the width of each line as a fraction of the box (0 to 1): the measured lines of a known layout, so the bars end where the text will end. | | `pulse` | `boolean` | true | Pulse the bars (default `true`); `false` holds them still. | | `lineClassName` | `string` | | Classes of each bar (a corner, `rounded="full"` for word pills). | | `rounded` | `"default" \| "full"` | "default" | The corner of each bar. Default `default`. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Skeleton | `skeleton` | | | | | SkeletonText | `skeleton-text` | | `--skeleton-line-width` | | ## Usage Size the Skeleton as the content that comes, so nothing moves when it arrives. The bars are hidden from screen readers, so put `aria-busy` on the region that loads. ```tsx title="comment-skeleton.tsx" import { Skeleton, SkeletonText } from "@/components/ui/skeleton"; export function CommentSkeleton() { return (
); } ``` ## Compose Build it with: - [Filters](https://gelatinui.com/components/filters.md): Narrows the records. - [Data Table](https://gelatinui.com/components/data-table.md): Shows the records in rows, with sort and select. - [Badge](https://gelatinui.com/components/badge.md): Shows the status of each record. - [Menu](https://gelatinui.com/components/menu.md): Holds the actions of one row. - [Pagination](https://gelatinui.com/components/pagination.md): Moves between pages. - [Empty](https://gelatinui.com/components/empty.md): Shows when no record matches, with a next action. Rules: - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. - Color has a job (`color-has-a-job`): Use color only for a status, the brand action, or data; keep the rest neutral, and show a level with a small mark (a dot, a tinted badge) before a big fill. - Real content (`real-content`): Fill the UI with content of the real product (real names, amounts, dates, and states), never lorem text or "Item 1". - Steady text weight (`steady-weight`): Never change the font weight on hover, focus, selected, active, or open; change the color or the fill, so the text does not jump. Patterns: `gelatin://patterns/data-list` ## Add it ```bash npx shadcn@latest add @gelatin-ui/skeleton ``` It adds 1 registry items: 1 files, 188 lines, and the npm packages `@base-ui/react`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Spinner](https://gelatinui.com/components/spinner.md) - [Image](https://gelatinui.com/components/image.md) ## Accessibility Skeleton and `SkeletonText` render `
` elements with `aria-hidden="true"`, so a screen reader skips them. Put `aria-busy` on the region that loads, and remove it when the real content arrives. The pulse changes only opacity. Set `pulse={false}` where something else already moves. ## Motion | Part | Motion | | --- | --- | | Pulse | animate-pulse · 2s · cubic-bezier(0.4, 0, 0.6, 1) · repeats · opacity 100% → 50% → 100% | --- # Spinner > A small ring that turns while something loads and you cannot say how long it takes. It comes in 12, 16, and 24px and takes the color of the text. Page: https://gelatinui.com/components/spinner ## When to use it Best for: A wait of unknown length while something loads. - Use it when something loads and you do not know how long it takes. - Set `aria-label` to the task in the language of the page, for example "Saving". ## When not to use it - In a button, set `loading` on the [Button](https://gelatinui.com/components/button.md). - When you know how much is done, show the percent done, not a spinner. ## Notes for agents - Set `aria-label` to the task in the language of the page, such as "Saving". - In a Button, set `loading` on the Button instead of a Spinner child. ## Anatomy ```text Spinner ``` ## API reference ### Spinner | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"default" \| "lg" \| "sm"` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Spinner | `spinner` | | | | ## Usage Set `aria-label` to the task, such as "Loading invoices", in the language of the page. ```tsx title="invoice-list-loading.tsx" import { Spinner } from "@/components/ui/spinner"; export function InvoiceListLoading() { return (
); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/spinner ``` It adds 1 registry items: 1 files, 56 lines, and the npm packages `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Skeleton](https://gelatinui.com/components/skeleton.md) - [Button](https://gelatinui.com/components/button.md) ## Accessibility Spinner is a native `` with the role `status`. ## Motion | Part | Motion | | --- | --- | | Turn | animate-spin · 1s · linear · repeats | --- # Toast > A short message in a corner of the screen after people do something, such as a saved file. It closes on its own, stacks with others, and swipes away. Page: https://gelatinui.com/components/toast ## When to use it Best for: A short message about an action people just did, that times out on its own. - Use it for a short message about an action that people just did. - Call `toast.add()` from anywhere, also outside React. Render one `Toaster` in a `ToastProvider` near the app root. - Give a toast with an action a longer `timeout`, so a keyboard user can reach it. ## When not to use it - For a message that must stay on the page, use an [Alert](https://gelatinui.com/components/alert.md). - For a choice that people must make before they go on, use an [Alert Dialog](https://gelatinui.com/components/alert-dialog.md). ## Notes for agents - Render one `Toaster` in a `ToastProvider` near the app root, then call `toast.add()` from anywhere, also outside React. - Give a toast with an action a longer `timeout`, so a keyboard user can reach it. ## Anatomy ```text Toast ├─ ToastPortal (0..n) ├─ ToastViewport (0..n) ├─ ToastContent (0..n) ├─ ToastIcon (0..n) ├─ ToastHeader (0..n) ├─ ToastTitle (0..n) ├─ ToastDescription (0..n) ├─ ToastAction (0..n) ├─ ToastClose (0..n) ├─ ToastPositioner (0..n) ├─ ToastArrow (0..n) ├─ Toaster (0..n) └─ AnchoredToaster (0..n) ``` ## API reference ### ToastPortal Also takes every prop of Base UI `Toast.Portal`: https://base-ui.com/react/components/toast ### ToastViewport | Prop | Type | Default | Description | | --- | --- | --- | --- | | `position` | `"bottom-center" \| "bottom-end" \| "bottom-start" \| "top-center" \| "top-end" \| "top-start"` | "bottom-end" | | | `className` | `string` | | | | `variant` | `"default" \| "inverse"` | "default" | The look of every toast in this viewport: `default` (the popover surface) or `inverse` (the foreground surface). One look per stack: mixed looks in a collapsed stack show a dark card peeking out under a light one. | ### Toast | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `swipeDirection` | `union` | | Directions that dismiss it. By default: toward the edge and the side of the viewport. | Also takes every prop of Base UI `Toast.Root`: https://base-ui.com/react/components/toast ### ToastContent | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### ToastIcon | Prop | Type | Default | Description | | --- | --- | --- | --- | | `type` | `string` | | The toast `type`. `success`, `destructive`, `warning`, and `info` show an icon, `loading` a spinner. The `error` type of Base UI `toast.promise` shows as `destructive`. | ### ToastHeader No props of its own: `className`, `children`, and every other prop go to the element it renders. ### ToastTitle | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### ToastDescription | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### ToastAction | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### ToastClose | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### ToastPositioner | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `Toast.Positioner`: https://base-ui.com/react/components/toast ### ToastArrow | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### Toaster | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `variant` | `"default" \| "inverse"` | | The look of every toast in this viewport: `default` (the popover surface) or `inverse` (the foreground surface). One look per stack: mixed looks in a collapsed stack show a dark card peeking out under a light one. | | `position` | `"bottom-center" \| "bottom-end" \| "bottom-start" \| "top-center" \| "top-end" \| "top-start"` | | | | `container` | `ToastPortalProps["container"]` | | Where the viewport renders (Base UI `Toast.Portal`). By default, the end of ``. | | `closeLabel` | `string` | | The accessible name of each close button ("Close" by default). Translate it with the page. | ### AnchoredToaster | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `container` | `ToastPortalProps["container"]` | | Where the toasts render (Base UI `Toast.Portal`). By default, the end of ``. | | `arrow` | `boolean` | true | Show the arrow that points at the anchor. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | ToastPortal | `toast-portal` | | | | | ToastViewport | `toast-viewport` | | `--action-bar-offset`, `--spacing` | `motion-timing` | | Toast | `toast` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastContent | `toast-content` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastIcon | `toast-icon` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastHeader | `toast-header` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastTitle | `toast-title` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastDescription | `toast-description` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastAction | `toast-action` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastClose | `toast-close` | `data-behind`, `data-ending-style`, `data-expanded`, `data-limited`, `data-position`, `data-starting-style`, `data-swipe-direction`, `data-swiping` | `--toast-clamped-height`, `--toast-frontmost-height`, `--toast-gap`, `--toast-height`, `--toast-index`, `--toast-offset-y`, `--toast-peek`, `--toast-scale`, `--toast-sign`, `--toast-swipe-movement-x`, `--toast-swipe-movement-y`, `--toast-y` | `motion-timing`, `status-colors` | | ToastPositioner | `toast-positioner` | | `--available-width` | | | ToastArrow | `toast-arrow` | | | | | Toaster | `toaster` | | | | | AnchoredToaster | `toast-viewport` | | | | ## Usage Render one `Toaster` in a `ToastProvider` near the app root, then call `toast.add()` from anywhere. Give a toast with an action a longer `timeout`, so a keyboard user can reach it. ```tsx title="delete-file.tsx" import { Button } from "@/components/ui/button"; import { ToastProvider, Toaster, toast } from "@/components/ui/toast"; function showDeleted(onUndo: () => void) { toast.add({ title: "File deleted", description: "report.pdf", timeout: 10_000, actionProps: { children: "Undo", onClick: onUndo }, }); } export function DeleteFile({ onUndo }: { onUndo: () => void }) { return ( ); } ``` ## Compose Build it with: - [Sidebar](https://gelatinui.com/components/sidebar.md): Moves between the settings sections. - [Frame](https://gelatinui.com/components/frame.md): Groups the fields of one section, with Save in its footer. - [Field](https://gelatinui.com/components/field.md): Names each control and shows its help or error text. - [Switch](https://gelatinui.com/components/switch.md): Turns one setting on or off at once. - [Select](https://gelatinui.com/components/select.md): Picks one value from a short list. - [Button](https://gelatinui.com/components/button.md): Saves the section or opens a dialog. - [Alert Dialog](https://gelatinui.com/components/alert-dialog.md): Asks for the confirm and blocks the page. Rules: - Group with a Frame (`group-in-frames`): Put related panels in one `Frame` with its header and footer outside the panels, and keep a plain `Card` for one block of content. - Name every control (`label-every-control`): Give every field a visible `Label` (or a `Field`), and every icon button a `Tooltip` or an `aria-label`. - Labels real apps use (`real-labels`): Write the button and menu labels that real apps use ("Create API key", "Invite members"), with no "…" at the end. - No layout jump (`no-layout-jump`): When a state change adds, removes, or resizes content, reserve its space or animate its size, so nothing below it jumps. Patterns: `gelatin://patterns/settings-page`, `gelatin://patterns/confirm-action` ## Add it ```bash npx shadcn@latest add @gelatin-ui/toast ``` It adds 19 registry items: 16 files, 2887 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Button](https://gelatinui.com/components/button.md) - [Spinner](https://gelatinui.com/components/spinner.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Alert](https://gelatinui.com/components/alert.md): Pick Alert for a message that must stay in the page until its cause goes away. - [Alert Dialog](https://gelatinui.com/components/alert-dialog.md): Pick Alert Dialog when people must answer yes or no before they go on. - [Button](https://gelatinui.com/components/button.md) ## Keyboard | Keys | Action | | --- | --- | | F6 | Moves focus into the toasts and pauses every timer. | | Shift Tab | Moves focus back out of the toasts. | | Esc | Closes the focused toast. | ## Accessibility The viewport is a Base UI `Toast.Viewport`: a landmark with `role="region"` and `aria-live="polite"`. Base UI names it "Notifications" in English. Pass a translated `aria-label`. Each toast is a `role="dialog"`, named by its title. A toast with `priority: "high"` is an `alertdialog`, and a screen reader reads it at once. A `low` toast (the default) is read after the current speech. The status icon is `aria-hidden`, because the title says the same thing in words. The close button is named "Close". Set `closeLabel` on `Toaster` to translate it. F6 moves focus into the toasts and pauses every timer. Hover also pauses them. Swipe is never the only way out: the close button and the timeout also remove a toast. The close button and the action are 24px, with a 44px target on touch (`hit-area`). ## Motion | Part | Motion | | --- | --- | | Enter and stack | toast · 300ms · ease-panel (0.2, 0.4, 0.2, 1) | | Close | toast-exit · 150ms · ease-out (0, 0, 0.2, 1) | | Anchored toast | popup · 150ms · ease-panel (0.2, 0.4, 0.2, 1) | --- # Avatar > Shows a person or a workspace as a photo, initials, or an icon. Initials show while the photo loads, and a small badge can show if the person is online. Page: https://gelatinui.com/components/avatar ## When to use it Best for: A picture of a person or a workspace: an image, initials, or an icon. - Compose `AvatarImage` and `AvatarFallback`, so a broken photo shows initials. For a person, put `personInitials(name)` in the fallback. - Use `AvatarGroup` for a stack: the avatars take its `size` and `rounded`. - Use `inset` for a logo or a site icon on a muted fill. ## When not to use it - For a short status word, use a [Badge](https://gelatinui.com/components/badge.md). ## Notes for agents - It is not interactive. To open a menu, render it inside a Button, which owns the focus ring and the 44px target. - Next to a visible name, use `alt=""` and `aria-hidden` on the fallback. Alone, put the name in `alt`. - Two initials do not fit at `xs` (20px): use one. ## Anatomy ```text Avatar ├─ AvatarImage (0..n) ├─ AvatarFallback (0..n) ├─ AvatarBadge (0..n) ├─ AvatarGroup (0..n) └─ AvatarGroupCount (0..n) ``` ## API reference ### Avatar | Prop | Type | Default | Description | | --- | --- | --- | --- | | `inset` | `boolean` | false | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xl" \| "xs"` | | | | `className` | `string` | | | ### AvatarImage | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `plain` | `boolean` | false | A plain `` over the fallback, with no load state (only `src`, `alt`, and `ref` pass), for a virtual list that mounts avatars on each scroll frame. A failed photo shows the fallback. | Also takes every prop of Base UI `Avatar.Image`: https://base-ui.com/react/components/avatar ### AvatarFallback | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `Avatar.Fallback`: https://base-ui.com/react/components/avatar ### AvatarBadge | Prop | Type | Default | Description | | --- | --- | --- | --- | | `status` | `"away" \| "busy" \| "default" \| "offline" \| "online"` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Avatar | `avatar` | `data-ending-style`, `data-error`, `data-loading`, `data-popup-open`, `data-starting-style` | | `hit-area`, `motion-timing` | | AvatarImage | `avatar-image` | `data-ending-style`, `data-error`, `data-loading`, `data-popup-open`, `data-starting-style` | | `hit-area`, `motion-timing` | | AvatarFallback | `avatar-fallback` | `data-ending-style`, `data-error`, `data-loading`, `data-popup-open`, `data-starting-style` | | `hit-area`, `motion-timing` | | AvatarBadge | `avatar-badge` | `data-ending-style`, `data-error`, `data-loading`, `data-popup-open`, `data-starting-style` | | `hit-area`, `motion-timing` | | AvatarGroup | `avatar-group` | | | | | AvatarGroupCount | `avatar-group-count` | `data-ending-style`, `data-error`, `data-loading`, `data-popup-open`, `data-starting-style` | | `hit-area`, `motion-timing` | ## Usage Pass an image and a fallback. ```tsx title="user-avatar.tsx" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; export function UserAvatar() { return ( DR ); } ``` ## Compose Build it with: - [Sidebar](https://gelatinui.com/components/sidebar.md): Holds the groups of links and collapses to icons. - [Badge](https://gelatinui.com/components/badge.md): Shows a count next to a link. - [Menu](https://gelatinui.com/components/menu.md): Holds the account and workspace actions. Rules: - Steady text weight (`steady-weight`): Never change the font weight on hover, focus, selected, active, or open; change the color or the fill, so the text does not jump. - Color has a job (`color-has-a-job`): Use color only for a status, the brand action, or data; keep the rest neutral, and show a level with a small mark (a dot, a tinted badge) before a big fill. - Touch targets (`touch-targets`): Give every control a hit area of at least 44 px on touch screens, even when it looks smaller. - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. Patterns: `gelatin://patterns/app-sidebar` ## Add it ```bash npx shadcn@latest add @gelatin-ui/avatar ``` It adds 7 registry items: 4 files, 1513 lines, and the npm packages `@base-ui/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Dot](https://gelatinui.com/components/dot.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Avatar Group](https://gelatinui.com/components/avatar-group.md) - [Badge](https://gelatinui.com/components/badge.md) - [Menu](https://gelatinui.com/components/menu.md) ## Accessibility The name comes from `alt` on the image. Next to a visible name, leave it empty. An `AvatarGroup` of decoration takes `aria-hidden`. ## Motion | Part | Motion | | --- | --- | | Image | fade · the image fades in when it loads | --- # Avatar Group > Shows a few people as overlapping avatars with a count of the others. Every avatar gets the same size and corner, and the count can open the full list. Page: https://gelatinui.com/components/avatar-group ## When to use it Best for: A few people in a small space, such as a table row or a card, with a count of the others. - Set `size` and `rounded` on the group: every avatar and the count inside take them. - End with an `AvatarGroupCount` for the people that do not show. - Render the count as a button that opens the full list when people need the names. ## When not to use it - For one person, use an [Avatar](https://gelatinui.com/components/avatar.md). - For a list of people with names, use an [Item](https://gelatinui.com/components/item.md). ## Notes for agents - It installs with Avatar: the code is in `ui/avatar.tsx`, as in shadcn. - Inside a button, pass `render={}`: a `
` is not valid in a ` ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/indicator ``` It adds 20 registry items: 18 files, 3689 lines, and the npm packages `@base-ui/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Dot](https://gelatinui.com/components/dot.md) - [Rolling Number](https://gelatinui.com/components/rolling-number.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Badge](https://gelatinui.com/components/badge.md) - [Dot](https://gelatinui.com/components/dot.md) - [Rolling Number](https://gelatinui.com/components/rolling-number.md) - [Avatar](https://gelatinui.com/components/avatar.md) ## Motion | Part | Motion | | --- | --- | | Badge in and out | fade · the badge fades in and scales from 0.9; it leaves on fadeExit | | Count up | panel · the digits roll and the badge pops to 1.1 and back | --- # Notification Bell > A bell button with the number of unread notifications. When new ones come in, the count rolls up and the bell rings. Page: https://gelatinui.com/components/notification-bell ## When to use it Best for: The bell in an app header that shows how many notifications are unread and opens their panel. - Pass the unread number as `count`. At 0 the mark goes away. - Use `mark="dot"` when only "something is new" matters. - Pass the bell as the `render` element of a `PopoverTrigger` to open a list. ## When not to use it - For a count on any other control or avatar, use an [Indicator](https://gelatinui.com/components/indicator.md). - For a bell icon with no button and no count, use the [Animated Bell Icon](https://gelatinui.com/components/animated-bell-icon.md). ## Notes for agents - `count` is required. A value under 0 or `NaN` shows no mark. - A rise rolls the digits, pops the badge, and rings the bell once. A fall only rolls. - Over `max` (default 99) the badge shows `99+` and stays still, but the bell still rings. - Give the button an `aria-label` such as "Notifications". The `dot` mark names itself with `unreadLabel`. - `variant` is `ghost` or `outline`; `size` is `sm` (28 px), `default` (32), or `lg` (36). ## Anatomy ```text NotificationBell ``` ## API reference ### NotificationBell | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `busy` | `boolean` | | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. | | `spinnerPlacement` | `"center" \| "start"` | | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. | | `glass` | `"clear" \| "dark" \| "light"` | | | | `rounded` | `"default" \| "full"` | | | | `count` | `number` | | The number of unread items. 0 (and a value under 0) shows no mark. | | `mark` | `"count" \| "dot"` | "count" | `count` (default) shows the number; `dot` shows only that something is new. | | `variant` | `"ghost" \| "outline"` | "ghost" | `ghost` (default) for a header or a toolbar; `outline` on a plain page. | | `size` | `"default" \| "lg" \| "sm"` | "default" | The bell size: `sm` 28px, `default` 32px, `lg` 36px. | | `max` | `number` | 99 | The largest number to show; a larger count shows "99+". Default 99. | | `locale` | `string` | | The BCP 47 locale of the digits ("ar-EG" gives "١٢"). Default: `useDisplayLocale`. | | `unreadLabel` | `function` | unreadWords | The name of the `dot` mark: "12 unread". Default English words. | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | NotificationBell | `notification-bell` | | | | ## Usage Pass the unread count, and open the list from a Popover. The sample also uses `popover`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/notification-bell @gelatin-ui/popover ``` ```tsx title="inbox-bell.tsx" import { NotificationBell } from "@/components/actions/notification-bell"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; export function InboxBell({ unread }: { unread: number }) { return ( } /> You have {unread} unread notifications. ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/notification-bell ``` It adds 33 registry items: 30 files, 5046 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Animated Bell Icon](https://gelatinui.com/components/animated-bell-icon.md) - [Button](https://gelatinui.com/components/button.md) - [Indicator](https://gelatinui.com/components/indicator.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Indicator](https://gelatinui.com/components/indicator.md) - [Animated Bell Icon](https://gelatinui.com/components/animated-bell-icon.md) - [Popover](https://gelatinui.com/components/popover.md) --- # Status Icon > A small icon for the status of a task or an issue, from Backlog to Done. In progress shows a pie of the work done, and a change of status animates. Page: https://gelatinui.com/components/status-icon ## When to use it Best for: A small workflow status glyph next to an issue or a task. - Pass `status`: backlog, todo, in-progress, in-review, done, canceled, or duplicate. - Use `progress` for the pie of a started status (0 to 1). - Use `aria-hidden` when a word next to it already says the status. ## When not to use it - For a status as a word, use a [Badge](https://gelatinui.com/components/badge.md). - For a small color mark, use a [Dot](https://gelatinui.com/components/dot.md). ## Notes for agents - The shape carries the status, not only the color. - The default name is the English status name ("In Progress"). Pass `aria-label` for your language. - A change of `status` or `progress` plays in stages: ring, pie, disc, check. - Sizes: `xs` 12px, `sm` 14px, `default` 16px, `lg` 20px. ## Anatomy ```text StatusIcon ``` ## API reference ### StatusIcon | Prop | Type | Default | Description | | --- | --- | --- | --- | | `aria-label` | `string` | | Defines a string value that labels the current element. The accessible name. Default: the English status name ("In Progress"). Pass `aria-hidden` when a visible word next to the icon already says the status. An empty string counts as `aria-hidden`, so the icon never has an empty name. | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `status` | `"backlog" \| "canceled" \| "done" \| "duplicate" \| "in-progress" \| "in-review" \| "todo"` | "todo" | | | `progress` | `number` | | How much of a started status is done, 0 to 1. It sets the pie of `in-progress` and `in-review` (default 0.5 and 0.75), for a custom started status ("In QA" at 0.9). Other statuses ignore it. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | StatusIcon | `status-icon` | | | `motion-timing` | ## Usage Pass the status. ```tsx title="issue-status.tsx" import { StatusIcon } from "@/components/ui/status-icon"; export function IssueStatus() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/status-icon ``` It adds 7 registry items: 7 files, 2160 lines, and the npm packages `@base-ui/react`, `motion`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Badge](https://gelatinui.com/components/badge.md) - [Dot](https://gelatinui.com/components/dot.md) - [Progress](https://gelatinui.com/components/progress.md) ## Accessibility It is an `img` with the status name, or hidden with `aria-hidden`. An empty `aria-label` hides it, so the icon never has an empty name. ## Motion | Part | Motion | | --- | --- | | Pie | panel · 260ms · ease-panel (0.2, 0.4, 0.2, 1) | | Disc | statusPop · spring, stiffness 500, damping 30 | | Check | panel · 260ms · ease-panel (0.2, 0.4, 0.2, 1) | | Color and ring | fade · 150ms · ease-out (0, 0, 0.2, 1) | --- # Anchor > A text link for a sentence, a footer, or a View all line. It has three colors, four underline styles, and a mark for links to other sites. Page: https://gelatinui.com/components/anchor ## When to use it Best for: A link that goes somewhere: in a sentence, a footer, or a card header. - Use `underline="always"` in a sentence. - Use `underline="hover"` where the layout already marks the link, such as a footer. - Pass `aria-current="page"` for the page you are on. ## When not to use it - For an action on the page, such as Retry or Undo, use a [Button](https://gelatinui.com/components/button.md). - For the nav of a site, use a [Navigation Menu](https://gelatinui.com/components/navigation-menu.md). ## Notes for agents - Pass `render` for a router link: `render={}`. - `external` opens a new tab with `rel="noopener noreferrer"` and adds a mark. - A link that looks like a button uses `buttonVariants` on the `a`, not an Anchor. ## Anatomy ```text Anchor ``` ## API reference ### Anchor | Prop | Type | Default | Description | | --- | --- | --- | --- | | `tone` | `"destructive" \| "info" \| "neutral"` | "neutral" | | | `underline` | `"always" \| "dotted" \| "grow" \| "hover" \| "none"` | "always" | | | `variant` | `"default" \| "inherit" \| "muted"` | "default" | | | `external` | `boolean` | false | Opens the link in a new tab (`target="_blank"`, `rel="noopener noreferrer"`) and adds the arrow icon. A `target` or `rel` prop wins. | Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Anchor | `anchor` | `aria-current`, `aria-disabled`, `data-icon` | | `motion-timing`, `status-colors` | ## Usage Pass `href` and the text. ```tsx title="release-note.tsx" import { Anchor } from "@/components/ui/anchor"; export function ReleaseNote() { return (

The new prices start on 12 November. Read the release notes.

); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/anchor ``` It adds 6 registry items: 3 files, 1153 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Button](https://gelatinui.com/components/button.md) - [Navigation Menu](https://gelatinui.com/components/navigation-menu.md) - [Typography](https://gelatinui.com/components/typography.md) ## Keyboard | Keys | Action | | --- | --- | | Tab | Moves the focus to the link. | | Enter | Follows the link. | ## Accessibility It renders an `a`, so a screen reader says it is a link. A link in a sentence has no 44px target: a target would cover the lines above and below. ## Motion | Part | Motion | | --- | --- | | Color and line | hover · the text and the line get stronger | | Grow | panel · `underline="grow"` draws the line from the start edge | --- # Blockquote > Shows a quote with the person who said it, their role, and the source. Use the quiet style in an article, or the large pull quote for a testimonial. Page: https://gelatinui.com/components/blockquote ## When to use it Best for: A quotation with its author and source, in an article, a docs page, or a testimonial. - Use `variant="pull"` for testimonials and marketing quotes. - Put the author in `BlockquoteCaption` with `BlockquoteAuthor` and `BlockquoteDescription`. - Name the title of a work with `BlockquoteCite`. ## When not to use it - For a note that asks the reader to act, use an [Alert](https://gelatinui.com/components/alert.md). - For a message in a thread, use a quote in the message, not a page quote. ## Notes for agents - It renders a `
` with a `
` and a `
`. - `BlockquoteMark` is decorative; screen readers skip it. - `variant="reply"` quotes an earlier chat message: two muted lines and no caption. ## Anatomy ```text Blockquote ├─ BlockquoteMark (0..n) ├─ BlockquoteContent (0..n) ├─ BlockquoteCaption (0..n) ├─ BlockquoteAuthor (0..n) ├─ BlockquoteDescription (0..n) └─ BlockquoteCite (0..n) ``` ## API reference ### Blockquote | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"default" \| "pull" \| "reply"` | "default" | | ### BlockquoteMark | Prop | Type | Default | Description | | --- | --- | --- | --- | | `alt` | `string` | | | | `color` | `string` | | | | `weight` | `IconWeight` | | | | `mirrored` | `boolean` | | | ### BlockquoteContent No props of its own: `className`, `children`, and every other prop go to the element it renders. ### BlockquoteCaption No props of its own: `className`, `children`, and every other prop go to the element it renders. ### BlockquoteAuthor No props of its own: `className`, `children`, and every other prop go to the element it renders. ### BlockquoteDescription No props of its own: `className`, `children`, and every other prop go to the element it renders. ### BlockquoteCite No props of its own: `className`, `children`, and every other prop go to the element it renders. ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Blockquote | `blockquote` | | | | | BlockquoteMark | `blockquote-mark` | | | | | BlockquoteContent | `blockquote-content` | | | | | BlockquoteCaption | `blockquote-caption` | | | | | BlockquoteAuthor | `blockquote-author` | | | | | BlockquoteDescription | `blockquote-description` | | | | | BlockquoteCite | `blockquote-cite` | | | | ## Usage Import Blockquote and compose its parts. ```tsx title="blockquote.tsx" import { BlockquoteContent, Blockquote } from "@/components/ui/blockquote"; export function BlockquoteDemo() { return (
I found the export button in two seconds. I did not know software could do that.
); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/blockquote ``` It adds 2 registry items: 2 files, 226 lines, and the npm packages `@phosphor-icons/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Typography](https://gelatinui.com/components/typography.md) - [Card](https://gelatinui.com/components/card.md) - [Avatar](https://gelatinui.com/components/avatar.md) ## Accessibility The quote is a real `
` in a `
`, and the attribution is its `
`. --- # Calendar Sidebar N.01 > A floating sidebar for a calendar app: New, a month to page, find people, calendar lists with color checks, scheduling links, and the next meeting. Page: https://gelatinui.com/blocks/calendar-sidebar-01 ## When to use it Best for: The nav of a calendar app: a month to pick a day, calendar lists per account, scheduling links, and the next meeting. - Use it as the frame of a calendar or scheduling app. - Pass your words through `content`. Start from `CALENDAR_SIDEBAR_01_DEFAULT_CONTENT` and change the fields you need. - Pass your logo in `content.brand.mark`, and the logos of your scheduling and call tools in the link `mark` and `nextMeeting.joinMark`. With none, a letter tile and icons show. ## When not to use it - For a general app nav with a workspace switcher, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the Collapse sidebar row folds it to a 48px icon rail. The logo button opens it again. - In the icon rail the month, the lists, and the field hide. The New, Calendar, Calendars, and Meet with buttons stand for them: a press opens the panel. - Each calendar row owns its checked state. Pass `onCheckedChange` to `CalendarSidebar01CalendarRow` to filter your events. - The month picks a day: pass `onDayChange` to `CalendarSidebar01Month` to show that week. Days in `eventDays` get a dot. - A cookie keeps the state. Pass `cookie={false}` in a demo. - `CalendarSidebar01Page` is only the page bar, with a title and actions that do nothing: put your week view under it. - With children, the block ignores `content`. ## Anatomy ```text CalendarSidebar01 ├─ CalendarSidebar01BrandTile (0..n) ├─ CalendarSidebar01Brand (0..n) ├─ CalendarSidebar01CalendarCheck (0..n) ├─ CalendarSidebar01CalendarGroup (0..n) ├─ CalendarSidebar01CalendarRow (0..n) ├─ CalendarSidebar01Collapse (0..n) ├─ CalendarSidebar01Default (0..n) ├─ CalendarSidebar01LinkRow (0..n) ├─ CalendarSidebar01MeetWith (0..n) ├─ CalendarSidebar01Month (0..n) ├─ CalendarSidebar01New (0..n) ├─ CalendarSidebar01NextMeetingEvent (0..n) ├─ CalendarSidebar01NextMeetingJoin (0..n) ├─ CalendarSidebar01NextMeetingPeople (0..n) ├─ CalendarSidebar01NextMeetingTime (0..n) ├─ CalendarSidebar01NextMeetingTitle (0..n) ├─ CalendarSidebar01NextMeeting (0..n) ├─ CalendarSidebar01Page (0..n) ├─ CalendarSidebar01Panel (0..n) ├─ CalendarSidebar01RailButton (0..n) └─ CalendarSidebar01RailPerson (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | CalendarSidebar01 | `calendar-sidebar-01` | | | | | CalendarSidebar01BrandTile | `calendar-sidebar-01-brand-tile` | | `--radius` | | | CalendarSidebar01Brand | `calendar-sidebar-01-brand` | `data-collapsible` | | | | CalendarSidebar01CalendarCheck | `calendar-sidebar-01-calendar-check` | | `--foreground`, `--primary`, `--primary-foreground` | | | CalendarSidebar01CalendarGroup | `calendar-sidebar-01-calendar-group` | `data-collapsible` | | | | CalendarSidebar01CalendarRow | `calendar-sidebar-01-calendar-row` | `data-checked` | | | | CalendarSidebar01Collapse | `calendar-sidebar-01-collapse` | `data-collapsible` | | | | CalendarSidebar01Default | `calendar-sidebar-01-panel` | `data-collapsible` | | | | CalendarSidebar01LinkRow | `calendar-sidebar-01-link-row` | | | | | CalendarSidebar01MeetWith | `calendar-sidebar-01-meet-with` | `data-collapsible` | | | | CalendarSidebar01Month | `calendar-sidebar-01-month` | `data-collapsible` | | | | CalendarSidebar01New | `calendar-sidebar-01-new` | `data-collapsible` | | | | CalendarSidebar01NextMeetingEvent | `calendar-sidebar-01-next-meeting-event` | | | | | CalendarSidebar01NextMeetingJoin | `calendar-sidebar-01-next-meeting-join` | | | | | CalendarSidebar01NextMeetingPeople | `calendar-sidebar-01-next-meeting-people` | | | | | CalendarSidebar01NextMeetingTime | `calendar-sidebar-01-next-meeting-time` | | | | | CalendarSidebar01NextMeetingTitle | `calendar-sidebar-01-next-meeting-title` | | | | | CalendarSidebar01NextMeeting | `calendar-sidebar-01-next-meeting` | `data-collapsible` | `--radius` | | | CalendarSidebar01Page | `calendar-sidebar-01-page` | | | | | CalendarSidebar01Panel | `calendar-sidebar-01-panel` | | | | | CalendarSidebar01RailButton | `calendar-sidebar-01-rail-button` | `data-collapsible` | | | | CalendarSidebar01RailPerson | `calendar-sidebar-01-rail-person` | `data-collapsible` | | | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="calendar-frame.tsx" import { CalendarSidebar01 } from "@/components/blocks/pro/calendar-sidebar-01/calendar-sidebar-01"; export function CalendarFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/calendar-sidebar-01 ``` It adds 84 registry items: 102 files, 15785 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@internationalized/date`, `@mantine/hooks`, `@phosphor-icons/react`, `@tanstack/react-hotkeys`, `@xstate/react`, `clsx`, `motion`, `react-aria-components`, `tailwind-merge`, `tailwind-variants`, `xstate`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Button](https://gelatinui.com/components/button.md) - [Calendar](https://gelatinui.com/components/calendar.md) - [Checkbox](https://gelatinui.com/components/checkbox.md) - [Copy Button](https://gelatinui.com/components/copy-button.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Label](https://gelatinui.com/components/label.md) - [Menu](https://gelatinui.com/components/menu.md) - [Search Field](https://gelatinui.com/components/search-field.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Calendar](https://gelatinui.com/components/calendar.md) - [Checkbox](https://gelatinui.com/components/checkbox.md) - [Copy Button](https://gelatinui.com/components/copy-button.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Folds the panel to the icon rail, or opens it. | | Tab | Moves through the switcher, New, the month, the field, the rows, and the call button. | | Arrow keys | Move the focus between the days of the month. | | Enter, Space | Picks a day, opens a link, or shows and hides a calendar. | | Esc | Closes the workspace menu or the Drawer. | ## Accessibility The rail buttons show a tooltip with the name on the icon rail. Each calendar row is a label around its checkbox, so a press on the name toggles it. A day with events adds its words after the date in the screen reader name. ## Motion | Part | Motion | | --- | --- | | Rail | sheet · the panel width changes | --- # Campaigns Sidebar N.01 > The sidebar of an email marketing app: new campaign, campaigns by state, live automations, audiences with growth, the next send, and monthly sends. Page: https://gelatinui.com/blocks/campaigns-sidebar-01 ## When to use it Best for: The nav of an email marketing app: campaigns, automations, audiences, the next send, and the send quota in one panel. - Use it as the frame of an email marketing, newsletter, or lifecycle messaging app. - Pass your words, audiences, and numbers through `content`. Start from `CAMPAIGNS_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. ## When not to use it - For the nav of an app with no campaigns, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the collapse button makes it a 48px icon rail with Home, the four main links, and the face. - The panel owns the current row: the links, the campaign states, the audiences, and the next send share one raised chip. - The Campaigns row opens its page; the chevron at its end shows and hides the states. In the icon rail it shows as current when a state is current. - Each audience shows its change as a `CampaignsSidebar01Change`: pass the change as a ratio (`0.021` is +2.1%). - The monthly sends card is a `Meter` drawn as a half ring of the sends against the plan. - A cookie keeps the collapsed state. Pass `cookie={false}` in a demo. - `CampaignsSidebar01Page` is only the header bar of a campaign page; its buttons do nothing. Replace it with your page. ## Anatomy ```text CampaignsSidebar01 ├─ CampaignsSidebar01Account (0..n) ├─ CampaignsSidebar01Audience (0..n) ├─ CampaignsSidebar01Brand (0..n) ├─ CampaignsSidebar01Contents (0..n) ├─ CampaignsSidebar01Default (0..n) ├─ CampaignsSidebar01NextSend (0..n) ├─ CampaignsSidebar01Page (0..n) ├─ CampaignsSidebar01Panel (0..n) │ ├─ CampaignsSidebar01Branch (0..n) │ ├─ CampaignsSidebar01SubRow (0..n) │ └─ CampaignsSidebar01Row (0..n) ├─ CampaignsSidebar01Sends (0..n) ├─ CampaignsSidebar01AccountMenu (0..n) ├─ CampaignsSidebar01MenuPerson (0..n) ├─ CampaignsSidebar01MenuRow (0..n) ├─ CampaignsSidebar01ThemeMenu (0..n) └─ CampaignsSidebar01Change (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | CampaignsSidebar01 | `campaigns-sidebar-01` | | | | | CampaignsSidebar01Account | `campaigns-sidebar-01-account` | | | | | CampaignsSidebar01Audience | `campaigns-sidebar-01-audience` | | | | | CampaignsSidebar01Branch | `campaigns-sidebar-01-branch` | | | | | CampaignsSidebar01Brand | `campaigns-sidebar-01-brand` | | | | | CampaignsSidebar01Contents | `campaigns-sidebar-01-contents` | `data-collapsible` | | | | CampaignsSidebar01Default | `campaigns-sidebar-01-panel` | | | | | CampaignsSidebar01NextSend | `campaigns-sidebar-01-next-send` | | | `status-colors` | | CampaignsSidebar01Page | `campaigns-sidebar-01-page` | | | | | CampaignsSidebar01Panel | `campaigns-sidebar-01-panel` | | | | | CampaignsSidebar01Sends | `campaigns-sidebar-01-sends` | `data-collapsible` | `--chart-1` | `status-colors` | | CampaignsSidebar01SubRow | `campaigns-sidebar-01-sub-row` | | | | | CampaignsSidebar01AccountMenu | `campaigns-sidebar-01-account-menu` | | | | | CampaignsSidebar01MenuPerson | `campaigns-sidebar-01-menu-person` | | | | | CampaignsSidebar01MenuRow | `campaigns-sidebar-01-menu-row` | | | | | CampaignsSidebar01Row | `campaigns-sidebar-01-row` | | | | | CampaignsSidebar01ThemeMenu | `campaigns-sidebar-01-theme-menu` | | | | | CampaignsSidebar01Change | `campaigns-sidebar-01-change` | | | | ## Usage Render it with no props for the ready panel and the header bar of a campaign page. ```tsx title="campaigns-frame.tsx" import { CampaignsSidebar01 } from "@/components/blocks/pro/campaigns-sidebar-01/campaigns-sidebar-01"; export function CampaignsFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/campaigns-sidebar-01 ``` It adds 67 registry items: 81 files, 12576 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) - [Dot](https://gelatinui.com/components/dot.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Menu](https://gelatinui.com/components/menu.md) - [Meter](https://gelatinui.com/components/meter.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Meter](https://gelatinui.com/components/meter.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Collapses or opens the panel. | | Tab | Moves through the app, search, collapse, Create campaign, the rows, the Campaigns chevron, and the account row. | | Esc | Closes the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The Campaigns chevron says if it shows or hides the states. The monthly sends gauge has the name Monthly sends. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Campaigns | panel · the states grow in and out | | Drawer | sheet · the panel under 768px | --- # Chat Sidebar N.01 > The sidebar of a team chat: quick views, channels where unread ones stand out, direct messages with presence, apps, a live huddle card, and your status. Page: https://gelatinui.com/blocks/chat-sidebar-01 ## When to use it Best for: The nav of a team chat: quick views, channels, direct messages with presence, apps, a huddle, and your status. - Use it as the frame of a chat, community, or support inbox app. - Pass your words through `content`. Start from `CHAT_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. - Give each app row a `logo` with the mark of the app, and the workspace a `logo` with your logo. ## When not to use it - For the nav of an app with workspaces and teams, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - Set `unread` on a row: `true` shows it in ink with its count or a dot, `false` mutes it. A `tone: "alert"` count is red. - ⌘K (Ctrl+K elsewhere) presses the search row. Pass `onClick` to `ChatSidebar01Search` to open your search. - ⌘B (Ctrl+B elsewhere), the rail, or the Collapse sidebar row collapses it to a 48px icon rail. Rows with `rail: true` and the open row stay there. - A cookie keeps the state. Pass `cookie={false}` in a demo. - Under 768px the panel is a left Drawer, and the page bar shows its button. - `ChatSidebar01Page` is only the page bar: put your messages under it, or replace it. - To change the order or drop a part, pass the parts as children. With children, the block ignores `content`. ## Anatomy ```text ChatSidebar01 ├─ ChatSidebar01Collapse (0..n) ├─ ChatSidebar01Contents (0..n) ├─ ChatSidebar01Default (0..n) ├─ ChatSidebar01Face (0..n) ├─ ChatSidebar01Huddle (0..n) ├─ ChatSidebar01Lead (0..n) ├─ ChatSidebar01Me (0..n) ├─ ChatSidebar01Page (0..n) ├─ ChatSidebar01Search (0..n) ├─ ChatSidebar01Switcher (0..n) ├─ ChatSidebar01WorkspaceTile (0..n) ├─ ChatSidebar01AccountMenu (0..n) ├─ ChatSidebar01MenuPerson (0..n) ├─ ChatSidebar01MenuRow (0..n) ├─ ChatSidebar01Panel (0..n) │ ├─ ChatSidebar01Conversation (0..n) │ └─ ChatSidebar01Row (0..n) └─ ChatSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | ChatSidebar01 | `chat-sidebar-01` | | | | | ChatSidebar01Collapse | `chat-sidebar-01-collapse` | `data-collapsible` | | | | ChatSidebar01Contents | `chat-sidebar-01-contents` | `data-collapsible` | | | | ChatSidebar01Conversation | `chat-sidebar-01-conversation` | `data-active`, `data-collapsible` | | | | ChatSidebar01Default | `chat-sidebar-01-panel` | | | | | ChatSidebar01Face | `chat-sidebar-01-face` | | | | | ChatSidebar01Huddle | `chat-sidebar-01-huddle` | `data-collapsible` | | `hit-area`, `status-colors` | | ChatSidebar01Lead | `chat-sidebar-01-lead` | | | | | ChatSidebar01Me | `chat-sidebar-01-me` | `data-collapsible` | | | | ChatSidebar01Page | `chat-sidebar-01-page` | | | | | ChatSidebar01Search | `chat-sidebar-01-search` | `data-collapsible` | | | | ChatSidebar01Switcher | `chat-sidebar-01-switcher` | | | | | ChatSidebar01WorkspaceTile | `chat-sidebar-01-workspace-tile` | | | | | ChatSidebar01AccountMenu | `chat-sidebar-01-account-menu` | | | | | ChatSidebar01MenuPerson | `chat-sidebar-01-menu-person` | | | | | ChatSidebar01MenuRow | `chat-sidebar-01-menu-row` | | | | | ChatSidebar01Panel | `chat-sidebar-01-panel` | | | | | ChatSidebar01Row | `chat-sidebar-01-row` | | | | | ChatSidebar01ThemeMenu | `chat-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="chat-frame.tsx" import { ChatSidebar01 } from "@/components/blocks/pro/chat-sidebar-01/chat-sidebar-01"; export function ChatFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/chat-sidebar-01 ``` It adds 54 registry items: 71 files, 11122 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Dot](https://gelatinui.com/components/dot.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Menu](https://gelatinui.com/components/menu.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Toggle](https://gelatinui.com/components/toggle.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Avatar](https://gelatinui.com/components/avatar.md) - [Menu](https://gelatinui.com/components/menu.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘K, Ctrl+K | Presses the search row. | | ⌘B, Ctrl+B | Collapses or opens the panel. | | Tab | Moves through the switcher, search, the rows, the huddle, and the foot. | | Esc | Closes the workspace menu or the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The open row has `aria-current="page"`, and the mute button says if it is pressed. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Drawer | sheet · the panel under 768px | --- # Database Sidebar N.01 > The drill-down sidebar of a database base: a back row, its tables with record counts, the views of the open table, interfaces, and records used. Page: https://gelatinui.com/blocks/database-sidebar-01 ## When to use it Best for: The nav inside one base of a database app: a way back, the tables, the views, the interfaces, and the record limit. - Use it as the frame of a database, a spreadsheet app, or a no-code tool, after a person opens one base. - Pass your words, tables, and views through `content`. Start from `DATABASE_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. ## When not to use it - For the nav of an app with no drill-down, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the collapse button makes it a 48px icon rail. - The back row is a button that does nothing by itself: pass `onClick`, or a link through `render`. - The panel owns the current view or interface row. `DatabaseSidebar01Tables` owns the open table, so both show a raised row. - The records card is a `Meter` of the records against the plan, with a waffle of 60 cells that fill column by column. - The account row is a plain button: pass `onClick`, or a link or menu trigger through `render`. - A cookie keeps the collapsed state. Pass `cookie={false}` in a demo. - `DatabaseSidebar01Page` is only the header bar of a grid page; its buttons do nothing. Replace it with your page. ## Anatomy ```text DatabaseSidebar01 ├─ DatabaseSidebar01Account (0..n) ├─ DatabaseSidebar01Back (0..n) ├─ DatabaseSidebar01Base (0..n) ├─ DatabaseSidebar01Contents (0..n) ├─ DatabaseSidebar01Default (0..n) ├─ DatabaseSidebar01Page (0..n) ├─ DatabaseSidebar01Panel (0..n) │ └─ DatabaseSidebar01Row (0..n) ├─ DatabaseSidebar01Records (0..n) │ ├─ DatabaseSidebar01RecordsHeader (0..n) │ ├─ DatabaseSidebar01RecordsNote (0..n) │ └─ DatabaseSidebar01RecordsWaffle (0..n) ├─ DatabaseSidebar01Tables (0..n) │ └─ DatabaseSidebar01TableRow (0..n) ├─ DatabaseSidebar01ViewTile (0..n) ├─ DatabaseSidebar01AccountMenu (0..n) ├─ DatabaseSidebar01MenuPerson (0..n) ├─ DatabaseSidebar01MenuRow (0..n) └─ DatabaseSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | DatabaseSidebar01 | `database-sidebar-01` | | | | | DatabaseSidebar01Account | `database-sidebar-01-account` | | | | | DatabaseSidebar01Back | `database-sidebar-01-back` | | | | | DatabaseSidebar01Base | `database-sidebar-01-base` | `data-collapsible` | | | | DatabaseSidebar01Contents | `database-sidebar-01-contents` | `data-collapsible` | | | | DatabaseSidebar01Default | `database-sidebar-01-panel` | | | | | DatabaseSidebar01Page | `database-sidebar-01-page` | | | | | DatabaseSidebar01Panel | `database-sidebar-01-panel` | | | | | DatabaseSidebar01RecordsHeader | `database-sidebar-01-records-header` | | | `status-colors` | | DatabaseSidebar01RecordsNote | `database-sidebar-01-records-note` | | | | | DatabaseSidebar01RecordsWaffle | `database-sidebar-01-records-waffle` | `data-filled` | `--radius` | `status-colors` | | DatabaseSidebar01Records | `database-sidebar-01-records` | `data-collapsible` | | | | DatabaseSidebar01TableRow | `database-sidebar-01-table-row` | `data-collapsible` | | `status-colors` | | DatabaseSidebar01Tables | `database-sidebar-01-tables` | | | | | DatabaseSidebar01ViewTile | `database-sidebar-01-view-tile` | `data-tone` | `--radius` | `status-colors` | | DatabaseSidebar01AccountMenu | `database-sidebar-01-account-menu` | | | | | DatabaseSidebar01MenuPerson | `database-sidebar-01-menu-person` | | | | | DatabaseSidebar01MenuRow | `database-sidebar-01-menu-row` | | | | | DatabaseSidebar01Row | `database-sidebar-01-row` | | | | | DatabaseSidebar01ThemeMenu | `database-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the header bar of a grid page. ```tsx title="base-frame.tsx" import { DatabaseSidebar01 } from "@/components/blocks/pro/database-sidebar-01/database-sidebar-01"; export function BaseFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/database-sidebar-01 ``` It adds 62 registry items: 78 files, 12732 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Menu](https://gelatinui.com/components/menu.md) - [Meter](https://gelatinui.com/components/meter.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Meter](https://gelatinui.com/components/meter.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Collapses or opens the panel. | | Tab | Moves through the back row, the collapse button, the rows, the group buttons, and the account. | | Esc | Closes the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The open table and the current view each have `aria-current`. The records card is a meter with its value in words. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Drawer | sheet · the panel under 768px | --- # Docs Sidebar N.01 > The sidebar of a team wiki: Ask the wiki, favorites, teamspaces as a page tree, synced sources, private pages, trash, and invites. It folds to a rail. Page: https://gelatinui.com/blocks/docs-sidebar-01 ## When to use it Best for: The nav of a team wiki: Ask the wiki, favorites, teamspace page trees, synced sources, and private pages. - Use it as the frame of a wiki, docs, or notes app with teams. - Pass your words through `content`. Start from `DOCS_SIDEBAR_01_DEFAULT_CONTENT` and change the fields you need. - Pass your logo in `content.brand.mark`, and the logo of each synced tool in its `mark`. With none, a letter tile and plain icons show. ## When not to use it - For a notes app with one space and an AI usage pill, use [Notes Sidebar N.01](https://gelatinui.com/blocks/notes-sidebar-01.md). - For the parts with no ready contents, use [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the close button folds it to a 48px icon rail. The logo button opens it again. - In the icon rail the teamspaces, synced, and private groups hide. Search, the top rows, the favorites, and the face of the signed-in person stay. - A teamspace chevron folds its pages, and the row opens the teamspace. A page with `pages` is a folder: a press on its row folds its child pages. - ⌘J (Ctrl+J elsewhere) presses the Ask the wiki row. Pass `onClick` to open your answer panel. - A cookie keeps the state. Pass `cookie={false}` in a demo. - `DocsSidebar01Page` is only the page bar, with a path and actions that do nothing: put your editor under it. - With children, the block ignores `content`. ## Anatomy ```text DocsSidebar01 ├─ DocsSidebar01Ask (0..n) ├─ DocsSidebar01BranchPages (0..n) ├─ DocsSidebar01BranchToggle (0..n) ├─ DocsSidebar01Branch (0..n) ├─ DocsSidebar01Brand (0..n) ├─ DocsSidebar01Default (0..n) ├─ DocsSidebar01FolderTrigger (0..n) ├─ DocsSidebar01Folder (0..n) ├─ DocsSidebar01Invite (0..n) ├─ DocsSidebar01LinkRow (0..n) ├─ DocsSidebar01PageItem (0..n) ├─ DocsSidebar01Page (0..n) ├─ DocsSidebar01RailPerson (0..n) ├─ DocsSidebar01TeamTile (0..n) ├─ DocsSidebar01Teamspace (0..n) └─ DocsSidebar01Panel (0..n) ├─ DocsSidebar01SubRow (0..n) └─ DocsSidebar01Row (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | DocsSidebar01 | `docs-sidebar-01` | | | | | DocsSidebar01Ask | `docs-sidebar-01-ask` | | | | | DocsSidebar01BranchPages | `docs-sidebar-01-branch-pages` | | | | | DocsSidebar01BranchToggle | `docs-sidebar-01-branch-toggle` | | | | | DocsSidebar01Branch | `docs-sidebar-01-branch` | | | | | DocsSidebar01Brand | `docs-sidebar-01-brand` | `data-collapsible` | | | | DocsSidebar01Default | `docs-sidebar-01-panel` | `data-collapsible` | | | | DocsSidebar01FolderTrigger | `docs-sidebar-01-folder-trigger` | | | | | DocsSidebar01Folder | `docs-sidebar-01-folder` | | | | | DocsSidebar01Invite | `docs-sidebar-01-invite` | `data-collapsible` | | | | DocsSidebar01LinkRow | `docs-sidebar-01-link-row` | | | | | DocsSidebar01PageItem | `docs-sidebar-01-page-item` | | | | | DocsSidebar01Page | `docs-sidebar-01-page` | | | | | DocsSidebar01RailPerson | `docs-sidebar-01-rail-person` | `data-collapsible` | | | | DocsSidebar01SubRow | `docs-sidebar-01-sub-row` | | | | | DocsSidebar01TeamTile | `docs-sidebar-01-team-tile` | `data-tone` | `--radius` | `status-colors` | | DocsSidebar01Teamspace | `docs-sidebar-01-teamspace` | | | | | DocsSidebar01Panel | `docs-sidebar-01-panel` | | | | | DocsSidebar01Row | `docs-sidebar-01-row` | | | | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="wiki-frame.tsx" import { DocsSidebar01 } from "@/components/blocks/pro/docs-sidebar-01/docs-sidebar-01"; export function WikiFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/docs-sidebar-01 ``` It adds 57 registry items: 74 files, 10410 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Notes Sidebar N.01](https://gelatinui.com/blocks/notes-sidebar-01.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Folds the panel to the icon rail, or opens it. | | ⌘J, Ctrl+J | Presses the Ask the wiki row. | | Tab | Moves through the rows, the chevrons, the add buttons, and the invite row. | | Enter, Space | Opens a page, or folds the pages on a chevron or a folder. | | Esc | Closes the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. Each chevron and folder row tells its state with `aria-expanded`. The current page row has `aria-current="page"`. ## Motion | Part | Motion | | --- | --- | | Rail | sheet · the panel width changes | | Pages | panel · the pages grow and fold | --- # Drive Sidebar N.01 > The sidebar of a team drive: New, the main places, a folder tree, shared drives, an upload queue, and storage split by file type. Page: https://gelatinui.com/blocks/drive-sidebar-01 ## When to use it Best for: The nav of a file app: places, a folder tree, shared drives, uploads, and storage in one panel. - Use it as the frame of a drive, a file manager, or a media library. - Pass your words, folders, and uploads through `content`. Start from `DRIVE_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. ## When not to use it - For the nav of an app with no files, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the collapse button makes it a 48px icon rail. ⌘U (Ctrl+U) presses New: pass its `onClick`. - The panel owns the current row: places, folders, sub folders, and drives share one raised chip. - A folder row opens its page; the chevron at its end shows and hides its children. - The upload card reads the files you pass: a file sends with its percent or is in with a check. With no files it renders nothing. - The storage card is a `Meter` of the used space against the plan. The bar and the legend split it by file type. - A cookie keeps the collapsed state. Pass `cookie={false}` in a demo. - `DriveSidebar01Page` is only the header bar of a folder page; its buttons do nothing. Replace it with your page. ## Anatomy ```text DriveSidebar01 ├─ DriveSidebar01Account (0..n) ├─ DriveSidebar01Contents (0..n) ├─ DriveSidebar01Default (0..n) ├─ DriveSidebar01DriveTile (0..n) ├─ DriveSidebar01FolderItem (0..n) ├─ DriveSidebar01Folder (0..n) ├─ DriveSidebar01Members (0..n) ├─ DriveSidebar01New (0..n) ├─ DriveSidebar01Page (0..n) ├─ DriveSidebar01Panel (0..n) │ ├─ DriveSidebar01SubRow (0..n) │ └─ DriveSidebar01Row (0..n) ├─ DriveSidebar01Storage (0..n) │ ├─ DriveSidebar01StorageBar (0..n) │ ├─ DriveSidebar01StorageHeader (0..n) │ └─ DriveSidebar01StorageLegend (0..n) ├─ DriveSidebar01Switcher (0..n) ├─ DriveSidebar01UploadRow (0..n) ├─ DriveSidebar01UploadsHeader (0..n) ├─ DriveSidebar01UploadsTime (0..n) ├─ DriveSidebar01Uploads (0..n) │ ├─ DriveSidebar01UploadsList (0..n) │ ├─ DriveSidebar01UploadsProgress (0..n) │ └─ DriveSidebar01UploadsTitle (0..n) ├─ DriveSidebar01WorkspaceTile (0..n) ├─ DriveSidebar01AccountMenu (0..n) ├─ DriveSidebar01MenuPerson (0..n) ├─ DriveSidebar01MenuRow (0..n) └─ DriveSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | DriveSidebar01 | `drive-sidebar-01` | | | | | DriveSidebar01Account | `drive-sidebar-01-account` | | | | | DriveSidebar01Contents | `drive-sidebar-01-contents` | `data-collapsible` | | | | DriveSidebar01Default | `drive-sidebar-01-panel` | | | | | DriveSidebar01DriveTile | `drive-sidebar-01-drive-tile` | | `--radius` | | | DriveSidebar01FolderItem | `drive-sidebar-01-folder-item` | | | | | DriveSidebar01Folder | `drive-sidebar-01-folder` | | | | | DriveSidebar01Members | `drive-sidebar-01-members` | | | | | DriveSidebar01New | `drive-sidebar-01-new` | `data-collapsible` | | | | DriveSidebar01Page | `drive-sidebar-01-page` | | | | | DriveSidebar01Panel | `drive-sidebar-01-panel` | | | | | DriveSidebar01StorageBar | `drive-sidebar-01-storage-bar` | | | | | DriveSidebar01StorageHeader | `drive-sidebar-01-storage-header` | | | `status-colors` | | DriveSidebar01StorageLegend | `drive-sidebar-01-storage-legend` | | | | | DriveSidebar01Storage | `drive-sidebar-01-storage` | `data-collapsible` | | | | DriveSidebar01SubRow | `drive-sidebar-01-sub-row` | | | | | DriveSidebar01Switcher | `drive-sidebar-01-switcher` | | | | | DriveSidebar01UploadRow | `drive-sidebar-01-upload-row` | | | `status-colors` | | DriveSidebar01UploadsHeader | `drive-sidebar-01-uploads-header` | | | | | DriveSidebar01UploadsList | `drive-sidebar-01-uploads-list` | | | | | DriveSidebar01UploadsProgress | `drive-sidebar-01-uploads-progress` | | | | | DriveSidebar01UploadsTime | `drive-sidebar-01-uploads-time` | | | | | DriveSidebar01UploadsTitle | `drive-sidebar-01-uploads-title` | | | | | DriveSidebar01Uploads | `drive-sidebar-01-uploads` | `data-collapsible` | | | | DriveSidebar01WorkspaceTile | `drive-sidebar-01-workspace-tile` | | | | | DriveSidebar01AccountMenu | `drive-sidebar-01-account-menu` | | | | | DriveSidebar01MenuPerson | `drive-sidebar-01-menu-person` | | | | | DriveSidebar01MenuRow | `drive-sidebar-01-menu-row` | | | | | DriveSidebar01Row | `drive-sidebar-01-row` | | | | | DriveSidebar01ThemeMenu | `drive-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the header bar of a folder page. ```tsx title="drive-frame.tsx" import { DriveSidebar01 } from "@/components/blocks/pro/drive-sidebar-01/drive-sidebar-01"; export function DriveFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/drive-sidebar-01 ``` It adds 75 registry items: 102 files, 15222 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) - [Dot](https://gelatinui.com/components/dot.md) - [File Icon](https://gelatinui.com/components/file-icon.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Menu](https://gelatinui.com/components/menu.md) - [Meter](https://gelatinui.com/components/meter.md) - [Progress](https://gelatinui.com/components/progress.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [File Icon](https://gelatinui.com/components/file-icon.md) - [Meter](https://gelatinui.com/components/meter.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Collapses or opens the panel. | | ⌘U, Ctrl+U | Presses New. | | Tab | Moves through the workspace, search, collapse, New, the rows, New folder, and the folder chevrons. | | Esc | Closes a menu or the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. Each folder chevron says which folder it shows or hides. The storage card is a meter with its value in words. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Folder | panel · the children grow in and out | | Drawer | sheet · the panel under 768px | --- # Highlight > Marks the words in a text that match a search, so people see why a result came up. It can match whole words, letter case, and words with accents. Page: https://gelatinui.com/components/highlight ## When to use it Best for: Marking search terms in text or rich content, with each match wrapped in a Mark. - Use it to show why a search result matches. - Use `highlight` for one term or many. - Use `ranges` when a fuzzy search or a server gives the places to mark. - Use `wholeWord`, `caseSensitive`, `ignoreAccents`, and `locale` to change the matching. ## When not to use it - For a phrase that you choose by hand, use a [Mark](https://gelatinui.com/components/mark.md). ## Notes for agents - A blank search marks nothing, so an empty search field shows the content as it is. - `ranges` takes `[start, end)` in UTF-16 units and works only with plain string `children`. - Rich content is searched one text piece at a time, so a match does not cross two elements. - A component that reads the shape of its children sees one child. Give it plain strings, or skip it with `data-highlight-skip`. - For rich content with paragraphs or lists, use `render={
}`. A `` may not hold blocks. - It never builds a `RegExp` from the terms, so do not escape them. - Use `tone` for every mark, and `markProps` for other props of every mark. ## Anatomy ```text Highlight ``` ## API reference ### Highlight | Prop | Type | Default | Description | | --- | --- | --- | --- | | `caseSensitive` | `boolean` | | Match the exact case. Off by default: "key" also finds "Key". | | `ignoreAccents` | `boolean` | | Match letters with and without accents: "cafe" also finds "Café". It removes only the combining diacritical marks (U+0300 to U+036F: the accents of Latin, Greek, and Cyrillic), not the vowel signs of Devanagari or Thai, which change the word. Off by default. | | `wholeWord` | `boolean` | | Match only whole words: "key" finds "key" but not "Keychain". Off by default. | | `locale` | `string` | | The language of the text, for lowercasing (Turkish "I" → "ı") and word edges. Without it, the matcher uses the locale-free `toLowerCase`, so the server and the browser give the same marks. A tag that is not valid BCP 47 (`"en_US"`) falls back to no locale, with a warning in development, so a locale from user data cannot crash the render. | | `children` | `ReactNode` | | The content to search: a plain string, or rich content (nested elements). In rich content each text piece is searched on its own (see the rich-content notes on `Highlight`). | | `highlight` | `string \| readonly string[]` | NO_TERMS | One search term or many. Blank terms are skipped, so an empty search field marks nothing. | | `ranges` | `readonly HighlightRange[]` | | Ranges to mark, `[start, end)` in UTF-16 units, in place of `highlight` (a fuzzy search or a server gives them). They are clamped, sorted, merged, and widened to whole characters. Plain string `children` only: in rich content the indexes have no single text to point into. | | `tone` | `"destructive" \| "info" \| "neutral" \| "success" \| "warning"` | | The tone of every mark. | | `markProps` | `Omit` | | Props for every mark: `className`, `cue`, data attributes. | | `render` | `ReactElement` | | The root element, in place of the ``: `render={
}` for rich content with blocks (paragraphs, lists), which a `` may not hold. It gets the props and the marked content. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Highlight | `highlight` | | | | ## Usage Pass the search term as `highlight`, and the text as `children`. A blank search shows the text as it is. ```tsx title="search-snippet.tsx" import { Highlight } from "@/components/ui/highlight"; export function SearchSnippet({ query }: { query: string }) { return Rotate the API key every 90 days.; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/highlight ``` It adds 12 registry items: 11 files, 1255 lines, and the npm packages `@base-ui/react`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Mark](https://gelatinui.com/components/mark.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Mark](https://gelatinui.com/components/mark.md) - [Input](https://gelatinui.com/components/input.md) - [Typography](https://gelatinui.com/components/typography.md) ## Accessibility Each match is a native ``, so the text stays in place and in reading order. It has no hooks and takes no focus. It renders on the server. --- # Kbd > Shows a key or a shortcut in text, such as a search hint, a shortcut in a menu, or a key in help text. Page: https://gelatinui.com/components/kbd ## When to use it Best for: A key or a key combination in text: a search hint, a shortcut in a tooltip or a menu. - Use it to show a key as people see it on the keyboard: "⌘", "Ctrl", "Esc", "Enter". - Put keys that people press together in a `KbdGroup`. It has no plus sign. - For keys pressed one after the other, put the word "then" between two keys. ## When not to use it - Kbd does nothing on a click. For an action, use a [Button](https://gelatinui.com/components/button.md). ## Notes for agents - Write the key as it shows on the keyboard: "⌘", "Ctrl", "Esc". - Put keys pressed together in a `KbdGroup`; do not add a plus sign. ## Anatomy ```text Kbd └─ KbdGroup (0..n) ``` ## API reference ### Kbd | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"default" \| "lg"` | "default" | | | `variant` | `"default" \| "ghost"` | "default" | | ### KbdGroup No props of its own: `className`, `children`, and every other prop go to the element it renders. ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Kbd | `kbd` | | | | | KbdGroup | `kbd-group` | | | | ## Usage Write the key as it shows on the keyboard: "⌘", "Ctrl", "Esc". ```tsx title="search-shortcut-hint.tsx" import { Kbd, KbdGroup } from "@/components/ui/kbd"; export function SearchShortcutHint() { return (

Press{" "} ⌘ K {" "} to search, or Esc to close.

); } ``` ## Compose Build it with: - [Command](https://gelatinui.com/components/command.md): Holds the search field and the results. - [Empty](https://gelatinui.com/components/empty.md): Shows when no result matches. Rules: - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. - Steady text weight (`steady-weight`): Never change the font weight on hover, focus, selected, active, or open; change the color or the fill, so the text does not jump. - Sheets on phones (`phone-sheets`): Show a dialog or a large popover as a bottom sheet on a small screen. - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. Patterns: `gelatin://patterns/command-search` ## Add it ```bash npx shadcn@latest add @gelatin-ui/kbd ``` It adds 2 registry items: 2 files, 94 lines, and the npm packages `clsx`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Tooltip](https://gelatinui.com/components/tooltip.md) - [Badge](https://gelatinui.com/components/badge.md) ## Accessibility Kbd is the native ``. It is not a button: it has no focus stop and takes no pointer events. Kbd and `KbdGroup` set `dir="ltr"`, so "⌘ K" keeps its key order on a right-to-left page. --- # Mail Sidebar N.01 > The sidebar of a mail app: an account switcher, compose on C, mailboxes with unread counts, labels, other accounts, and storage. It collapses to an icon rail. Page: https://gelatinui.com/blocks/mail-sidebar-01 ## When to use it Best for: The nav of a mail app: compose, mailboxes with unread counts, labels, other accounts, and storage. - Use it as the frame of a mail, inbox, or support app. - Pass your words through `content`. Start from `MAIL_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. - Give each account a `mark` with the logo of its provider, and the app a `mark` with your logo. ## When not to use it - For the nav of an app with workspaces and teams, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - C presses Compose, unless a field, a menu, or a dialog has the focus. Pass `onClick` to `MailSidebar01Compose` to open your composer. - ⌘B (Ctrl+B elsewhere), the rail, or the header button collapses it to a 48px icon rail. Scheduled, categories, labels, accounts, and storage hide there. - A cookie keeps the state. Pass `cookie={false}` in a demo. - Under 768px the panel is a left Drawer, and the page bar shows its button. - `MailSidebar01Page` is only the page bar: put your message list under it, or replace it. - To change the order or drop a part, pass the parts as children. With children, the block ignores `content`. ## Anatomy ```text MailSidebar01 ├─ MailSidebar01Account (0..n) │ ├─ MailSidebar01AccountMenu (0..n) │ └─ MailSidebar01AccountTrigger (0..n) ├─ MailSidebar01AppBadge (0..n) ├─ MailSidebar01Compose (0..n) ├─ MailSidebar01Contents (0..n) ├─ MailSidebar01Default (0..n) ├─ MailSidebar01LabelDot (0..n) ├─ MailSidebar01PageTrigger (0..n) ├─ MailSidebar01Page (0..n) ├─ MailSidebar01Panel (0..n) │ └─ MailSidebar01Row (0..n) └─ MailSidebar01Storage (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | MailSidebar01 | `mail-sidebar-01` | | | | | MailSidebar01AccountMenu | `mail-sidebar-01-account-menu` | | | | | MailSidebar01AccountTrigger | `mail-sidebar-01-account-trigger` | | | | | MailSidebar01Account | `mail-sidebar-01-account` | | | | | MailSidebar01AppBadge | `mail-sidebar-01-app-badge` | | | | | MailSidebar01Compose | `mail-sidebar-01-compose` | `data-collapsible` | | | | MailSidebar01Contents | `mail-sidebar-01-contents` | `data-collapsible` | | `hit-area` | | MailSidebar01Default | `mail-sidebar-01-panel` | | | | | MailSidebar01LabelDot | `mail-sidebar-01-label-dot` | | | | | MailSidebar01PageTrigger | `mail-sidebar-01-page-trigger` | `data-state` | | `motion-timing` | | MailSidebar01Page | `mail-sidebar-01-page` | | | | | MailSidebar01Panel | `mail-sidebar-01-panel` | | | | | MailSidebar01Row | `mail-sidebar-01-row` | | | | | MailSidebar01Storage | `mail-sidebar-01-storage` | `data-collapsible`, `data-level` | | `status-colors` | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="mail-frame.tsx" import { MailSidebar01 } from "@/components/blocks/pro/mail-sidebar-01/mail-sidebar-01"; export function MailFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/mail-sidebar-01 ``` It adds 60 registry items: 71 files, 11427 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Anchor](https://gelatinui.com/components/anchor.md) - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Dot](https://gelatinui.com/components/dot.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Menu](https://gelatinui.com/components/menu.md) - [Meter](https://gelatinui.com/components/meter.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Meter](https://gelatinui.com/components/meter.md) - [Menu](https://gelatinui.com/components/menu.md) ## Keyboard | Keys | Action | | --- | --- | | C | Presses Compose. | | ⌘B, Ctrl+B | Collapses or opens the panel. | | Tab | Moves through the account, search, compose, the rows, and the storage link. | | Esc | Closes the account menu or the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The open mailbox has `aria-current="page"`, and the storage meter says its value in words. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Drawer | sheet · the panel under 768px | --- # Mark > Highlights a phrase that the reader must not miss, or the words that match a search. It wraps with the text and does not move it. Page: https://gelatinui.com/components/mark ## When to use it Best for: A highlight on a phrase that the reader must notice in running text. - Use it on a phrase that the reader must notice, or on the words that match a search. - Use the `neutral` tone for emphasis and search matches. - Use `success`, `warning`, `info`, or `destructive` only when the phrase is about that status. ## When not to use it - To find and mark search terms in a text, use a [Highlight](https://gelatinui.com/components/highlight.md). - For a status label on its own, use a [Badge](https://gelatinui.com/components/badge.md). ## Notes for agents - It is the native ``, with no size of its own. The font comes from the text around it. - The words must carry the meaning. Color alone does not. - It has no hooks and no state, so it renders on the server. - It takes no focus by itself. To make it a trigger, render it through a trigger with `role="button"`, such as `MenuTrigger nativeButton={false} render={}`. ## Anatomy ```text Mark ``` ## API reference ### Mark | Prop | Type | Default | Description | | --- | --- | --- | --- | | `tone` | `"destructive" \| "info" \| "neutral" \| "success" \| "warning"` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Mark | `mark` | | | | ## Usage Wrap the phrase. The mark takes the font of the text around it, and it wraps line by line. ```tsx title="vault-note.tsx" import { Mark } from "@/components/ui/mark"; export function VaultNote() { return (

Back up the vault before you rotate the key, or the old secrets are lost.

); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/mark ``` It adds 4 registry items: 3 files, 275 lines, and the npm packages `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Highlight](https://gelatinui.com/components/highlight.md) - [Badge](https://gelatinui.com/components/badge.md) - [Typography](https://gelatinui.com/components/typography.md) ## Accessibility It is the native ``. The words must carry the meaning, because color alone does not. Alone it takes no focus. To make it a trigger, render it through a trigger with `role="button"`. --- # Music Sidebar N.01 > The sidebar of a music or podcast app: the main places, a library with kind chips and cover art, friends who listen now, the next track, and a now playing card. Page: https://gelatinui.com/blocks/music-sidebar-01 ## When to use it Best for: The nav of a music or podcast app: places, a library, friends, and the player in one panel. - Use it as the frame of a music, podcast, or audiobook app. - Pass your words, library, and track through `content`. Start from `MUSIC_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. ## When not to use it - For the nav of an app with no media, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the collapse button makes it a 48px icon rail. The rail shows the cover of the track that plays now; a press on it or on the library row opens the panel. - The panel owns the current row: the places and the library rows share one raised chip. - The controls own the play state, or follow `playing`. Wire `onPlayingChange`, `onPrevious`, and `onNext` to your player. The progress shows the `elapsed` and `length` you pass. - With no `imageUrl`, a cover shows the first letter of its name. - A cookie keeps the collapsed state. Pass `cookie={false}` in a demo. - `MusicSidebar01Page` is only the header bar of a playlist page; its buttons do nothing. Replace it with your page. ## Anatomy ```text MusicSidebar01 ├─ MusicSidebar01Account (0..n) ├─ MusicSidebar01Brand (0..n) ├─ MusicSidebar01Controls (0..n) ├─ MusicSidebar01Cover (0..n) ├─ MusicSidebar01Default (0..n) ├─ MusicSidebar01Device (0..n) ├─ MusicSidebar01Friend (0..n) ├─ MusicSidebar01LibraryFilter (0..n) ├─ MusicSidebar01LibraryList (0..n) ├─ MusicSidebar01LibraryRow (0..n) ├─ MusicSidebar01NowPlaying (0..n) ├─ MusicSidebar01Page (0..n) ├─ MusicSidebar01Panel (0..n) │ ├─ MusicSidebar01RailLink (0..n) │ └─ MusicSidebar01Row (0..n) ├─ MusicSidebar01Progress (0..n) ├─ MusicSidebar01RailCover (0..n) ├─ MusicSidebar01TrackArtist (0..n) ├─ MusicSidebar01TrackText (0..n) ├─ MusicSidebar01TrackTitle (0..n) ├─ MusicSidebar01Track (0..n) ├─ MusicSidebar01UpNext (0..n) ├─ MusicSidebar01AccountMenu (0..n) ├─ MusicSidebar01MenuPerson (0..n) ├─ MusicSidebar01MenuRow (0..n) └─ MusicSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | MusicSidebar01 | `music-sidebar-01` | | | | | MusicSidebar01Account | `music-sidebar-01-account` | | | | | MusicSidebar01Brand | `music-sidebar-01-brand` | `data-collapsible` | | | | MusicSidebar01Controls | `music-sidebar-01-controls` | | | | | MusicSidebar01Cover | `music-sidebar-01-cover` | | | | | MusicSidebar01Default | `music-sidebar-01-panel` | `data-collapsible` | | | | MusicSidebar01Device | `music-sidebar-01-device` | | | `status-colors` | | MusicSidebar01Friend | `music-sidebar-01-friend` | | | | | MusicSidebar01LibraryFilter | `music-sidebar-01-library-filter` | | | | | MusicSidebar01LibraryList | `music-sidebar-01-library-list` | | | | | MusicSidebar01LibraryRow | `music-sidebar-01-library-row` | | | `status-colors` | | MusicSidebar01NowPlaying | `music-sidebar-01-now-playing` | `data-collapsible` | | | | MusicSidebar01Page | `music-sidebar-01-page` | | | | | MusicSidebar01Panel | `music-sidebar-01-panel` | | | | | MusicSidebar01Progress | `music-sidebar-01-progress` | | | | | MusicSidebar01RailCover | `music-sidebar-01-rail-cover` | `data-collapsible` | | | | MusicSidebar01RailLink | `music-sidebar-01-rail-link` | `data-collapsible` | | | | MusicSidebar01TrackArtist | `music-sidebar-01-track-artist` | | | | | MusicSidebar01TrackText | `music-sidebar-01-track-text` | | | | | MusicSidebar01TrackTitle | `music-sidebar-01-track-title` | | | | | MusicSidebar01Track | `music-sidebar-01-track` | `data-pressed` | | | | MusicSidebar01UpNext | `music-sidebar-01-up-next` | `data-collapsible` | | | | MusicSidebar01AccountMenu | `music-sidebar-01-account-menu` | | | | | MusicSidebar01MenuPerson | `music-sidebar-01-menu-person` | | | | | MusicSidebar01MenuRow | `music-sidebar-01-menu-row` | | | | | MusicSidebar01Row | `music-sidebar-01-row` | | | | | MusicSidebar01ThemeMenu | `music-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the header bar of a playlist page. ```tsx title="music-frame.tsx" import { MusicSidebar01 } from "@/components/blocks/pro/music-sidebar-01/music-sidebar-01"; export function MusicFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/music-sidebar-01 ``` It adds 81 registry items: 104 files, 15756 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@internationalized/date`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Duration](https://gelatinui.com/components/duration.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Menu](https://gelatinui.com/components/menu.md) - [Progress](https://gelatinui.com/components/progress.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Toggle](https://gelatinui.com/components/toggle.md) - [Toggle Group](https://gelatinui.com/components/toggle-group.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Toggle Group](https://gelatinui.com/components/toggle-group.md) - [Progress](https://gelatinui.com/components/progress.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Collapses or opens the panel. | | Tab | Moves through search, collapse, the rows, the kind chips, and the player controls. | | Arrow keys | Move between the kind chips. | | Esc | Closes the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The like, shuffle, and repeat buttons are toggles with their pressed state. The play button says Play or Pause by the state. The progress bar is named and has its value. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Drawer | sheet · the panel under 768px | --- # Notes Sidebar N.01 > A floating sidebar for a notes app: search, Ask AI, inbox, favorites, a team space with nested pages, and the AI answers left. It folds to an icon rail. Page: https://gelatinui.com/blocks/notes-sidebar-01 ## When to use it Best for: The nav of a notes or wiki app: search, Ask AI, inbox, favorites, a page tree, private pages, and an AI usage pill. - Use it as the frame of a notes, docs, or wiki app. - Pass your words through `content`. Start from `NOTES_SIDEBAR_01_DEFAULT_CONTENT` and change the fields you need. - Pass your logo in `content.brand.mark`. With none, a letter tile shows. ## When not to use it - For a general app nav with a workspace switcher, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the close button folds it to a 48px icon rail. The logo button opens it again. - In the icon rail the page groups hide, and the Favorites and Pages rows stand for them. A press on one opens the panel. - Each page with `pages` is a branch: its chevron folds the child pages, and the row opens the page. The branch owns its open state. - A cookie keeps the state. Pass `cookie={false}` in a demo. - `NotesSidebar01Page` is only the page bar, with a path and actions that do nothing: put your editor under it. - With children, the block ignores `content`. ## Anatomy ```text NotesSidebar01 ├─ NotesSidebar01Account (0..n) ├─ NotesSidebar01BranchPages (0..n) ├─ NotesSidebar01BranchToggle (0..n) ├─ NotesSidebar01Branch (0..n) ├─ NotesSidebar01Brand (0..n) ├─ NotesSidebar01Default (0..n) ├─ NotesSidebar01LinkRow (0..n) ├─ NotesSidebar01PageItem (0..n) ├─ NotesSidebar01PageMark (0..n) ├─ NotesSidebar01PageRow (0..n) ├─ NotesSidebar01Page (0..n) ├─ NotesSidebar01Usage (0..n) ├─ NotesSidebar01AccountMenu (0..n) ├─ NotesSidebar01MenuPerson (0..n) ├─ NotesSidebar01MenuRow (0..n) ├─ NotesSidebar01Panel (0..n) │ ├─ NotesSidebar01RailLink (0..n) │ ├─ NotesSidebar01SubRow (0..n) │ └─ NotesSidebar01Row (0..n) ├─ NotesSidebar01Search (0..n) └─ NotesSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | NotesSidebar01 | `notes-sidebar-01` | | | | | NotesSidebar01Account | `notes-sidebar-01-account` | | | | | NotesSidebar01BranchPages | `notes-sidebar-01-branch-pages` | | | | | NotesSidebar01BranchToggle | `notes-sidebar-01-branch-toggle` | | | | | NotesSidebar01Branch | `notes-sidebar-01-branch` | | | | | NotesSidebar01Brand | `notes-sidebar-01-brand` | `data-collapsible` | | | | NotesSidebar01Default | `notes-sidebar-01-panel` | | | | | NotesSidebar01LinkRow | `notes-sidebar-01-link-row` | | | | | NotesSidebar01PageItem | `notes-sidebar-01-page-item` | | | | | NotesSidebar01PageMark | `notes-sidebar-01-page-mark` | `data-tone` | `--radius` | `status-colors` | | NotesSidebar01PageRow | `notes-sidebar-01-page-row` | | | | | NotesSidebar01Page | `notes-sidebar-01-page` | | | | | NotesSidebar01RailLink | `notes-sidebar-01-rail-link` | `data-collapsible` | | | | NotesSidebar01SubRow | `notes-sidebar-01-sub-row` | | | | | NotesSidebar01Usage | `notes-sidebar-01-usage` | `data-collapsible` | | | | NotesSidebar01AccountMenu | `notes-sidebar-01-account-menu` | | | | | NotesSidebar01MenuPerson | `notes-sidebar-01-menu-person` | | | | | NotesSidebar01MenuRow | `notes-sidebar-01-menu-row` | | | | | NotesSidebar01Panel | `notes-sidebar-01-panel` | | | | | NotesSidebar01Row | `notes-sidebar-01-row` | | | | | NotesSidebar01Search | `notes-sidebar-01-search` | | | | | NotesSidebar01ThemeMenu | `notes-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="notes-frame.tsx" import { NotesSidebar01 } from "@/components/blocks/pro/notes-sidebar-01/notes-sidebar-01"; export function NotesFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/notes-sidebar-01 ``` It adds 68 registry items: 87 files, 13383 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Circular Meter](https://gelatinui.com/components/circular-meter.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Menu](https://gelatinui.com/components/menu.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Circular Meter](https://gelatinui.com/components/circular-meter.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Folds the panel to the icon rail, or opens it. | | ⌘K, Ctrl+K | Presses the Search row. | | Tab | Moves through the rows, the chevrons, the usage pill, and the account row. | | Enter, Space | Opens a page, or folds the child pages on a chevron. | | Esc | Closes the account menu or the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. Each chevron has a name and tells its state with `aria-expanded`. The current page row has `aria-current="page"`. ## Motion | Part | Motion | | --- | --- | | Rail | sheet · the panel width changes | | Child pages | panel · the child pages grow and fold | --- # Payroll Sidebar N.01 > The sidebar of an HR and payroll app: people, hiring, payroll with its pages and the deadline, time off, requests to approve, and the steps of the next pay run. Page: https://gelatinui.com/blocks/payroll-sidebar-01 ## When to use it Best for: The nav of an HR or payroll app: sections with child pages, requests to approve, and the next pay run. - Use it as the frame of an HR, payroll, or people ops app. - Pass your words through `content`. Start from `PAYROLL_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. - Give the workspace a `mark` with your logo. With no `mark`, the tile shows `initial`. ## When not to use it - For the nav of an app with workspaces and teams, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - A `nav` entry with `items` is a section: it folds in the panel, and in the icon rail it opens its pages in a Menu beside the rail on hover or on a press. - ⌘B (Ctrl+B elsewhere), the rail, or the header button collapses it to a 48px icon rail. Rows with `inRail: false`, the approvals, and the pay run hide there. - The approve and decline buttons do nothing: pass `onApprove` and `onDecline` to `PayrollSidebar01Approval`. - A cookie keeps the state. Pass `cookie={false}` in a demo. - Under 768px the panel is a left Drawer, and the page bar shows its button. - To change the order or drop a part, pass the parts as children. With children, the block ignores `content`. ## Anatomy ```text PayrollSidebar01 ├─ PayrollSidebar01Account (0..n) ├─ PayrollSidebar01Approval (0..n) ├─ PayrollSidebar01Approvals (0..n) ├─ PayrollSidebar01Count (0..n) ├─ PayrollSidebar01Default (0..n) ├─ PayrollSidebar01Due (0..n) ├─ PayrollSidebar01Page (0..n) ├─ PayrollSidebar01PayRun (0..n) ├─ PayrollSidebar01Section (0..n) ├─ PayrollSidebar01Workspace (0..n) ├─ PayrollSidebar01AccountMenu (0..n) ├─ PayrollSidebar01MenuPerson (0..n) ├─ PayrollSidebar01MenuRow (0..n) ├─ PayrollSidebar01Panel (0..n) │ ├─ PayrollSidebar01Flyout (0..n) │ ├─ PayrollSidebar01SubRow (0..n) │ └─ PayrollSidebar01Row (0..n) └─ PayrollSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | PayrollSidebar01 | `payroll-sidebar-01` | | | | | PayrollSidebar01Account | `payroll-sidebar-01-account` | | | | | PayrollSidebar01Approval | `payroll-sidebar-01-approval` | | | | | PayrollSidebar01Approvals | `payroll-sidebar-01-approvals` | `data-collapsible` | | `hit-area` | | PayrollSidebar01Count | `payroll-sidebar-01-count` | | | | | PayrollSidebar01Default | `payroll-sidebar-01-panel` | `data-collapsible` | | | | PayrollSidebar01Due | `payroll-sidebar-01-due` | | | | | PayrollSidebar01Flyout | `payroll-sidebar-01-flyout` | | | | | PayrollSidebar01Page | `payroll-sidebar-01-page` | | | | | PayrollSidebar01PayRun | `payroll-sidebar-01-pay-run` | `data-collapsible` | `--radius` | `status-colors` | | PayrollSidebar01Section | `payroll-sidebar-01-section` | `data-collapsible` | | | | PayrollSidebar01SubRow | `payroll-sidebar-01-sub-row` | | | | | PayrollSidebar01Workspace | `payroll-sidebar-01-workspace` | `data-collapsible` | | | | PayrollSidebar01AccountMenu | `payroll-sidebar-01-account-menu` | | | | | PayrollSidebar01MenuPerson | `payroll-sidebar-01-menu-person` | | | | | PayrollSidebar01MenuRow | `payroll-sidebar-01-menu-row` | | | | | PayrollSidebar01Panel | `payroll-sidebar-01-panel` | | | | | PayrollSidebar01Row | `payroll-sidebar-01-row` | | | | | PayrollSidebar01ThemeMenu | `payroll-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="payroll-frame.tsx" import { PayrollSidebar01 } from "@/components/blocks/pro/payroll-sidebar-01/payroll-sidebar-01"; export function PayrollFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/payroll-sidebar-01 ``` It adds 66 registry items: 81 files, 12522 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) - [Dot](https://gelatinui.com/components/dot.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Menu](https://gelatinui.com/components/menu.md) - [Progress](https://gelatinui.com/components/progress.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Stepper](https://gelatinui.com/components/stepper.md) - [Menu](https://gelatinui.com/components/menu.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Collapses or opens the panel. | | Enter, Space | Folds Payroll in the panel, or opens its flyout in the icon rail. | | Tab | Moves through search, the rows, the approval buttons, and the account. | | Esc | Closes the flyout or the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The open page has `aria-current="page"`, and each approval button names the person. The pay run steps are a read-only Stepper: each dot has the name of its step. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Payroll | panel · the child pages fold | | Flyout | popup · the menu beside the rail | | Drawer | sheet · the panel under 768px | --- # Photos Sidebar N.01 > The sidebar of a photo library: the main places, people as faces, albums with covers and counts, utilities, and a storage card that is almost full. Page: https://gelatinui.com/blocks/photos-sidebar-01 ## When to use it Best for: The nav of a photo library: places, people, albums, utilities, and storage in one panel. - Use it as the frame of a photo app, a media library, or an asset manager. - Pass your words, people, albums, and storage through `content`. Start from `PHOTOS_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. ## When not to use it - For the nav of a file app with folders and uploads, use a [Drive Sidebar N.01](https://gelatinui.com/blocks/drive-sidebar-01.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the collapse button makes it a 48px icon rail. The logo tile in the rail opens it again. - The panel owns the current row: places, albums, and utilities share one raised chip. In the rail, the Albums row is current while an album is. - A person with no `imageUrl` shows initials; an album with no `coverUrl` shows an image icon. - The storage card is a `Meter` of the used bytes against the plan. The bar and its legend split it by kind; the amber duplicates are the part you can free at once. - A cookie keeps the collapsed state. Pass `cookie={false}` in a demo. - `PhotosSidebar01Page` is only the header bar of an album page; its buttons do nothing. Replace it with your page. ## Anatomy ```text PhotosSidebar01 ├─ PhotosSidebar01Account (0..n) ├─ PhotosSidebar01AlbumCover (0..n) ├─ PhotosSidebar01AlbumRow (0..n) ├─ PhotosSidebar01Brand (0..n) ├─ PhotosSidebar01Contents (0..n) ├─ PhotosSidebar01Default (0..n) ├─ PhotosSidebar01Face (0..n) ├─ PhotosSidebar01Page (0..n) ├─ PhotosSidebar01Panel (0..n) │ ├─ PhotosSidebar01RailAlbums (0..n) │ └─ PhotosSidebar01Row (0..n) ├─ PhotosSidebar01People (0..n) ├─ PhotosSidebar01PlaceItem (0..n) ├─ PhotosSidebar01RailBrand (0..n) ├─ PhotosSidebar01StorageBody (0..n) ├─ PhotosSidebar01Storage (0..n) │ ├─ PhotosSidebar01StorageBar (0..n) │ ├─ PhotosSidebar01StorageHeader (0..n) │ └─ PhotosSidebar01StorageLegend (0..n) ├─ PhotosSidebar01AccountMenu (0..n) ├─ PhotosSidebar01MenuPerson (0..n) ├─ PhotosSidebar01MenuRow (0..n) └─ PhotosSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | PhotosSidebar01 | `photos-sidebar-01` | | | | | PhotosSidebar01Account | `photos-sidebar-01-account` | `data-collapsible` | | | | PhotosSidebar01AlbumCover | `photos-sidebar-01-album-cover` | | | | | PhotosSidebar01AlbumRow | `photos-sidebar-01-album-row` | | | | | PhotosSidebar01Brand | `photos-sidebar-01-brand` | `data-collapsible` | | | | PhotosSidebar01Contents | `photos-sidebar-01-contents` | `data-collapsible` | | | | PhotosSidebar01Default | `photos-sidebar-01-panel` | | | | | PhotosSidebar01Face | `photos-sidebar-01-face` | | | | | PhotosSidebar01Page | `photos-sidebar-01-page` | | | | | PhotosSidebar01Panel | `photos-sidebar-01-panel` | | | | | PhotosSidebar01People | `photos-sidebar-01-people` | | | | | PhotosSidebar01PlaceItem | `photos-sidebar-01-place-item` | | | | | PhotosSidebar01RailAlbums | `photos-sidebar-01-rail-albums` | `data-collapsible` | | | | PhotosSidebar01RailBrand | `photos-sidebar-01-rail-brand` | `data-collapsible` | | | | PhotosSidebar01StorageBar | `photos-sidebar-01-storage-bar` | | | | | PhotosSidebar01StorageBody | `photos-sidebar-01-storage-body` | | | | | PhotosSidebar01StorageHeader | `photos-sidebar-01-storage-header` | | | `status-colors` | | PhotosSidebar01StorageLegend | `photos-sidebar-01-storage-legend` | | | | | PhotosSidebar01Storage | `photos-sidebar-01-storage` | `data-collapsible` | | | | PhotosSidebar01AccountMenu | `photos-sidebar-01-account-menu` | | | | | PhotosSidebar01MenuPerson | `photos-sidebar-01-menu-person` | | | | | PhotosSidebar01MenuRow | `photos-sidebar-01-menu-row` | | | | | PhotosSidebar01Row | `photos-sidebar-01-row` | | | | | PhotosSidebar01ThemeMenu | `photos-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the header bar of an album page. ```tsx title="photos-frame.tsx" import { PhotosSidebar01 } from "@/components/blocks/pro/photos-sidebar-01/photos-sidebar-01"; export function PhotosFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/photos-sidebar-01 ``` It adds 61 registry items: 81 files, 12677 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Dot](https://gelatinui.com/components/dot.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Menu](https://gelatinui.com/components/menu.md) - [Meter](https://gelatinui.com/components/meter.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Drive Sidebar N.01](https://gelatinui.com/blocks/drive-sidebar-01.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Avatar](https://gelatinui.com/components/avatar.md) - [Meter](https://gelatinui.com/components/meter.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Collapses or opens the panel. | | Tab | Moves through search, collapse, the rows, the faces, the group buttons, and Get more. | | Esc | Closes the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The new-activity dot has a name, so it is not only a color. The storage card is a meter with its value in words. ## Motion | Part | Motion | | --- | --- | | Rail | panel · the panel width changes | | Drawer | sheet · the panel under 768px | --- # Reader Sidebar N.01 > A floating sidebar for a read-later app: Library, Feed, and Notes tabs, unread and saved rows, sources, tags, a docked player, and this week's reading. Page: https://gelatinui.com/blocks/reader-sidebar-01 ## When to use it Best for: The nav of a feed reader: view tabs, sources with counts, tags, a docked player, and reading time. - Use it as the frame of a feed, newsletter, or read-later app. - Pass your words through `content`. Start from `READER_SIDEBAR_01_DEFAULT_CONTENT` and change the fields you need. - Pass your logo in `content.brand.mark`, and the logo of each source in its `mark`. With none, a letter tile and a feed icon show. ## When not to use it - For a general app nav with a workspace switcher, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the close button folds it to a 48px icon rail. The logo button opens it again. - `ReaderSidebar01Views` owns the open view (`value`, `defaultValue`, `onValueChange`). The tabs and the rail rows share it; your app swaps the rows by the view. - The search, replay, and page bar buttons do nothing: wire them to your app. The play button only flips its own state. - A cookie keeps the state. Pass `cookie={false}` in a demo. - With children, the block ignores `content`. ## Anatomy ```text ReaderSidebar01 ├─ ReaderSidebar01Brand (0..n) ├─ ReaderSidebar01Card (0..n) ├─ ReaderSidebar01Default (0..n) ├─ ReaderSidebar01LinkRow (0..n) ├─ ReaderSidebar01Page (0..n) ├─ ReaderSidebar01PlayerControls (0..n) ├─ ReaderSidebar01PlayerCover (0..n) ├─ ReaderSidebar01PlayerHead (0..n) ├─ ReaderSidebar01PlayerMeta (0..n) ├─ ReaderSidebar01PlayerProgress (0..n) ├─ ReaderSidebar01PlayerReplay (0..n) ├─ ReaderSidebar01PlayerText (0..n) ├─ ReaderSidebar01PlayerTitle (0..n) ├─ ReaderSidebar01PlayerToggle (0..n) ├─ ReaderSidebar01Player (0..n) ├─ ReaderSidebar01RailAccount (0..n) ├─ ReaderSidebar01ReadingChange (0..n) ├─ ReaderSidebar01ReadingSpark (0..n) ├─ ReaderSidebar01ReadingTitle (0..n) ├─ ReaderSidebar01ReadingValue (0..n) ├─ ReaderSidebar01Reading (0..n) ├─ ReaderSidebar01Tabs (0..n) ├─ ReaderSidebar01Tag (0..n) ├─ ReaderSidebar01Tags (0..n) ├─ ReaderSidebar01Views (0..n) │ └─ ReaderSidebar01RailView (0..n) ├─ ReaderSidebar01AccountMenu (0..n) ├─ ReaderSidebar01MenuPerson (0..n) ├─ ReaderSidebar01MenuRow (0..n) ├─ ReaderSidebar01Panel (0..n) │ ├─ ReaderSidebar01RailLink (0..n) │ └─ ReaderSidebar01Row (0..n) └─ ReaderSidebar01ThemeMenu (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | ReaderSidebar01 | `reader-sidebar-01` | | | | | ReaderSidebar01Brand | `reader-sidebar-01-brand` | `data-collapsible` | | | | ReaderSidebar01Card | `reader-sidebar-01-card` | `data-collapsible` | | | | ReaderSidebar01Default | `reader-sidebar-01-panel` | `data-collapsible` | | | | ReaderSidebar01LinkRow | `reader-sidebar-01-link-row` | | | | | ReaderSidebar01Page | `reader-sidebar-01-page` | | | | | ReaderSidebar01PlayerControls | `reader-sidebar-01-player-controls` | | | | | ReaderSidebar01PlayerCover | `reader-sidebar-01-player-cover` | | | | | ReaderSidebar01PlayerHead | `reader-sidebar-01-player-head` | | | | | ReaderSidebar01PlayerMeta | `reader-sidebar-01-player-meta` | | | | | ReaderSidebar01PlayerProgress | `reader-sidebar-01-player-progress` | | | | | ReaderSidebar01PlayerReplay | `reader-sidebar-01-player-replay` | | | | | ReaderSidebar01PlayerText | `reader-sidebar-01-player-text` | | | | | ReaderSidebar01PlayerTitle | `reader-sidebar-01-player-title` | | | | | ReaderSidebar01PlayerToggle | `reader-sidebar-01-player-toggle` | | | | | ReaderSidebar01Player | `reader-sidebar-01-player` | | | | | ReaderSidebar01RailAccount | `reader-sidebar-01-rail-account` | `data-collapsible` | | | | ReaderSidebar01RailLink | `reader-sidebar-01-rail-link` | `data-collapsible` | | | | ReaderSidebar01RailView | `reader-sidebar-01-rail-view` | `data-collapsible` | | | | ReaderSidebar01ReadingChange | `reader-sidebar-01-reading-change` | | | | | ReaderSidebar01ReadingSpark | `reader-sidebar-01-reading-spark` | | | `status-colors` | | ReaderSidebar01ReadingTitle | `reader-sidebar-01-reading-title` | | `--radius` | `status-colors` | | ReaderSidebar01ReadingValue | `reader-sidebar-01-reading-value` | | | | | ReaderSidebar01Reading | `reader-sidebar-01-reading` | | | | | ReaderSidebar01Tabs | `reader-sidebar-01-tabs` | `data-collapsible` | | | | ReaderSidebar01Tag | `reader-sidebar-01-tag` | `data-tone` | | `status-colors` | | ReaderSidebar01Tags | `reader-sidebar-01-tags` | | | | | ReaderSidebar01Views | `reader-sidebar-01-views` | | | | | ReaderSidebar01AccountMenu | `reader-sidebar-01-account-menu` | | | | | ReaderSidebar01MenuPerson | `reader-sidebar-01-menu-person` | | | | | ReaderSidebar01MenuRow | `reader-sidebar-01-menu-row` | | | | | ReaderSidebar01Panel | `reader-sidebar-01-panel` | | | | | ReaderSidebar01Row | `reader-sidebar-01-row` | | | | | ReaderSidebar01ThemeMenu | `reader-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="reader-frame.tsx" import { ReaderSidebar01 } from "@/components/blocks/pro/reader-sidebar-01/reader-sidebar-01"; export function ReaderFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/reader-sidebar-01 ``` It adds 73 registry items: 102 files, 14069 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `@unpic/core`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`, `xstate`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Image](https://gelatinui.com/components/image.md) - [Menu](https://gelatinui.com/components/menu.md) - [Progress](https://gelatinui.com/components/progress.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Tabs](https://gelatinui.com/components/tabs.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Tabs](https://gelatinui.com/components/tabs.md) - [Progress](https://gelatinui.com/components/progress.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Folds the panel to the icon rail, or opens it. | | Left, Right | Moves between the tabs and opens the view. | | Tab | Moves through the tabs, the rows, the tags, and the player buttons. | | Enter, Space | Opens a row or a tag, or plays and pauses. | | Esc | Closes the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The tabs are a tab list with a name; arrow keys move between them. The current row has `aria-current="page"`. The play button changes its name between Play and Pause. ## Motion | Part | Motion | | --- | --- | | Rail | sheet · the panel width changes | | Tabs | indicator · the line slides to the new tab | --- # Settings Sidebar N.01 > The sidebar of a settings area: a back row, the workspace, a search field, account and workspace groups, and a trial card. It folds to an icon rail. Page: https://gelatinui.com/blocks/settings-sidebar-01 ## When to use it Best for: The nav of the settings pages of an app, with a search, two groups, and a trial card. - Use it as the frame of the settings pages of an app. - Pass your words through `content`. Start from `SETTINGS_SIDEBAR_01_DEFAULT_CONTENT`, and change the fields you need. - Pass `onSearch` or `onValueChange` to `SettingsSidebar01Search` to search your settings. ## When not to use it - For the main nav of an app, use the [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md). - For the parts with no ready contents, use the [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the Collapse sidebar row folds it to a 48px icon rail. - `/` puts the focus in the search field. Connect the field to the search of your app. - A row can end with a status (`kind: "status"`), faces (`kind: "people"`), or app marks (`kind: "apps"`). - Installed content shows initials and letters. Pass your logo in `workspace.logo` and app logos in `apps[].logo`. - A cookie keeps the open state. Pass `cookie={false}` in a demo. - `SettingsSidebar01Page` is only the top bar of the page: the path and three actions. Put your page under it. - To change the order or drop a part, pass the parts as children. With children, the block ignores `content`. ## Anatomy ```text SettingsSidebar01 ├─ SettingsSidebar01Account (0..n) ├─ SettingsSidebar01Apps (0..n) ├─ SettingsSidebar01Back (0..n) ├─ SettingsSidebar01Collapse (0..n) ├─ SettingsSidebar01Contents (0..n) ├─ SettingsSidebar01Default (0..n) ├─ SettingsSidebar01Face (0..n) ├─ SettingsSidebar01Groups (0..n) ├─ SettingsSidebar01LinkRow (0..n) ├─ SettingsSidebar01Page (0..n) ├─ SettingsSidebar01Panel (0..n) │ └─ SettingsSidebar01Row (0..n) ├─ SettingsSidebar01People (0..n) ├─ SettingsSidebar01Plan (0..n) ├─ SettingsSidebar01RowEnd (0..n) ├─ SettingsSidebar01Search (0..n) ├─ SettingsSidebar01Status (0..n) ├─ SettingsSidebar01Trial (0..n) ├─ SettingsSidebar01Workspace (0..n) ├─ SettingsSidebar01AccountMenu (0..n) ├─ SettingsSidebar01MenuPerson (0..n) ├─ SettingsSidebar01MenuRow (0..n) └─ SettingsSidebar01ThemeMenu (0..n) ``` ## API reference ### SettingsSidebar01 | Prop | Type | Default | Description | | --- | --- | --- | --- | | `defaultOpen` | `boolean` | | The open state on the first render, uncontrolled. Default `true`. Read the cookie on the server to keep it. | | `open` | `boolean` | | The open state, controlled. | | `onOpenChange` | `function` | | | | `keyboardShortcut` | `string \| false` | | The key that toggles the Sidebar with Ctrl (⌘ on a Mac). Default `"b"`, as in shadcn. Pass `false` to turn the shortcut off, for example in an app with a text editor where ⌘B is bold. | | `contained` | `boolean` | | The panel sits in the provider box (a block in a page), not on the screen edge. Default `false`. | | `cookie` | `string \| false` | | The name of the cookie that keeps the open state, or `false` for none. Default `"sidebar_state"`. | | `openMobile` | `boolean` | | The phone Drawer state, controlled. | | `defaultOpenMobile` | `boolean` | | The phone Drawer state on the first render, uncontrolled. Default `false`. | | `onOpenMobileChange` | `function` | | | | `content` | `SettingsSidebar01DefaultContent` | | The words of the ready composition. It has no use when you pass children. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | SettingsSidebar01 | `settings-sidebar-01` | | | | | SettingsSidebar01Account | `settings-sidebar-01-account` | `data-collapsible` | | | | SettingsSidebar01Apps | `settings-sidebar-01-apps` | | | | | SettingsSidebar01Back | `settings-sidebar-01-back` | | | | | SettingsSidebar01Collapse | `settings-sidebar-01-collapse` | `data-collapsible` | | | | SettingsSidebar01Contents | `settings-sidebar-01-contents` | `data-collapsible` | | | | SettingsSidebar01Default | `settings-sidebar-01-panel` | | | | | SettingsSidebar01Face | `settings-sidebar-01-face` | | | | | SettingsSidebar01Groups | `settings-sidebar-01-groups` | | | | | SettingsSidebar01LinkRow | `settings-sidebar-01-link-row` | | | | | SettingsSidebar01Page | `settings-sidebar-01-page` | | | | | SettingsSidebar01Panel | `settings-sidebar-01-panel` | | | | | SettingsSidebar01People | `settings-sidebar-01-people` | | | | | SettingsSidebar01Plan | `settings-sidebar-01-plan` | `data-collapsible` | `--radius` | | | SettingsSidebar01RowEnd | `settings-sidebar-01-row-end` | `data-collapsible` | | | | SettingsSidebar01Row | `settings-sidebar-01-row` | | | | | SettingsSidebar01Search | `settings-sidebar-01-search` | `data-collapsible` | | | | SettingsSidebar01Status | `settings-sidebar-01-status` | | | | | SettingsSidebar01Trial | `settings-sidebar-01-trial` | | | | | SettingsSidebar01Workspace | `settings-sidebar-01-workspace` | `data-collapsible` | | | | SettingsSidebar01AccountMenu | `settings-sidebar-01-account-menu` | | | | | SettingsSidebar01MenuPerson | `settings-sidebar-01-menu-person` | | | | | SettingsSidebar01MenuRow | `settings-sidebar-01-menu-row` | | | | | SettingsSidebar01ThemeMenu | `settings-sidebar-01-theme-menu` | | | | ## Usage Render it with no props for the ready panel and a sample page. ```tsx title="settings-frame.tsx" import { SettingsSidebar01 } from "@/components/blocks/settings-sidebar-01/settings-sidebar-01"; export function SettingsFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/settings-sidebar-01 ``` It adds 64 registry items: 84 files, 12284 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `@tanstack/react-hotkeys`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Dot](https://gelatinui.com/components/dot.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Menu](https://gelatinui.com/components/menu.md) - [Meter](https://gelatinui.com/components/meter.md) - [Search Field](https://gelatinui.com/components/search-field.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Search Field](https://gelatinui.com/components/search-field.md) - [Meter](https://gelatinui.com/components/meter.md) ## Keyboard | Keys | Action | | --- | --- | | / | Puts the focus in the settings search. | | Esc | Clears the search field, then leaves it. Closes the Drawer. | | ⌘B, Ctrl+B | Folds or opens the panel. | | Tab | Moves through the back row, the search, the pages, the plan button, and the collapse row. | ## Accessibility The current page has `aria-current="page"`. On the icon rail, each row shows its name in a tooltip. The trial meter says the days left as its value text. ## Motion | Part | Motion | | --- | --- | | Rail | sheet · the panel width changes | --- # Tasks Sidebar N.01 > An inset sidebar for a task app: a space switcher, Add task on Q, day views with counts, a week strip with due marks, project progress, and a karma streak. Page: https://gelatinui.com/blocks/tasks-sidebar-01 ## When to use it Best for: The nav of a personal task app: day views, a week strip, areas with projects, and a karma streak card. - Use it as the frame of a to-do or task app. - Pass your words through `content`. Start from `TASKS_SIDEBAR_01_DEFAULT_CONTENT` and change the fields you need. - Pass your logo in `content.brand.mark`. With none, a letter tile shows. ## When not to use it - For a general app nav with a workspace switcher, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail, or the close button folds it to a 48px icon rail. The rail or ⌘B opens it again. - Q presses Add task anywhere on the page, but not in a field, a menu, or a dialog. Wire `onClick` of `TasksSidebar01AddTask` to your task form. - Each project shows a Status Icon with its progress pie: `todo`, `in-progress`, or `in-review` with `progress` 0 to 1. - A cookie keeps the state. Pass `cookie={false}` in a demo. - `TasksSidebar01Page` is only the page bar, with actions that do nothing: put your task list under it. - With children, the block ignores `content`. ## Anatomy ```text TasksSidebar01 ├─ TasksSidebar01AddTask (0..n) ├─ TasksSidebar01Brand (0..n) ├─ TasksSidebar01Default (0..n) ├─ TasksSidebar01Karma (0..n) ├─ TasksSidebar01Page (0..n) ├─ TasksSidebar01ProjectRow (0..n) ├─ TasksSidebar01RailLink (0..n) ├─ TasksSidebar01Space (0..n) ├─ TasksSidebar01ViewRow (0..n) ├─ TasksSidebar01Week (0..n) └─ TasksSidebar01Panel (0..n) └─ TasksSidebar01Row (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | TasksSidebar01 | `tasks-sidebar-01` | | | | | TasksSidebar01AddTask | `tasks-sidebar-01-add-task` | `data-collapsible` | | | | TasksSidebar01Brand | `tasks-sidebar-01-brand` | `data-collapsible` | | | | TasksSidebar01Default | `tasks-sidebar-01-panel` | `data-collapsible` | | | | TasksSidebar01Karma | `tasks-sidebar-01-karma` | `data-collapsible` | | `motion-timing`, `status-colors` | | TasksSidebar01Page | `tasks-sidebar-01-page` | | | | | TasksSidebar01ProjectRow | `tasks-sidebar-01-project-row` | | | | | TasksSidebar01RailLink | `tasks-sidebar-01-rail-link` | `data-collapsible` | | | | TasksSidebar01Space | `tasks-sidebar-01-space` | | | | | TasksSidebar01ViewRow | `tasks-sidebar-01-view-row` | `data-collapsible` | | | | TasksSidebar01Week | `tasks-sidebar-01-week` | `data-collapsible` | | | | TasksSidebar01Panel | `tasks-sidebar-01-panel` | | | | | TasksSidebar01Row | `tasks-sidebar-01-row` | | | | ## Usage Render it with no props for the ready panel and the page bar. ```tsx title="tasks-frame.tsx" import { TasksSidebar01 } from "@/components/blocks/pro/tasks-sidebar-01/tasks-sidebar-01"; export function TasksFrame() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/tasks-sidebar-01 ``` It adds 77 registry items: 89 files, 15967 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@internationalized/date`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `react-aria-components`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Calendar](https://gelatinui.com/components/calendar.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Menu](https://gelatinui.com/components/menu.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Status Icon](https://gelatinui.com/components/status-icon.md) - [Week Strip](https://gelatinui.com/components/week-strip.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Workspace Sidebar N.01](https://gelatinui.com/blocks/workspace-sidebar-01.md) - [Week Strip](https://gelatinui.com/components/week-strip.md) - [Status Icon](https://gelatinui.com/components/status-icon.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Folds the panel to the icon rail, or opens it. | | Q | Presses Add task. | | Tab | Moves through the buttons, the rows, the week, and the project rows. | | Arrow keys | Move between the days of the week strip. | | Enter, Space | Opens a view or a project, or picks a day. | | Esc | Closes the space menu or the Drawer. | ## Accessibility The rows show a tooltip with the name on the icon rail. The current view row has `aria-current="page"`. Add task tells its key with `aria-keyshortcuts`. ## Motion | Part | Motion | | --- | --- | | Rail | sheet · the panel width changes | | Week | panel · the pill slides to the picked day | --- # Text Fit > Each line of a heading scales to fill the full width of its box, and stays fitted when the box resizes. Page: https://gelatinui.com/components/text-fit ## When to use it Best for: A poster heading where each line scales to fill the width of its box. - Put each line in its own Fit Text Line part. - Use `maxSize` to stop a short line from growing too large. ## When not to use it - For a heading that enters line by line, use [Text Split Headline](https://gelatinui.com/components/text-split-headline.md). - For text on a curve, use [Text Circular](https://gelatinui.com/components/text-circular.md). ## Notes for agents - Each line keeps its own size, so short lines are larger. - It sizes again with smooth motion when its box resizes. ## Anatomy ```text TextFit └─ TextFitLine (0..n) ``` ## API reference ### TextFit | Prop | Type | Default | Description | | --- | --- | --- | --- | | `locale` | `string` | | The BCP 47 locale for the letter and word split (`Intl.Segmenter`). Default: the `DisplayLocaleProvider` locale, else `"en-US"`. | | `children` | `ReactNode` | | The lines: `TextFitLine` parts, or a string with one line per `\n`. | | `maxSize` | `number` | Number.POSITIVE_INFINITY | The largest font size of a line, in px, so a short word does not grow without end. | ### TextFitLine | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | `string` | | The text of the line. It never wraps. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | TextFit | `text-fit` | | | | | TextFitLine | `text-fit-line` | | | | ## Usage Put each line in a Fit Text Line part. ```tsx title="hero-title.tsx" import { TextFit, TextFitLine } from "@/components/text/text-fit"; export function HeroTitle() { return (

Design systems that feel alive

Each line fills the width of the column.

); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/text-fit ``` It adds 18 registry items: 17 files, 3416 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Text Split Headline](https://gelatinui.com/components/text-split-headline.md) - [Text Circular](https://gelatinui.com/components/text-circular.md) - [Text Media](https://gelatinui.com/components/text-media.md) ## Motion | Part | Motion | | --- | --- | | Resize | glide · each line scales to its new size when the box resizes | --- # Typography > Heading, Text, and Eyebrow for page text. The heading level sets the tag and the size sets the look. Heading sizes shrink on small screens and never grow. Page: https://gelatinui.com/components/typography ## When to use it Best for: Page text: headings, body copy, and a short eyebrow topic above a heading. - Use `Heading` for page and section titles. Set `level` for the outline and `size` for the look. - Use `Text` for body copy, `lead` for the first paragraph under a hero, and `xs` only for fine print. - Use `Eyebrow` for a short topic above a heading. Write it in normal case: CSS sets the capitals. ## When not to use it - For the name of a form field, use a [Label](https://gelatinui.com/components/label.md). ## Notes for agents - On `Heading`, `level` sets the tag (the outline) and `size` sets the look; set both. - Write `Eyebrow` text in normal case: CSS sets the capitals. ## Anatomy ```text Heading ├─ Text (0..n) └─ Eyebrow (0..n) ``` ## API reference ### Heading | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"2xl" \| "display" \| "lg" \| "md" \| "sm" \| "xl"` | | | | `level` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | 2 | The heading level: it sets the tag (`

` to `

`), so the page outline that screen readers list stays right. Default 2: a section heading. | Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ### Text | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"lead" \| "lg" \| "md" \| "sm" \| "xs"` | "md" | | | `variant` | `"default" \| "muted"` | "default" | | Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ### Eyebrow Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Heading | `typography-heading` | | | | | Text | `typography-text` | | | | | Eyebrow | `typography-eyebrow` | | | | ## Usage `level` sets the tag (`

` to `

`) and `size` sets the look, so the page outline stays right. With no `size`, the size follows the level. ```tsx title="pricing-intro.tsx" import { Eyebrow, Heading, Text } from "@/components/ui/typography"; export function PricingIntro() { return (
Pricing One plan for every team Start free. Pay only when your team grows past five people.
); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/typography ``` It adds 1 registry items: 1 files, 166 lines, and the npm packages `@base-ui/react`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Label](https://gelatinui.com/components/label.md) - [Kbd](https://gelatinui.com/components/kbd.md) ## Accessibility `Heading` renders `

` to `

` from `level` (default 2). A large `size` does not change the level, so the outline that screen readers list stays right. `Eyebrow` renders a `

` before the heading. It is not part of the heading name. Write it in normal case: CSS sets the capitals, so a screen reader does not spell the word letter by letter. The fluid heading sizes have a `rem` part, so browser zoom still changes them. Headings never get larger on small screens. `Text` renders a `

`. Pass `render={}` or `render={

  • }` for another element. --- # Workspace Sidebar N.01 > The home panel of a team work app: inbox counts, favorites, teams that open into views, connected tools, and a cycle card. It folds to an icon rail. Page: https://gelatinui.com/blocks/workspace-sidebar-01 ## When to use it Best for: The home nav of a team work app: inbox, favorites, teams with their views, connected tools, and the current cycle. - Use it as the frame of an issue tracker, a project tool, or a team planner. - Pass your words through `content`. Start from `WORKSPACE_SIDEBAR_01_DEFAULT_CONTENT` and change the fields you need. - Pass your own logos through `content` (the workspace `logo` and the `logo` of each tool). ## When not to use it - For a plain app nav with a workspace switcher and an account menu, use a [Sidebar](https://gelatinui.com/components/sidebar.md). - For the parts with no ready contents, use a [Sidebar](https://gelatinui.com/components/sidebar.md). ## Notes for agents - ⌘B (Ctrl+B elsewhere), the rail strip, or the trigger folds it to a 48px icon rail. - ⌘K presses the search row and C presses the compose row. C does nothing while a field has focus. - A cookie keeps the state. Pass `cookie={false}` in a demo. - Under 768px the panel is a Drawer; the page bar shows the trigger. - `WorkspaceSidebar01Page` is only the page bar: a path and three action buttons. Replace it with your page. - The `rail` rows and the `person` face show only on the icon rail. - To change the order or drop a part, pass the parts as children. With children, the block ignores `content`. ## Anatomy ```text WorkspaceSidebar01 ├─ WorkspaceSidebar01Compose (0..n) ├─ WorkspaceSidebar01Contents (0..n) ├─ WorkspaceSidebar01Cycle (0..n) ├─ WorkspaceSidebar01Default (0..n) ├─ WorkspaceSidebar01Faces (0..n) ├─ WorkspaceSidebar01Link (0..n) ├─ WorkspaceSidebar01Page (0..n) ├─ WorkspaceSidebar01Search (0..n) ├─ WorkspaceSidebar01Team (0..n) ├─ WorkspaceSidebar01Workspace (0..n) ├─ WorkspaceSidebar01WorkspaceTile (0..n) ├─ WorkspaceSidebar01MenuRow (0..n) └─ WorkspaceSidebar01Panel (0..n) ├─ WorkspaceSidebar01View (0..n) └─ WorkspaceSidebar01Row (0..n) ``` ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | WorkspaceSidebar01 | `workspace-sidebar-01` | | | | | WorkspaceSidebar01Compose | `workspace-sidebar-01-compose` | `data-collapsible` | | | | WorkspaceSidebar01Contents | `workspace-sidebar-01-contents` | `data-collapsible` | | | | WorkspaceSidebar01Cycle | `workspace-sidebar-01-cycle` | `data-collapsible` | | | | WorkspaceSidebar01Default | `workspace-sidebar-01-panel` | | | | | WorkspaceSidebar01Faces | `workspace-sidebar-01-faces` | | | | | WorkspaceSidebar01Link | `workspace-sidebar-01-link` | | | | | WorkspaceSidebar01Page | `workspace-sidebar-01-page` | | | | | WorkspaceSidebar01Search | `workspace-sidebar-01-search` | `data-collapsible` | | | | WorkspaceSidebar01Team | `workspace-sidebar-01-team` | | `--radius` | | | WorkspaceSidebar01View | `workspace-sidebar-01-view` | | `--sidebar-menu-badge-width` | | | WorkspaceSidebar01Workspace | `workspace-sidebar-01-workspace` | | | | | WorkspaceSidebar01WorkspaceTile | `workspace-sidebar-01-workspace-tile` | | `--radius` | | | WorkspaceSidebar01MenuRow | `workspace-sidebar-01-menu-row` | | | | | WorkspaceSidebar01Panel | `workspace-sidebar-01-panel` | | | | | WorkspaceSidebar01Row | `workspace-sidebar-01-row` | | | | ## Usage Render it with no props for the ready block. Pass `content` to set the words. ```tsx title="workspace-sidebar.tsx" import { WorkspaceSidebar01 } from "@/components/blocks/pro/workspace-sidebar-01/workspace-sidebar-01"; export function WorkspaceSidebarDemo() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/workspace-sidebar-01 ``` It adds 66 registry items: 80 files, 12419 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Badge](https://gelatinui.com/components/badge.md) - [Breadcrumb](https://gelatinui.com/components/breadcrumb.md) - [Button](https://gelatinui.com/components/button.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) - [Generated Avatar](https://gelatinui.com/components/generated-avatar.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Menu](https://gelatinui.com/components/menu.md) - [Progress](https://gelatinui.com/components/progress.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Mail Sidebar N.01](https://gelatinui.com/blocks/mail-sidebar-01.md) - [Sidebar](https://gelatinui.com/components/sidebar.md) - [Collapsible](https://gelatinui.com/components/collapsible.md) ## Keyboard | Keys | Action | | --- | --- | | ⌘B, Ctrl+B | Folds or opens the panel. | | ⌘K, Ctrl+K | Presses the search row. | | C | Presses the compose row, when no field has focus. | | Enter, Space | Opens or closes a team. | | Esc | Closes the Drawer. | ## Motion | Part | Motion | | --- | --- | | Rail | sheet · the panel width changes | | Team | panel · the views grow, and the chevron turns | --- # Auto Scale Input > A large amount field. The text gets smaller as you type, so the whole value stays in view. A number mask formats it and gives you the raw number. Page: https://gelatinui.com/components/auto-scale-input ## When to use it Best for: The one big amount of a payment or transfer screen, where the value must stay in view. - Use it for the main amount of a screen, such as a transfer or a top-up. - Pass a number preset of `@/lib/masks`: `currency`, `number`, `percent`, or `unit`. - Read the raw number in `onValueChange`, or send it with a form through `rawName`. - Put it in a `Field` for the label, the description, and the error. ## When not to use it - For a number with step buttons, use a [Number Field](https://gelatinui.com/components/number-field.md). - For a normal text field in a form, use an [Input](https://gelatinui.com/components/input.md). ## Notes for agents - `mask` is required. Build it once, at module level or in a memo. - `value` and `defaultValue` are the shown text. The raw number comes in `onValueChange` details. - The text shrinks from `maxFontSize` (56) to `minFontSize` (24). Past the min size, the field scrolls to the caret. - The value row is always left to right, also on a right-to-left page. - There is no focus ring: the caret shows the focus. ## Anatomy ```text AutoScaleInput ``` ## API reference ### AutoScaleInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `mask` | `MaskPreset` | | A number preset from `#/lib/masks` (`currency`, `number`, `percent`, `unit`). Build it once. | | `value` | `string` | | The shown value (controlled), formatted by the mask: "1250" shows "1,250". | | `defaultValue` | `string` | | The first shown value (uncontrolled), formatted by the mask. | | `onValueChange` | `function` | | Runs on every change with the shown value, the raw value, and the checks. | | `maxFontSize` | `number` | 56 | The text size while the whole value fits, in px. Default `56`. | | `minFontSize` | `number` | 24 | The smallest text size, in px. Past it the field scrolls to the caret. Default `24`. | | `align` | `"center" \| "start"` | "center" | Where the value sits in the field: `center` (default) or `start`. | | `rejectFeedback` | `boolean` | true | Nudge the value 2px when the mask rejects a key. Default `true`. | | `onReject` | `function` | | Runs when the mask rejects a key (a letter, a third decimal, a digit past max). | | `rawName` | `string` | | Also submit the raw value under this name (a hidden input), next to the shown one. | | `className` | `string` | | Classes of the root box (its width is the room the value fits in). | | `ref` | `Ref` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | AutoScaleInput | `auto-scale-input` | `data-align`, `data-empty`, `data-invalid`, `data-scrolled` | `--auto-scale-input-max`, `--auto-scale-input-size` | `status-colors` | ## Usage Build the mask once, outside the component. The raw number comes in the details of `onValueChange`. ```tsx title="send-amount.tsx" import { AutoScaleInput } from "@/components/ui/pro/auto-scale-input"; import { currency } from "@/lib/masks"; const USD = currency("USD"); export function SendAmount() { return ( { console.log(details.unmasked); }} /> ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/auto-scale-input ``` It adds 14 registry items: 13 files, 3039 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@maskito/core`, `@maskito/kit`, `@maskito/react`, `clsx`, `motion`, `tailwind-merge`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Number Field](https://gelatinui.com/components/number-field.md) - [Input](https://gelatinui.com/components/input.md) - [Field](https://gelatinui.com/components/field.md) ## Accessibility It is a Base UI Input with the `inputMode` of the mask, so phones show the number keyboard. Give it a name with `aria-label`, or put it in a `Field` with a `FieldLabel`. The currency sign and the unit are text next to the input, at the same size. ## Motion | Part | Motion | | --- | --- | | Text size | glide · spring (stiffness 700, damping 53) · the size follows the value with no React render per frame | | Rejected key | indicator · 200ms · ease-panel (0.2, 0.4, 0.2, 1) · the value moves 2px and back | --- # Currency Input > A field for an amount of money in one currency. It puts the symbol where the locale puts it, groups thousands, and keeps the cents of the currency. Page: https://gelatinui.com/components/currency-input ## When to use it Best for: An amount of money in one currency, formatted for the locale as people type. - Use it for an amount, a price, or a budget. - Use `min` and `max` for the range. The mask stops an amount over `max`. - Use `locale` for the separators and the symbol side of another country. ## When not to use it - For a number with no currency, use a [Masked Input](https://gelatinui.com/components/masked-input.md). - For a number with steppers, use a [Number Field](https://gelatinui.com/components/number-field.md). ## Notes for agents - `onValueChange(text, details)`: `details.unmasked` is the number. Add numbers, never the shown text. - Send money to a server as a decimal string, not as a sum of floats. - A paste with both marks ("1.234,56" or "1,234.56") reads the last mark as the decimal. - The parts are `CurrencyInputSymbol`, `CurrencyInputControl`, and `CurrencyInputCode`. With no children it renders the symbol and the control. ## Anatomy ```text CurrencyInput ├─ CurrencyInputSymbol (0..n) ├─ CurrencyInputCode (0..n) └─ CurrencyInputControl (0..n) ``` ## API reference ### CurrencyInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `rounded` | `"default" \| "full"` | "default" | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" | | | `variant` | `"dashed" \| "default"` | | | | `disabled` | `boolean` | false | Turns the control off; the frame fades to 50% with it (the Base UI name). | | `readOnly` | `boolean` | false | The amount shows and can be copied, but not changed (the Base UI name). | | `currency` | `string` | | The ISO 4217 code: "USD", "EUR", "JPY". It sets the symbol and the fraction digits. | | `locale` | `string` | | The locale of the separators and the symbol side. Default: the display locale (en-US unless a provider sets one). | | `min` | `number` | | The smallest amount; `valid` is false below it (a lower amount can still be typed). | | `max` | `number` | | The largest amount. The mask stops a larger one as you type, so it never shows. | | `value` | `string` | | The shown amount (controlled). "1250" shows "1,250". | | `defaultValue` | `string` | "" | The first shown amount (uncontrolled). | | `onValueChange` | `function` | | Runs on every change with the text, the number (`details.unmasked`), and the checks. | ### CurrencyInputSymbol | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### CurrencyInputCode | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### CurrencyInputControl | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `guide` | `boolean` | | The ghost guide of the slots still to fill, while the input has focus. Default `true`. | | `rawName` | `string` | | Also submit the raw value under this name (a hidden input), next to the shown one. | | `rejectFeedback` | `boolean` | | Nudge the field 2px when the mask rejects a key. Default `true`. | | `onReject` | `function` | | Runs when the mask rejects a key (a letter in a number, a 13th month). | | `ref` | `Ref` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | CurrencyInput | `currency-input` | | | | | CurrencyInputSymbol | `currency-input-symbol` | | | | | CurrencyInputCode | `currency-input-code` | | | | | CurrencyInputControl | `currency-input-control` | | | | ## Usage Put the symbol, the control, and the code in the input, inside a Field with a label and a description. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/currency-input @gelatin-ui/field ``` ```tsx title="monthly-budget.tsx" import { CurrencyInput, CurrencyInputCode, CurrencyInputControl, CurrencyInputSymbol, } from "@/components/ui/currency-input"; import { Field, FieldDescription, FieldLabel } from "@/components/ui/field"; export function MonthlyBudget() { return ( Monthly budget Paid on the 1st of each month ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/currency-input ``` It adds 28 registry items: 25 files, 5470 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@maskito/core`, `@maskito/kit`, `@maskito/react`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Input Group](https://gelatinui.com/components/input-group.md) - [Masked Input](https://gelatinui.com/components/masked-input.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Masked Input](https://gelatinui.com/components/masked-input.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Number Field](https://gelatinui.com/components/number-field.md) - [Field](https://gelatinui.com/components/field.md) ## Accessibility It is a native input with a decimal keypad, in a `Field` for the label and the error. The symbol is visible text next to the input, so it is read with the field. ## Motion | Part | Motion | | --- | --- | | Rejected key | indicator · the frame moves 2px to each side and back when the mask rejects a key | --- # Editable > Text that turns into a field when you press it, such as a page title or a table cell. Enter or a click outside saves it, and Escape undoes it. Page: https://gelatinui.com/components/editable ## When to use it Best for: Text that people read most of the time and change now and then, with no form around it. - Use it for a title, a name in a list, or a table cell that people rename. - Use `onSubmit` with a promise to save to a server: it shows a spinner and the error. - Use `multiline` with `EditableTextarea` for many lines. ## When not to use it - For a field that people always fill in, use an [Input](https://gelatinui.com/components/input.md). - For many fields that save together, use a [Form](https://gelatinui.com/components/form.md). ## Notes for agents - Put `EditablePreview` and `EditableInput` (or `EditableTextarea`) in `EditableArea`. Give the field an `aria-label`. - `activationMode` is `click` (default), `dblclick`, `focus`, or `none`. `submitMode` is `both` (default), `enter`, `blur`, or `none`. - `onSubmit` may return a promise. A reject keeps the field open and shows its message in `EditableError`. - An empty text cancels unless `allowEmpty` is set. - Text classes on the root size both the preview and the field. - `EditableControls` holds the optional `EditableEditTrigger`, `EditableSubmitTrigger`, and `EditableCancelTrigger`. ## Anatomy ```text Editable ├─ EditableArea (0..n) ├─ EditablePreview (0..n) ├─ EditableInput (0..n) ├─ EditableTextarea (0..n) ├─ EditableControls (0..n) ├─ EditableEditTrigger (0..n) ├─ EditableSubmitTrigger (0..n) ├─ EditableCancelTrigger (0..n) └─ EditableError (0..n) ``` ## API reference ### Editable | Prop | Type | Default | Description | | --- | --- | --- | --- | | `value` | `string` | | The saved text (controlled). | | `defaultValue` | `string` | "" | The saved text at mount. | | `onValueChange` | `function` | | Called with the new text after a save (after `onSubmit` resolves). | | `onSubmit` | `function` | | Called on a save with the new text. Return a Promise for an async save: the field turns read-only and the Submit trigger spins; a reject keeps the field open with its message. | | `onCancel` | `function` | | Called when an edit ends with no save (Escape, Cancel, or an empty text). | | `editing` | `boolean` | | Shows the field (controlled). | | `defaultEditing` | `boolean` | false | Shows the field at mount (a rename started from a menu). | | `onEditingChange` | `function` | | | | `activationMode` | `EditableActivationMode` | "click" | What opens the field: `click` (default; Enter, Space, or F2 on the focused preview too), `dblclick` (a list where a click selects; Enter and F2 still open it), `focus`, or `none` (only `editing` and the Edit trigger). | | `submitMode` | `EditableSubmitMode` | "both" | What saves: `both` (default: Enter and a blur), `enter`, `blur`, or `none`. A blur that does not save cancels. | | `selectOnFocus` | `boolean` | true | Selects the text when the field opens. Default `true`; else the caret goes to the end. | | `multiline` | `boolean` | false | Many lines: Enter adds a line, Mod+Enter saves. Use `EditableTextarea`. | | `placeholder` | `string` | | The muted text of the preview when the text is empty. | | `disabled` | `boolean` | false | | | `readOnly` | `boolean` | false | No edit; the text stays selectable. | | `invalid` | `boolean` | false | The field shows the error look, and Enter and a blur do not save. | | `allowEmpty` | `boolean` | false | Save an empty text. Default `false`: an empty text cancels. | | `size` | `"default" \| "lg" \| "sm"` | "default" | | | `variant` | `"ghost" \| "outline"` | "ghost" | `ghost` (default): text with no edge at rest. `outline`: the field edge at rest, for a form. | | `rounded` | `"default" \| "full"` | "default" | | | `width` | `"fill" \| "fit"` | multiline ? "fill" : "fit" | `fit`: as wide as the text (default for one line). `fill`: the full row (default for many). | | `labels` | `Partial` | | | ### EditableArea | Prop | Type | Default | Description | | --- | --- | --- | --- | | `indicator` | `boolean` | true | The pencil hint after the box: a 24px slot that is always there, so the box keeps its place when the pencil fades in on hover or focus. No pencil on a touch screen. Default `true`; turn it off with the Edit trigger or in a table cell. | ### EditablePreview | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | `ReactNode` | | Custom text in the preview. Default: the saved text, or the placeholder. | ### EditableInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### EditableTextarea | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### EditableControls No props of its own: `className`, `children`, and every other prop go to the element it renders. ### EditableEditTrigger | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `busy` | `boolean` | | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. | | `spinnerPlacement` | `"center" \| "start"` | | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. | | `glass` | `"clear" \| "dark" \| "light"` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "icon" \| "icon-lg" \| "icon-sm" \| "icon-xs" \| "lg" \| "sm" \| "xl" \| "xs"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | | | | `children` | `ReactNode` | | | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ### EditableSubmitTrigger | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `busy` | `boolean` | | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. | | `spinnerPlacement` | `"center" \| "start"` | | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. | | `glass` | `"clear" \| "dark" \| "light"` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "icon" \| "icon-lg" \| "icon-sm" \| "icon-xs" \| "lg" \| "sm" \| "xl" \| "xs"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | | | | `children` | `ReactNode` | | | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ### EditableCancelTrigger | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `busy` | `boolean` | | The button waits for the app (busy words): a spinner, `aria-busy`, and no clicks. Focus stays on the button. The style hook stays `data-loading`. | | `spinnerPlacement` | `"center" \| "start"` | | `center` (default): the spinner covers the label. `start`: it takes the leading icon slot. The icon sizes always use `center`, because their one icon is the label. | | `glass` | `"clear" \| "dark" \| "light"` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "icon" \| "icon-lg" \| "icon-sm" \| "icon-xs" \| "lg" \| "sm" \| "xl" \| "xs"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | | | | `children` | `ReactNode` | | | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ### EditableError No props of its own: `className`, `children`, and every other prop go to the element it renders. ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Editable | `editable` | `data-disabled` | | | | EditableArea | `editable-area` | `data-editing`, `data-stage-focused` | `--editable-indicator`, `--radius` | `motion-timing` | | EditablePreview | `editable-preview` | `data-editing`, `data-placeholder` | `--radius` | `motion-timing` | | EditableInput | `editable-input` | | `--radius` | | | EditableTextarea | `editable-textarea` | | `--radius` | | | EditableControls | `editable-controls` | | | `hit-area` | | EditableEditTrigger | `editable-edit-trigger` | | | `motion-timing` | | EditableSubmitTrigger | `editable-submit-trigger` | | | `motion-timing` | | EditableCancelTrigger | `editable-cancel-trigger` | | | `motion-timing` | | EditableError | `editable-error` | | | | ## Usage Wrap a preview and an input in an area. A press, Enter, or a double click opens the field; Enter or a blur saves, Escape cancels. ```tsx title="report-title.tsx" import { Editable, EditableArea, EditableInput, EditablePreview } from "@/components/ui/editable"; export function ReportTitle() { return ( console.log(name)}> ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/editable ``` It adds 24 registry items: 21 files, 3700 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `@xstate/react`, `clsx`, `tailwind-merge`, `tailwind-variants`, `xstate`. ## Built on - [Button](https://gelatinui.com/components/button.md) - [Input](https://gelatinui.com/components/input.md) - [Textarea](https://gelatinui.com/components/textarea.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Input](https://gelatinui.com/components/input.md) - [Textarea](https://gelatinui.com/components/textarea.md) - [Field](https://gelatinui.com/components/field.md) - [Form](https://gelatinui.com/components/form.md) ## Keyboard | Keys | Action | | --- | --- | | Enter, Space, F2 | On the preview: opens the field with the text selected. | | Enter | In the field: saves. With `multiline`, adds a line. | | Mod + Enter | With `multiline`: saves. | | Escape | Puts the old text back and closes the field. | ## Motion | Part | Motion | | --- | --- | | Swap | none · the preview and the field share one box, so nothing moves | | Hover | hover · the preview tints and the pencil fades in | --- # Expanding Search > A round search button that grows into a search field when you press it. It closes again when the field is empty and you move away. Page: https://gelatinui.com/components/expanding-search ## When to use it Best for: A search that must take little room until people need it, in a header or an app bar. - Use it when the header has no room for a full field at rest. - Use `align="end"` for a search at the end of a header: the field grows toward the start. - Use `shortcut` to open it with a key, such as `/`. ## When not to use it - For a search that is the main task of the page, use a [Search Field](https://gelatinui.com/components/search-field.md). - For a search of commands and pages in a popup, use a [Command](https://gelatinui.com/components/command.md). ## Notes for agents - Give it an `aria-label`. The round button takes the same name. - The root keeps the open width in the layout (default `w-60`). Set the width with `className`. - It stays open while it holds text. Escape on an empty field closes it and puts the focus on the button. - `open`, `defaultOpen`, and `onOpenChange` hold the open state. `value` and `onValueChange` hold the text. - All Search Field props pass through: `size`, `busy`, `shortcut`, `placeholder`. ## Anatomy ```text ExpandingSearch ``` ## API reference ### ExpandingSearch | Prop | Type | Default | Description | | --- | --- | --- | --- | | `value` | `string` | | The text, when the parent owns it. | | `defaultValue` | `string` | "" | The first text, when the field owns it. Default "". | | `onValueChange` | `function` | | Each change of the text, at once (each key, a clear). | | `onSearch` | `function` | | Run the search: on Enter, on a clear (with ""), and after `debounce` ms of no typing. | | `onClear` | `function` | | The text was cleared (the clear button, or Escape with text). | | `debounce` | `number` | | Ms of no typing before `onSearch` runs. `undefined` (the default): typing does not search, only Enter and a clear do. `0`: each change searches. | | `shortcut` | `false \| SearchFieldShortcut` | | The key that focuses and selects the field from anywhere. Default `false` (none). | | `className` | `string` | | Classes of the frame (the InputGroup), for its width. The classes of the root. Its width is the open width (default `w-60 max-w-full`). | | `busy` | `boolean` | | The field waits for results: the spinner takes the place of the search icon, and the input is `aria-busy`. | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" | | | `variant` | `"dashed" \| "default"` | | | | `open` | `boolean` | | The field is open (controlled). It also stays open while it holds text. | | `defaultOpen` | `boolean` | false | The field starts open (uncontrolled). Default `false`. | | `onOpenChange` | `function` | | The field opened or closed. | | `align` | `"end" \| "start"` | "start" | The side that stays put while the field grows: `start` (default) or `end`, for a header. | | `labels` | `Partial` | | The words: `trigger`, and the Search Field words `clear` and `loading`. Keep it stable. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | ExpandingSearch | `expanding-search` | `data-input-group-control`, `data-stage-active` | | `hit-area`, `motion-timing` | ## Usage A search button that grows into a field. Read the text with `onValueChange`. ```tsx title="header-search.tsx" import { ExpandingSearch } from "@/components/ui/pro/expanding-search"; export function HeaderSearch() { return ( console.log(query)} /> ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/expanding-search ``` It adds 26 registry items: 23 files, 4152 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `@tanstack/react-hotkeys`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Search Field](https://gelatinui.com/components/search-field.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Search Field](https://gelatinui.com/components/search-field.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Command](https://gelatinui.com/components/command.md) ## Keyboard | Keys | Action | | --- | --- | | Enter, Space | On the round button: opens the field and moves the focus into it. | | Escape | Clears the text. On an empty field: closes it and puts the focus on the button. | | / | Opens the field when `shortcut` is `/`. | ## Motion | Part | Motion | | --- | --- | | Open and close | island · the frame grows from a circle to the full width, and the icon stays in place | | Text | fade · the text and the placeholder fade in and out | | Press | press · the button scales to 0.94 | --- # FAQ N.01 > FAQ: a section of answers that are always open, each with its glyph, in a tray with a dark help strip across it. Page: https://gelatinui.com/blocks/faq-01 ## When to use it Best for: Six or so short answers that a visitor should read at a glance, with no clicks. - Each answer fits in three lines; a long FAQ wants an accordion. - Pass a glyph for each answer from `@phosphor-icons/react`. ## When not to use it - For a long list of questions that opens one at a time, use [Accordion](https://gelatinui.com/components/accordion.md). ## Notes for agents - Answers are always open; there is no state to wire. - An empty `help.people` hides the faces of the strip. - To change the order or drop a part, pass the parts as children. With children, the block ignores `content`. ## Anatomy ```text Faq01 ├─ Faq01Default (0..n) ├─ Faq01Header (0..n) ├─ Faq01Actions (0..n) ├─ Faq01Grid (0..n) ├─ Faq01Item (0..n) ├─ Faq01Question (0..n) ├─ Faq01Answer (0..n) ├─ Faq01Help (0..n) └─ Faq01HelpText (0..n) ``` ## API reference ### Faq01 | Prop | Type | Default | Description | | --- | --- | --- | --- | | `content` | `Faq01DefaultContent` | | The words of the ready composition. It has no use when you pass children. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Faq01 | `faq-01` | | | | | Faq01Default | `faq-01-header` | | | | | Faq01Header | `faq-01-header` | | | | | Faq01Actions | `faq-01-actions` | | | | | Faq01Grid | `faq-01-grid` | | | | | Faq01Item | `faq-01-item` | `data-part` | | | | Faq01Question | `faq-01-question` | | | | | Faq01Answer | `faq-01-answer` | | | | | Faq01Help | `faq-01-help` | | | | | Faq01HelpText | `faq-01-help-text` | | | | ## Usage Render it with no props for the sample content, then pass your own through `content`. ```tsx title="pricing-faq.tsx" import { Faq01 } from "@/components/blocks/faq-01/faq-01"; export function PricingFaq() { return ; } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/faq-01 ``` It adds 45 registry items: 51 files, 7698 lines, and the npm packages `@base-ui/react`, `@dicebear/core`, `@dicebear/styles`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Button](https://gelatinui.com/components/button.md) - [Frame](https://gelatinui.com/components/frame.md) - [Icon Tile](https://gelatinui.com/components/icon-tile.md) - [Testimonial](https://gelatinui.com/components/testimonial.md) - [Typography](https://gelatinui.com/components/typography.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Frame](https://gelatinui.com/components/frame.md) - [Icon Tile](https://gelatinui.com/components/icon-tile.md) - [Avatar](https://gelatinui.com/components/avatar.md) ## Accessibility The block is a `section` with a visible `h2`; each question is an `h3`. Glyphs and faces are decorative. ## Motion | Part | Motion | | --- | --- | | All | none · the answers stand still | --- # IBAN Input > A field for a bank account number (IBAN). It groups the characters in fours, shows the flag and country, and checks the length and check digits. Page: https://gelatinui.com/components/iban-input ## When to use it Best for: One IBAN in groups of four, with the flag of its country and the mod-97 check. - Use it for a bank account in a country that uses IBANs (most of Europe, the Middle East, and others). - Check it in a `Field` with `iban().complete` and `iban().valid` from `lib/masks`. - Add `IbanInputCountry` to name the country next to the IBAN. ## When not to use it - For a card number, use a [Card Number Input](https://gelatinui.com/components/card-number-input.md). - For another fixed format, such as a routing number, use a [Masked Input](https://gelatinui.com/components/masked-input.md). ## Notes for agents - The parts are `IbanInputFlag`, `IbanInputControl`, and `IbanInputCountry`. With no children it renders the flag and the control. - `onValueChange(text, details)`: `details.unmasked` is the compact IBAN, and `details.country` the two letters. - A paste with spaces, dashes, lower case, or an "IBAN:" label still fits. - Use `rawName` on `IbanInputControl` to submit the compact IBAN with a form. - The mod-97 check finds most typing mistakes. It does not prove that the account exists. ## Anatomy ```text IbanInput ├─ IbanInputCountry (0..n) ├─ IbanInputFlag (0..n) └─ IbanInputControl (0..n) ``` ## API reference ### IbanInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `rounded` | `"default" \| "full"` | "default" | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" | | | `variant` | `"dashed" \| "default"` | | | | `disabled` | `boolean` | false | Turns the control off; the frame fades to 50% with it (the Base UI name). | | `readOnly` | `boolean` | false | The IBAN shows and can be copied, but not changed (the Base UI name). | | `value` | `string` | | The shown IBAN (controlled). A compact one shows in groups of four. | | `defaultValue` | `string` | "" | The first shown IBAN (uncontrolled). | | `onValueChange` | `function` | | Runs on every change with the text, the compact IBAN, the checks, and the country. | | `locale` | `string` | | The language of the country name. Default: the display locale (en-US unless a provider sets one). | ### IbanInputCountry | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### IbanInputFlag | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### IbanInputControl | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `guide` | `boolean` | | The ghost guide of the slots still to fill, while the input has focus. Default `true`. | | `rawName` | `string` | | Also submit the raw value under this name (a hidden input), next to the shown one. | | `rejectFeedback` | `boolean` | | Nudge the field 2px when the mask rejects a key. Default `true`. | | `onReject` | `function` | | Runs when the mask rejects a key (a letter in a number, a 13th month). | | `ref` | `Ref` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | IbanInput | `iban-input` | | | | | IbanInputCountry | `iban-input-country` | | | `motion-timing` | | IbanInputFlag | `iban-input-flag` | | | | | IbanInputControl | `iban-input-control` | | | | ## Usage Import IBAN Input and compose its parts. ```tsx title="iban-input.tsx" import { IbanInput, IbanInputControl, IbanInputCountry, IbanInputFlag } from "@/components/ui/pro/iban-input"; export function IbanInputDemo() { return ( ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/iban-input ``` It adds 33 registry items: 30 files, 5880 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@maskito/core`, `@maskito/kit`, `@maskito/react`, `@phosphor-icons/react`, `clsx`, `country-flag-icons`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Country Flag](https://gelatinui.com/components/country-flag.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Masked Input](https://gelatinui.com/components/masked-input.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Masked Input](https://gelatinui.com/components/masked-input.md) - [Country Flag](https://gelatinui.com/components/country-flag.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Field](https://gelatinui.com/components/field.md) ## Accessibility It is a native input, in a `Field` for the label, the help text, and the error. The flag is decorative. `IbanInputCountry` says the country in text. ## Motion | Part | Motion | | --- | --- | | Flag | popup · 150ms · ease-panel (0.2, 0.4, 0.2, 1) · a new flag fades in and scales from 90% when the country changes | | Rejected key | indicator · the frame moves 2px to each side and back when the mask rejects a key | --- # Input > A field for one line of text, such as a name or an email address. It comes in the 3 sizes of Button, with invalid, disabled, and read-only states. Page: https://gelatinui.com/components/input ## When to use it Best for: One line of text in a form: an email address, a name, or a URL. - Use it for one line of text: an email address, a name, a URL. - Put it in a Field for its label, description, and error. - Set `size` (28, 32, or 36px) to match the Button next to it. Set the width with `className`. ## When not to use it - For a one-time code, use [Input OTP](https://gelatinui.com/components/input-otp.md). - For many lines of text, use a multi-line text field, not an Input. ## Notes for agents - Put it in a `Field` for its label, help, and error; alone it has no name. - Match `size` to the Button next to it (28, 32, or 36px); set the width with `className`. ## Anatomy ```text Input ``` ## API reference ### Input | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `surface` | `"default" \| "group" \| "plain"` | | | | `className` | `string` | | | Also takes every prop of Base UI `Input`: https://base-ui.com/react/components/input ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Input | `input` | `aria-invalid` | | `status-colors` | ## Usage Put the Input in a `Field` with a `FieldLabel`, so the label and the error link to it. `size` is the height (`sm` 28, `default` 32, `lg` 36px), not the native `size` attribute. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/input @gelatin-ui/field ``` ```tsx title="workspace-url-field.tsx" import { Field, FieldError, FieldLabel } from "@/components/ui/field"; import { Input } from "@/components/ui/input"; export function WorkspaceUrlField() { return ( Workspace URL Enter a full URL, with https://. ); } ``` ## Compose Build it with: - [Form](https://gelatinui.com/components/form.md): Owns the submit and the errors. - [Field](https://gelatinui.com/components/field.md): Names each control and shows its error text. - [Textarea](https://gelatinui.com/components/textarea.md): Takes long text. - [Stepper](https://gelatinui.com/components/stepper.md): Shows the steps of a long form. - [Dialog](https://gelatinui.com/components/dialog.md): Holds a short form over the page. - [Button](https://gelatinui.com/components/button.md): Submits or moves to the next step. - [Alert](https://gelatinui.com/components/alert.md): Shows an error of the whole form. Rules: - Name every control (`label-every-control`): Give every field a visible `Label` (or a `Field`), and every icon button a `Tooltip` or an `aria-label`. - Labels real apps use (`real-labels`): Write the button and menu labels that real apps use ("Create API key", "Invite members"), with no "…" at the end. - No layout jump (`no-layout-jump`): When a state change adds, removes, or resizes content, reserve its space or animate its size, so nothing below it jumps. - Touch targets (`touch-targets`): Give every control a hit area of at least 44 px on touch screens, even when it looks smaller. Patterns: `gelatin://patterns/form-flow` ## Add it ```bash npx shadcn@latest add @gelatin-ui/input ``` It adds 5 registry items: 2 files, 1149 lines, and the npm packages `@base-ui/react`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Field](https://gelatinui.com/components/field.md) - [Form](https://gelatinui.com/components/form.md) - [Input OTP](https://gelatinui.com/components/input-otp.md) - [Textarea](https://gelatinui.com/components/textarea.md): Pick Textarea for many lines of text, such as a comment or a description. - [Number Field](https://gelatinui.com/components/number-field.md): Pick Number Field for one number with steps and limits, minus and plus buttons, and number formats. ## Accessibility Input is a Base UI `Input`, a native ``. In a `Field`, `FieldLabel` names it, and Base UI links the help and the error with `aria-describedby`. An invalid field (`aria-invalid`) shows a red edge and ring. Focus shows a 3px ring. A read-only field gets a muted fill. The text stays 14px on phones. Add the `ios-viewport` script to the document head, so iOS does not zoom into a focused field. --- # Input Group > One frame around an input or a text area and the parts next to it: icons, text, key hints, and buttons. Page: https://gelatinui.com/components/input-group ## When to use it Best for: One frame around an Input or a Textarea and its add-ons: icons, text, keys, or buttons. - Use it to put icons, text, keys, or buttons inside the frame of a field. - Use `InputGroupAddon align` (`inline-start`, `inline-end`, `block-start`, `block-end`) to place an add-on. - Use `InputGroupTextarea` with a `block-end` add-on for a composer with a toolbar. - Use `rounded="full"` for a one-line search field. ## When not to use it - For a field with no add-on, use an [Input](https://gelatinui.com/components/input.md). - For a list of options that opens under the field, use a [Combobox](https://gelatinui.com/components/combobox.md). ## Notes for agents - Use `InputGroupInput` and `InputGroupTextarea` in the group. They take the size of the group. - Combobox, Autocomplete, and Number Field inputs draw this frame themselves. Do not render `InputGroupInput` inside them. - A press on an add-on focuses the control. A press on a button, a link, or an input in the add-on stays on that child. - With `rounded="full"`, give a button add-on `rounded="full"` too. Do not use it with a Textarea or a block add-on. - In an inline add-on, use `InputGroupButton` with `xs` or `icon-xs`. Use `sm` or `icon-sm` in a block add-on. - Prefer a ghost or secondary `InputGroupButton` inline. An outline button draws a second border inside the frame. ## Anatomy ```text InputGroup ├─ InputGroupAddon (0..n) ├─ InputGroupText (0..n) ├─ InputGroupButton (0..n) ├─ InputGroupInput (0..n) └─ InputGroupTextarea (0..n) ``` ## API reference ### InputGroup | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rounded` | `"default" \| "full"` | "default" | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" | | | `variant` | `"dashed" \| "default"` | "default" | | | `className` | `string` | | | ### InputGroupAddon | Prop | Type | Default | Description | | --- | --- | --- | --- | | `align` | `"block-end" \| "block-start" \| "inline-end" \| "inline-start"` | "inline-start" | | | `className` | `string` | | | ### InputGroupText | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### InputGroupButton | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rounded` | `"default" \| "full"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | | | | `className` | `string` | | | | `size` | `"icon-sm" \| "icon-xs" \| "sm" \| "xs"` | | | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ### InputGroupInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | Also takes every prop of Base UI `Input`: https://base-ui.com/react/components/input ### InputGroupTextarea | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `size` | `ControlSizeAtLeastSm` | | The padding of the box: `sm`, `default`, or `lg` (the height follows the text). | Also takes every prop of Base UI `Field.Control`: https://base-ui.com/react/components/field ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | InputGroup | `input-group` | `aria-invalid`, `data-align`, `data-disabled`, `data-input-group-control`, `data-stage-focused` | `--input-group-button-disabled-opacity` | | | InputGroupAddon | `input-group-addon` | `data-size` | | | | InputGroupText | `input-group-text` | `data-size` | | | | InputGroupButton | `input-group-button` | `aria-pressed`, `data-disabled`, `data-loading`, `data-size` | `--input-group-button-disabled-opacity`, `--radius` | `hit-area` | | InputGroupInput | `input-group-control` | | | | | InputGroupTextarea | `input-group-control` | | | | ## Usage Use `InputGroupInput` or `InputGroupTextarea` in the group. `InputGroupAddon align` places each add-on. ```tsx title="project-search.tsx" import { MagnifyingGlassIcon } from "@phosphor-icons/react/ssr"; import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group"; export function ProjectSearch() { return ( ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/input-group ``` It adds 14 registry items: 11 files, 2305 lines, and the npm packages `@base-ui/react`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Button](https://gelatinui.com/components/button.md) - [Input](https://gelatinui.com/components/input.md) - [Textarea](https://gelatinui.com/components/textarea.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Input](https://gelatinui.com/components/input.md) - [Textarea](https://gelatinui.com/components/textarea.md) - [Combobox](https://gelatinui.com/components/combobox.md) ## Keyboard | Keys | Action | | --- | --- | | Tab | Moves focus to the control, then to each button in an add-on. | ## Accessibility The focus ring goes around the whole frame, so it also holds the add-ons. A press on an add-on focuses the control. A press on a button or a link in the add-on stays on that child. An icon add-on has no name. Name the input with a `FieldLabel` or an `aria-label`. --- # Input OTP > A field for a one-time code, one character per slot, in groups. People can paste the code, or the phone fills it from a text message. Page: https://gelatinui.com/components/input-otp ## When to use it Best for: A one-time code of a fixed length, from 4 to 8 characters, with paste and SMS autofill. - Use it for a short code of a fixed length, from 4 to 8 characters. - Group the slots for the eye, such as 3 + 3. Screen readers skip the separator. - Set `validationType` to `alphanumeric` or `alpha` for codes with letters. The default takes digits only. - Use `mask` to hide the characters of a secret code. ## When not to use it - For a password or a code of no fixed length, use an [Input](https://gelatinui.com/components/input.md). ## Notes for agents - It takes digits only by default; set `validationType` to `alphanumeric` or `alpha` for codes with letters. - Paste and SMS autofill fill every slot at once. ## Anatomy ```text InputOTP ├─ InputOTPGroup (0..n) ├─ InputOTPSlot (0..n) └─ InputOTPSeparator (0..n) ``` ## API reference ### InputOTP | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `size` | `ControlSizeAtLeastSm` | "default" | The size of every slot: `sm` 28, `default` 32, `lg` 36. | | `slotLabel` | `function` | characterLabel | The accessible name of each slot after the first, which takes the field label. Default: "Character 2 of 6". Translate it with the page. | Also takes every prop of Base UI `OtpField.Root`: https://base-ui.com/react/components/otp-field ### InputOTPGroup | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### InputOTPSlot | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### InputOTPSeparator | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `Separator`: https://base-ui.com/react/components/separator ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | InputOTP | `input-otp` | `data-disabled` | | | | InputOTPGroup | `input-otp-group` | `aria-invalid` | `--radius` | | | InputOTPSlot | `input-otp-slot` | `aria-invalid`, `data-disabled` | `--radius` | | | InputOTPSeparator | `input-otp-separator` | | | | ## Usage Set `length` and render that many `InputOTPSlot`s. Put the code in a `Field` with one `FieldLabel`: the first slot takes the label. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/input-otp @gelatin-ui/field ``` ```tsx title="sign-in-code.tsx" import { Field, FieldLabel } from "@/components/ui/field"; import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "@/components/ui/input-otp"; export function SignInCode({ onSend }: { onSend: (code: string) => void }) { return ( Sign-in code ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/input-otp ``` It adds 6 registry items: 3 files, 1320 lines, and the npm packages `@base-ui/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Input](https://gelatinui.com/components/input.md) - [Field](https://gelatinui.com/components/field.md) ## Keyboard | Keys | Action | | --- | --- | | ← | Moves to the slot before. | | → | Moves to the slot after. | | Home | Moves to the first slot. | | End | Moves to the first empty slot, or the last slot. | | Backspace | Deletes a character and moves to the slot before. | | Delete | Deletes the character in the slot. | | Ctrl Backspace | Clears the code (⌘ Backspace on a Mac). | ## Accessibility Each slot is a Base UI `OTPField.Input`, a native `` for one character. The first slot takes the field label. Each later slot gets its own `aria-label`, such as "Character 2 of 6". Translate it with `slotLabel` on the root. Base UI sets `autocomplete` and `maxLength` on the first slot only, so SMS autofill and password managers fill the full code. A paste fills all slots. `InputOTPSeparator` is hidden from screen readers (`aria-hidden`): it only groups the characters for the eye. A numeric code stays left to right on a right-to-left page, and the arrow keys follow the same direction. --- # IP Address Input > A field for an IPv4 address. It takes only digits and dots, adds a dot after 3 digits, and checks that each of the 4 parts is 0 to 255. Page: https://gelatinui.com/components/ip-address-input ## When to use it Best for: One IPv4 address in a settings or security form. - Use it for one IPv4 address, such as a server, a router, or a subnet mask. - Check it in a `Field` with `ipv4().valid` from `lib/masks`. ## When not to use it - For an IPv6 address or a range with a slash, use a [Input](https://gelatinui.com/components/input.md). - For another fixed format, use a [Masked Input](https://gelatinui.com/components/masked-input.md). ## Notes for agents - It takes IPv4 only, with no range (`/24`). `valid` needs four parts of 0 to 255 with no leading zeros. - The parts are `IpAddressInputIcon` and `IpAddressInputControl`. With no children it renders both. - It is always left to right, also in a right-to-left page. ## Anatomy ```text IpAddressInput ├─ IpAddressInputIcon (0..n) └─ IpAddressInputControl (0..n) ``` ## API reference ### IpAddressInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `rounded` | `"default" \| "full"` | "default" | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" | | | `variant` | `"dashed" \| "default"` | | | | `disabled` | `boolean` | false | Turns the control off; the frame fades to 50% with it (the Base UI name). | | `readOnly` | `boolean` | false | The address shows and can be copied, but not changed (the Base UI name). | | `value` | `string` | | The shown address (controlled). | | `defaultValue` | `string` | "" | The first shown address (uncontrolled). | | `onValueChange` | `function` | | Runs on every change with the text and the checks (four parts, each 0–255). | ### IpAddressInputIcon | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### IpAddressInputControl | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `guide` | `boolean` | | The ghost guide of the slots still to fill, while the input has focus. Default `true`. | | `rawName` | `string` | | Also submit the raw value under this name (a hidden input), next to the shown one. | | `rejectFeedback` | `boolean` | | Nudge the field 2px when the mask rejects a key. Default `true`. | | `onReject` | `function` | | Runs when the mask rejects a key (a letter in a number, a 13th month). | | `ref` | `Ref` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | IpAddressInput | `ip-address-input` | | | | | IpAddressInputIcon | `ip-address-input-icon` | | | | | IpAddressInputControl | `ip-address-input-control` | | | | ## Usage Put the icon and the control in the input, inside a Field with a label and a description. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui-pro/ip-address-input @gelatin-ui/field ``` ```tsx title="allowed-ip.tsx" import { Field, FieldDescription, FieldLabel } from "@/components/ui/field"; import { IpAddressInput, IpAddressInputControl, IpAddressInputIcon, } from "@/components/ui/pro/ip-address-input"; export function AllowedIp() { return ( Allowed IP Requests from other addresses are blocked ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/ip-address-input ``` It adds 27 registry items: 24 files, 5350 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@maskito/core`, `@maskito/kit`, `@maskito/react`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Input Group](https://gelatinui.com/components/input-group.md) - [Masked Input](https://gelatinui.com/components/masked-input.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Masked Input](https://gelatinui.com/components/masked-input.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Field](https://gelatinui.com/components/field.md) ## Accessibility It is a native input with a decimal keypad, in a `Field` for the label and the error. The network icon is decorative. ## Motion | Part | Motion | | --- | --- | | Rejected key | indicator · the frame moves 2px to each side and back when the mask rejects a key | --- # Masked Input > A text field that formats the value as you type: card numbers, IBANs, phones, amounts, dates, or your own pattern. A guide shows what is left to type. Page: https://gelatinui.com/components/masked-input ## When to use it Best for: A text field that formats as people type, from a preset such as a card number or a date. - Use it when a value has a fixed format. - Use a preset from `lib/masks`: `pattern`, `currency`, `percent`, `date`, `time`, `cardNumber`, `iban`, or `hexColor`. - Use `MaskedInputClear` for a button that empties the field. - Use `rawName` to also submit the raw value with a form. ## When not to use it - For a phone number with a country, use a [Phone Field](https://gelatinui.com/components/phone-field.md). - For a one-time code, use an [Input OTP](https://gelatinui.com/components/input-otp.md). - For free text, use an [Input](https://gelatinui.com/components/input.md). - For a date with a calendar, use a [Date Picker](https://gelatinui.com/components/date-picker.md). ## Notes for agents - Build the preset once at module level. A new preset object rebuilds the mask. - `value` is the shown value. `onValueChange` gets the shown value, the raw value, and the checks. - Use the preset checks for the error: `validate={(v) => preset.valid(v) ? null : "Enter a card number."}`. - Do not share a phone mask between inputs. Build one per input. - `MaskedInputClear` works only inside `MaskedInput`. Its default name is "Clear", so translate it. - Use `MaskedInputControl` inside your own `InputGroup`. - Put it in a `Field` for the label, the description, and the error. - `onReject` runs when the mask rejects a key. Set `rejectFeedback={false}` to stop the 2px nudge. ## Anatomy ```text MaskedInput ├─ MaskedInputControl (0..n) └─ MaskedInputClear (0..n) ``` ## API reference ### MaskedInputControl | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `mask` | `MaskPreset` | | A preset from `#/lib/masks` (or `#/lib/phone-model`). Build it once: a new object rebuilds the mask. | | `value` | `string` | | The shown value (controlled). It is formatted by the mask, so "4155550132" shows formatted. | | `defaultValue` | `string` | | The first shown value (uncontrolled), formatted by the mask. | | `onValueChange` | `function` | | Runs on every change with the shown value, the raw value, and the checks. | | `guide` | `boolean` | true | The ghost guide of the slots still to fill, while the input has focus. Default `true`. | | `rawName` | `string` | | Also submit the raw value under this name (a hidden input), next to the shown one. | | `rejectFeedback` | `boolean` | true | Nudge the field 2px when the mask rejects a key. Default `true`. | | `onReject` | `function` | | Runs when the mask rejects a key (a letter in a number, a 13th month). | | `ref` | `Ref` | | | ### MaskedInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `mask` | `MaskPreset` | | A preset from `#/lib/masks` (or `#/lib/phone-model`). Build it once: a new object rebuilds the mask. | | `value` | `string` | | The shown value (controlled). It is formatted by the mask, so "4155550132" shows formatted. | | `defaultValue` | `string` | "" | The first shown value (uncontrolled), formatted by the mask. | | `onValueChange` | `function` | | Runs on every change with the shown value, the raw value, and the checks. | | `guide` | `boolean` | | The ghost guide of the slots still to fill, while the input has focus. Default `true`. | | `rawName` | `string` | | Also submit the raw value under this name (a hidden input), next to the shown one. | | `rejectFeedback` | `boolean` | | Nudge the field 2px when the mask rejects a key. Default `true`. | | `onReject` | `function` | | Runs when the mask rejects a key (a letter in a number, a 13th month). | | `ref` | `Ref` | | | | `addons` | `boolean` | true | Show the start and end text of the preset (a currency symbol, "%", a unit). Default `true`. | ### MaskedInputClear | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `size` | `"icon-sm" \| "icon-xs" \| "sm" \| "xs"` | | | | `rounded` | `"default" \| "full"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | | | | `onClick` | `InputGroupButtonProps["onClick"]` | | | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | MaskedInputControl | `masked-input-control` | | | | | MaskedInput | `masked-input` | | | | | MaskedInputClear | `masked-input-clear` | `data-hidden` | | `motion-timing` | ## Usage Build the preset once at module level, so the mask does not rebuild, and add `MaskedInputClear` as a child at the end. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/masked-input @gelatin-ui/field ``` ```tsx title="card-number.tsx" import { Field, FieldLabel } from "@/components/ui/field"; import { MaskedInput, MaskedInputClear } from "@/components/ui/masked-input"; import { cardNumber } from "@/lib/masks"; const CARD = cardNumber(); export function CardNumber() { return ( Card number ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/masked-input ``` It adds 26 registry items: 23 files, 5219 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@maskito/core`, `@maskito/kit`, `@maskito/react`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Input Group](https://gelatinui.com/components/input-group.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Input Group](https://gelatinui.com/components/input-group.md) - [Phone Field](https://gelatinui.com/components/phone-field.md) - [Field](https://gelatinui.com/components/field.md) ## Keyboard | Keys | Action | | --- | --- | | Enter, Space | On `MaskedInputClear`: clears the field and puts focus back in it. | ## Accessibility It is a native input, so a `Field` labels it and links its help and error text. Each preset sets the keyboard and the autofill field. `MaskedInputClear` has the name "Clear" by default. Translate it in another language. ## Motion | Part | Motion | | --- | --- | | Clear button | fade · 150ms · ease-out (0, 0, 0.2, 1) · fades in when the field has text | --- # Mention Input > A text field that turns @people and #channels into chips. A line shows who gets a notice, and the value keeps their ids, not their names. Page: https://gelatinui.com/components/mention-input ## When to use it Best for: A comment or a message field where people mention teammates and channels, and the app needs their ids. - Give one trigger per list in `triggers`: `@` with the people, `#` with the channels. - Use `search` on a trigger for a directory too big to send; it runs 150ms after the last key and aborts the older search. - Save the value as it is: each mention is `@[label](id)`, so a renamed person still points to the right id. - Put `MentionInputNotice` in the footer, so the writer sees who gets a notice before sending. ## When not to use it - For plain text with no mentions, use a [Textarea](https://gelatinui.com/components/textarea.md). - For a list of tags or emails with no text around them, use a [Tags Input](https://gelatinui.com/components/tags-input.md). ## Notes for agents - The value is text with tokens: `Thanks @[Maya Chen](u_42) in #[checkout](c_7)`. Parse it on the server to send the notices. - Past `maxMentions` people (default 20), the field is invalid and `MentionInputError` and `MentionInputCount` show. - An item with `access: false` shows Give access and does not pick: handle it in `onGiveAccess`. - Cmd or Ctrl + Enter calls `onSubmit` with the value. Reset a controlled `value` to `""` after the send. - `readOnly` shows a sent comment: the text and chips with no field around them. - With `name`, the value goes with the form. ## Anatomy ```text MentionInput ├─ MentionInputContent (0..n) ├─ MentionInputFooter (0..n) ├─ MentionInputNotice (0..n) ├─ MentionInputCount (0..n) ├─ MentionInputError (0..n) └─ MentionInputPopup (0..n) ``` ## API reference ### MentionInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `aria-label` | `string` | | Defines a string value that labels the current element. The name of the field for screen readers, when no visible label names it. | | `value` | `string` | | The saved value: text with `@[label](id)` tokens. Controlled. | | `defaultValue` | `string` | "" | The first value when uncontrolled. Default `""`. | | `onValueChange` | `function` | | Called with the new value on each edit. | | `triggers` | `readonly MentionInputTrigger[]` | | What opens a list: `@` people, `#` channels. | | `maxMentions` | `number` | 20 | The most people a value may mention. Past it the field is invalid. Default 20. | | `onGiveAccess` | `function` | | Called with a row whose person cannot see the page (`access: false`). | | `onSubmit` | `function` | | Called on Cmd or Ctrl + Enter with the value (send the comment). | | `placeholder` | `string` | "" | The text of the empty field. | | `disabled` | `boolean` | false | | | `readOnly` | `boolean` | false | A sent comment: the text and chips show, with no field around them. | | `invalid` | `boolean` | false | Force the error look (a server error). The mention limit sets it by itself. | | `name` | `string` | | The form field name: the value goes with the form (`FormValue`). | | `labels` | `Partial` | | | | `children` | `ReactNode` | | The parts. Default: the text, the footer with the notice, and the list. | ### MentionInputContent No props of its own: `className`, `children`, and every other prop go to the element it renders. ### MentionInputFooter No props of its own: `className`, `children`, and every other prop go to the element it renders. ### MentionInputNotice No props of its own: `className`, `children`, and every other prop go to the element it renders. ### MentionInputCount No props of its own: `className`, `children`, and every other prop go to the element it renders. ### MentionInputError No props of its own: `className`, `children`, and every other prop go to the element it renders. ### MentionInputPopup | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `arrow` | `boolean` | | Show an arrow that points at the trigger. The gap grows from 4px to 8px. | | `backdrop` | `boolean` | | Put a clear layer under the popup (Base UI `Popover.Backdrop`), for example to dim it. | | `showCloseButton` | `boolean` | | Show a close button (a 24px ghost icon button) 10px from the top and the end. | | `padding` | `"default" \| "none" \| "tight"` | | `default`: radius 14, 12px padding and 10px between the parts, 288px wide. `tight`: 4px padding and 4px between the parts, as wide as the content: a row of 28px actions (a plain Toolbar) with the 4px inset of the bar recipe, 38px high (the selection pill of the Quote Reply). `none`: no padding and no gap, as wide as the content: a panel that lays out its own parts edge to edge (a head with a rule, a scroll box, a docked composer: the Chat Popup). Give it a width and a height with layout classes; the body fills that height. | | `portalProps` | `Omit` | | Other Base UI props of the inner parts. A `className` here adds to the component classes. | | `positionerProps` | `PopupPartProps` | | | | `backdropProps` | `PopupPartProps` | | | | `arrowProps` | `PopupPartProps` | | | | `closeButtonProps` | `PopupPartProps` | | | Also takes every prop of Base UI `Popover.Portal`: https://base-ui.com/react/components/popover ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | MentionInput | `mention-input` | `data-disabled`, `data-invalid`, `data-readonly`, `data-stage-focused` | `--radius` | `motion-timing` | | MentionInputContent | `mention-input-content` | `data-disabled` | | | | MentionInputFooter | `mention-input-footer` | | | | | MentionInputNotice | `mention-input-notice` | | | | | MentionInputCount | `mention-input-count` | | | `status-colors` | | MentionInputError | `mention-input-error` | | | `status-colors` | | MentionInputPopup | `mention-input-popup` | | | | ## Usage Give the triggers and their items. The content, the footer with the notice, and the list are parts. ```tsx title="comment-field.tsx" import { useState } from "react"; import { MentionInput, MentionInputContent, MentionInputCount, MentionInputFooter, MentionInputNotice, MentionInputPopup, } from "@/components/ui/mention-input"; const TRIGGERS = [ { char: "@", label: "People", items: [ { id: "u_42", kind: "person", label: "Maya Chen", meta: "Checkout" }, { id: "u_19", kind: "person", label: "Tomas Novak", meta: "Payments" }, ], }, { char: "#", label: "Channels", items: [{ id: "c_7", kind: "item", label: "checkout", meta: "24 members", notify: 24 }], }, ] as const; export function CommentField() { const [value, setValue] = useState(""); return ( setValue("")} placeholder="Write a comment. Type @ to mention" aria-label="Comment" > ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/mention-input ``` It adds 40 registry items: 37 files, 5972 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `@tiptap/core`, `@tiptap/extension-mention`, `@tiptap/extensions`, `@tiptap/pm`, `@tiptap/react`, `@tiptap/suggestion`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Avatar](https://gelatinui.com/components/avatar.md) - [Button](https://gelatinui.com/components/button.md) - [Dot](https://gelatinui.com/components/dot.md) - [Popover](https://gelatinui.com/components/popover.md) - [Skeleton](https://gelatinui.com/components/skeleton.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Textarea](https://gelatinui.com/components/textarea.md) - [Tags Input](https://gelatinui.com/components/tags-input.md) - [Combobox](https://gelatinui.com/components/combobox.md) - [Avatar](https://gelatinui.com/components/avatar.md) ## Keyboard | Keys | Action | | --- | --- | | @, # | Opens the list of the trigger at the caret. | | ↑ ↓ | Moves the highlight in the open list. Focus stays in the text. | | Enter, Tab | Puts the highlighted row in the text as a chip. | | Escape | Closes the list and keeps the typed text. | | Backspace | Next to a chip, selects it first. A second Backspace removes it. | | Cmd/Ctrl + Enter | Calls `onSubmit` with the value. | | Cmd/Ctrl + Z | Undoes the last edit. | ## Motion | Part | Motion | | --- | --- | | New chip | fade · 150ms · a picked chip fades in | | List | popup · 150ms · ease-panel · fades in and scales from 95% at the caret | --- # Number Field > A field for one number, with minus and plus buttons. Arrow keys step it, a drag on the label changes it, and it formats the number for the locale. Page: https://gelatinui.com/components/number-field ## When to use it Best for: One number with steps and limits: a quantity, a price, or a size. - Set `min`, `max`, and `step`. - Pass `format` for a currency, a percent, or a unit. - Add `NumberFieldScrubArea` for a drag on the label. ## When not to use it - For a number that is a position in a range, use a [Slider](https://gelatinui.com/components/slider.md). - For a code or a phone number, use a plain field: they are not numbers. ## Notes for agents - The value is a number, or `null` when empty. - `step`, `smallStep` (Alt), and `largeStep` (Shift) set the arrow-key steps. - With no `allowOutOfRange`, it clamps to `max` on blur. - Give the group controls an `aria-label`, such as "Fewer" and "More". - All Base UI props pass through. ## Anatomy ```text NumberField ├─ NumberFieldScrubArea (0..n) ├─ NumberFieldScrubAreaCursor (0..n) ├─ NumberFieldGroup (0..n) ├─ NumberFieldInput (0..n) ├─ NumberFieldDecrement (0..n) └─ NumberFieldIncrement (0..n) ``` ## API reference ### NumberField | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `NumberField.Root`: https://base-ui.com/react/components/number-field ### NumberFieldScrubArea | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `NumberField.ScrubArea`: https://base-ui.com/react/components/number-field ### NumberFieldScrubAreaCursor | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### NumberFieldGroup | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" | | | `className` | `string` | | | ### NumberFieldInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | Also takes every prop of Base UI `NumberField.Input`: https://base-ui.com/react/components/number-field ### NumberFieldDecrement | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ### NumberFieldIncrement | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | NumberField | `number-field` | | | | | NumberFieldScrubArea | `number-field-scrub-area` | `data-direction`, `data-disabled`, `data-readonly` | | | | NumberFieldScrubAreaCursor | `number-field-scrub-area-cursor` | | | | | NumberFieldGroup | `number-field-group` | `data-scrubbing`, `data-size` | | | | NumberFieldInput | `number-field-input` | `data-size` | | | | NumberFieldDecrement | `number-field-decrement` | `data-readonly` | | | | NumberFieldIncrement | `number-field-increment` | `data-readonly` | | | ## Usage Compose the group. ```tsx title="quantity-field.tsx" import { NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, } from "@/components/ui/number-field"; export function QuantityField() { return ( ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/number-field ``` It adds 17 registry items: 14 files, 2755 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Input Group](https://gelatinui.com/components/input-group.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Input Group](https://gelatinui.com/components/input-group.md) - [Slider](https://gelatinui.com/components/slider.md): Pick Slider when the number is a position in a range that people drag to. - [Form](https://gelatinui.com/components/form.md) - [Input](https://gelatinui.com/components/input.md): Pick Input for text that only looks like a number, such as a code or a phone number. ## Keyboard | Keys | Action | | --- | --- | | Up Arrow, Down Arrow | Steps by `step`. Shift steps by `largeStep`, and Alt by `smallStep`. | | Page Up, Page Down | Steps by `largeStep`. | | Home, End | Goes to `min` or `max`. | ## Accessibility The input is a `spinbutton` for the keyboard and screen readers. Each stepper keeps a 44px touch target. To the eye it stays small. --- # Number Pad > A large keypad for typing numbers on a touch screen. It sends digits, the decimal key of the locale, and delete to the field it drives. Page: https://gelatinui.com/components/number-pad ## When to use it Best for: Typing an amount or a PIN on a touch screen, with big keys and no system keyboard. - Use it under an amount on a phone, where the system keyboard covers the screen. - Keep the value in your own state and apply each key with `applyNumberPadKey`. - Pass `blockedNumberPadKeys` to `disabledKeys`, so keys that do nothing now show as off. ## When not to use it - For an amount typed on a desktop keyboard, use a [Currency Input](https://gelatinui.com/components/currency-input.md). - For a short code in boxes, use an [Input OTP](https://gelatinui.com/components/input-otp.md). ## Notes for agents - The pad owns no value: `onKey` gets a digit, `decimal`, `delete`, or `clear`. Apply it to your text with `applyNumberPadKey(text, key, { decimals })`. - `locale` sets the decimal key: `.` in en-US, `,` in de-DE. `decimal={false}` hides the key for a PIN and keeps its place. - A short press on delete sends `delete`; a hold of 450ms or more sends `clear`. - One tab stop: the arrow keys move between keys and skip keys that are off. Typed digits, `.`, `,`, Backspace, and Delete press the same keys. - Pass `NumberPadKey` children to change the keys or their faces. ## Anatomy ```text NumberPad └─ NumberPadKey (0..n) ``` ## API reference ### NumberPad | Prop | Type | Default | Description | | --- | --- | --- | --- | | `disabled` | `boolean` | false | Turn the whole pad off (a swap in flight). | | `size` | `"default" \| "sm"` | "default" | | | `onKey` | `function` | | Called with each key: a digit, `decimal`, `delete`, or `clear` (a held delete, or the Delete key). The pad owns no value: apply the key to your own value (`applyNumberPadKey`). | | `locale` | `string` | | The locale of the decimal key: `.` in en-US, `,` in de-DE. Default `"en-US"`. | | `decimal` | `boolean` | true | Show the decimal key. `false` for a PIN or whole units: its place stays empty. Default `true`. | | `disabledKeys` | `Iterable` | | Keys that do nothing now (`blockedNumberPadKeys`): no decimals left, nothing to delete. | | `children` | `ReactNode` | | The keys. Default: the 12 keys of a phone pad. | ### NumberPadKey | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | `ReactNode` | | The face. Default: the digit, the locale decimal sign, or the delete icon. | | `value` | `NumberPadKeyName` | | The key this button sends. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | NumberPad | `number-pad` | `data-disabled`, `data-hidden`, `data-pressed` | | `motion-timing` | | NumberPadKey | `number-pad-key` | `data-disabled`, `data-hidden`, `data-pressed` | | `motion-timing` | ## Usage Render one key for each name of the layout, and apply each key to your own text with `applyNumberPadKey`. ```tsx title="amount-pad.tsx" import { useState } from "react"; import { NumberPad, NumberPadKey } from "@/components/ui/pro/number-pad"; import { NUMBER_PAD_LAYOUT, applyNumberPadKey, blockedNumberPadKeys, } from "@/lib/pro/number-pad-model"; const EURO = { decimals: 2 }; export function AmountPad() { const [text, setText] = useState(""); return (

    €{text === "" ? "0" : text}

    { setText((current) => { return applyNumberPadKey(current, key, EURO).text; }); }} > {NUMBER_PAD_LAYOUT.map((key) => { return ; })}
    ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui-pro/number-pad ``` It adds 10 registry items: 9 files, 2590 lines, and the npm packages `@phosphor-icons/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Currency Input](https://gelatinui.com/components/currency-input.md) - [Input OTP](https://gelatinui.com/components/input-otp.md) - [Currency Swap](https://gelatinui.com/components/currency-swap.md) ## Keyboard | Keys | Action | | --- | --- | | Arrow keys | Move between keys; keys that are off are skipped. | | 0-9, period, comma | Press the digit or the decimal key. | | Backspace | Press delete. | | Delete | Press clear. | ## Motion | Part | Motion | | --- | --- | | Press | press · the key fills and scales to 0.96 | --- # Password Field > A password field with an eye button that shows or hides the text, and a hint when Caps Lock is on. It hides the password again on submit. Page: https://gelatinui.com/components/password-field ## When to use it Best for: A password input with a show and hide toggle that goes back to hidden on submit, page hide, and unmount. - Use it for each password in a sign-in, sign-up, or change form. - Use `PasswordFieldToggle` so people can check what they typed. - Use `PasswordFieldCapsLock` in the same `Field` to show a Caps Lock hint. ## When not to use it - For a one-time code, use an [Input OTP](https://gelatinui.com/components/input-otp.md). - To show how strong a new password is, add a [Password Strength](https://gelatinui.com/components/password-strength.md). ## Notes for agents - Pass `autoComplete="new-password"` on a sign-up or change form. The default is `current-password`. - The field goes back to hidden on form submit, page hide, and unmount. `onVisibleChange` runs for each change. - The toggle name stays "Show password" in both states and it uses `aria-pressed`. Do not swap the name. - The toggle is disabled with the input, so Tab skips it in a disabled field. - `PasswordFieldCapsLock` watches the closest `Field`, else its parent. Put it in the same `Field`. - Every `InputGroup` prop passes, such as `size`. ## Anatomy ```text PasswordField ├─ PasswordFieldInput (0..n) ├─ PasswordFieldToggle (0..n) └─ PasswordFieldCapsLock (0..n) ``` ## API reference ### PasswordField | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `variant` | `"dashed" \| "default"` | | | | `className` | `string` | | | | `visible` | `boolean` | | Shows the password as text (controlled). | | `defaultVisible` | `boolean` | false | Shows the password as text at first (uncontrolled). Default `false`. | | `onVisibleChange` | `function` | | Runs when the toggle, a form submit, or a page hide changes `visible`. | ### PasswordFieldInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | Also takes every prop of Base UI `Input`: https://base-ui.com/react/components/input ### PasswordFieldToggle | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `size` | `"icon-sm" \| "icon-xs" \| "sm" \| "xs"` | | | | `rounded` | `"default" \| "full"` | | | | `variant` | `"dashed" \| "default" \| "destructive" \| "destructive-outline" \| "ghost" \| "link" \| "media" \| "outline" \| "secondary"` | | | | `label` | `string` | "Show password" | The name of the toggle. Default "Show password". It does not change with the state. | Also takes every prop of Base UI `Button`: https://base-ui.com/react/components/button ### PasswordFieldCapsLock No props of its own: `className`, `children`, and every other prop go to the element it renders. ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | PasswordField | `password-field` | | | | | PasswordFieldInput | `password-field-input` | | | | | PasswordFieldToggle | `password-field-toggle` | `aria-pressed` | | | | PasswordFieldCapsLock | `password-field-caps-lock` | | | | ## Usage Put `PasswordFieldInput` and `PasswordFieldToggle` in `PasswordField`, inside a `Field`. Pass `autoComplete="new-password"` on a sign-up form. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/password-field @gelatin-ui/field ``` ```tsx title="sign-in-password.tsx" import { Field, FieldLabel } from "@/components/ui/field"; import { PasswordField, PasswordFieldCapsLock, PasswordFieldInput, PasswordFieldToggle, } from "@/components/ui/password-field"; export function SignInPassword() { return ( Password ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/password-field ``` It adds 23 registry items: 20 files, 3083 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Input Group](https://gelatinui.com/components/input-group.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Password Strength](https://gelatinui.com/components/password-strength.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Animated Eye Icon](https://gelatinui.com/components/animated-eye-icon.md) - [Input](https://gelatinui.com/components/input.md) ## Keyboard | Keys | Action | | --- | --- | | Enter, Space | On `PasswordFieldToggle`: shows or hides the password. Focus stays on the toggle. | ## Accessibility The toggle name stays "Show password" in both states, and it uses `aria-pressed`. The field goes back to hidden on submit, page hide, and unmount, so a browser never keeps a shown password. The toggle is disabled with the input, so Tab skips it in a disabled field. --- # Phone Field > A field for a phone number and its country. Pick the country from a list with flags and search, and the number formats as you type. Page: https://gelatinui.com/components/phone-field ## When to use it Best for: A phone number with its country: pick from a list or type the + code, and get E.164. - Use it to ask for a phone number from more than one country. - Use `phoneFormat="national"` to show the dial code in the trigger. - Use `countries` to limit the list. With one country, there is no list. - Use `name` on `PhoneFieldInput` to submit E.164 with a form. ## When not to use it - For another fixed text format, such as a card number, use a [Masked Input](https://gelatinui.com/components/masked-input.md). - For a one-time code sent to the phone, use an [Input OTP](https://gelatinui.com/components/input-otp.md). ## Notes for agents - `value` is the number as shown. `onValueChange` gets E.164 first, or `null` while the number is not possible. - In international format, the typed + code also sets the country. - `metadata` is `min` by default. Pass `max` for exact `valid` and `type`. - Use `check="valid"` with `max` metadata. `possible`, the default, checks only the length. - `locale` sets the language of the country names. It is `en` by default. - `PhoneFieldError` shows after a blur or with `showErrors`. With `required`, an empty number is an error too. - A paste of a national number ("030 901820") or one with 00 ("0049 30 901820") gets the + code of the picked country. - Pass `renderFlag` for your own flags. Return `null` for no flags. - Translate the texts with `labels`. `{country}` is the country name. ## Anatomy ```text PhoneField ├─ PhoneFieldLabel (0..n) ├─ PhoneFieldGroup (0..n) ├─ PhoneFieldFlag (0..n) ├─ PhoneFieldCountry (0..n) ├─ PhoneFieldInput (0..n) └─ PhoneFieldError (0..n) ``` ## API reference ### PhoneField | Prop | Type | Default | Description | | --- | --- | --- | --- | | `disabled` | `boolean` | false | | | `value` | `string` | | The number as shown (controlled). | | `defaultValue` | `string` | "" | | | `onValueChange` | `function` | | Runs on every change with E.164 (or `null` while not possible) and every detail. | | `country` | `CountryCode \| null` | | The country (controlled). In international format the typed + code also sets it. | | `defaultCountry` | `CountryCode` | | | | `onCountryChange` | `function` | | | | `phoneFormat` | `"international" \| "national"` | "international" | `international` (default): "+49 30 901820". `national`: "030 901820", the dial code in the trigger. | | `countries` | `readonly CountryCode[]` | | Limit the list (in this order). One country: no list, no chevron. | | `metadata` | `MetadataJson` | PHONE_METADATA | libphonenumber-js metadata: `min` by default; `max` for exact `valid` and `type`. | | `check` | `"possible" \| "valid"` | "possible" | `possible` (default): the length fits. `valid`: the country ranges (use with `max`). | | `locale` | `string` | | The language of the country names (`Intl.DisplayNames`). Default `en`, the same on server and client. | | `renderFlag` | `function` | | Your own flags (static imports for the server HTML, another set, or none: return `null`). | | `labels` | `Partial>` | | The texts (translate them). `{country}` is the country name. | | `readOnly` | `boolean` | false | | | `showErrors` | `boolean` | false | Show the error now, as after a submit. | | `required` | `boolean` | false | An empty number is an error (`labels.required`) after a blur or with `showErrors`. | ### PhoneFieldLabel No props of its own: `className`, `children`, and every other prop go to the element it renders. ### PhoneFieldGroup | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | | `variant` | `"dashed" \| "default"` | | | | `className` | `string` | | | ### PhoneFieldFlag | Prop | Type | Default | Description | | --- | --- | --- | --- | | `locale` | `string` | | The language of the name (`Intl.DisplayNames`). Default: the `DisplayLocaleProvider` locale. | | `pop` | `boolean` | | Pop the art in when `code` changes: scale 0.9 to 1 and a fade on the popup clock. | | `variant` | `"circle" \| "rectangle" \| "square"` | | | | `country` | `CountryCode \| null` | | The country, or `null` for the globe. Default: the country of the field. | ### PhoneFieldCountry | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className` | `string` | | | | `align` | `"block-end" \| "block-start" \| "inline-end" \| "inline-start"` | | | ### PhoneFieldInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `name` | `string` | | Submit E.164 under this name (a hidden input). | | `className` | `string` | | | | `guide` | `boolean` | | The ghost guide of the slots still to fill, while the input has focus. Default `true`. | | `rawName` | `string` | | Also submit the raw value under this name (a hidden input), next to the shown one. | | `rejectFeedback` | `boolean` | | Nudge the field 2px when the mask rejects a key. Default `true`. | | `onReject` | `function` | | Runs when the mask rejects a key (a letter in a number, a 13th month). | | `ref` | `Ref` | | | | `rounded` | `"default" \| "full"` | | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | | | ### PhoneFieldError No props of its own: `className`, `children`, and every other prop go to the element it renders. ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | PhoneField | `phone-field` | | | | | PhoneFieldLabel | `phone-field-label` | | | | | PhoneFieldGroup | `phone-field-group` | | | | | PhoneFieldFlag | `phone-field-flag` | | | | | PhoneFieldCountry | `phone-field-country` | `data-popup-open`, `data-rounded`, `data-size` | `--radius` | | | PhoneFieldInput | `phone-field-input` | | | | | PhoneFieldError | `phone-field-error` | | | | ## Usage Put `PhoneFieldGroup` inside `PhoneField`, and `name` on `PhoneFieldInput` to submit E.164. `onValueChange` gets E.164 first, or `null` while the number is not possible. ```tsx title="contact-phone.tsx" import { PhoneField, PhoneFieldCountry, PhoneFieldError, PhoneFieldGroup, PhoneFieldInput, PhoneFieldLabel, } from "@/components/ui/phone-field"; export function ContactPhone() { return ( Phone ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/phone-field ``` It adds 63 registry items: 60 files, 10168 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@maskito/core`, `@maskito/kit`, `@maskito/phone`, `@maskito/react`, `@phosphor-icons/react`, `@tanstack/react-virtual`, `clsx`, `country-flag-icons`, `libphonenumber-js`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Combobox](https://gelatinui.com/components/combobox.md) - [Country Flag](https://gelatinui.com/components/country-flag.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Masked Input](https://gelatinui.com/components/masked-input.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Masked Input](https://gelatinui.com/components/masked-input.md) - [Field](https://gelatinui.com/components/field.md) - [Combobox](https://gelatinui.com/components/combobox.md) ## Keyboard | Keys | Action | | --- | --- | | Enter, Space, Arrow Down | On `PhoneFieldCountry`: opens the country list. | | Arrow keys | In the list: moves through the countries. | | Enter | In the list: picks the country. | | Escape | Closes the country list. | ## Accessibility `PhoneFieldLabel` names the number input, and the country list is a button with its own name. `PhoneFieldError` shows after a blur or with `showErrors`. Translate the texts with `labels`, and set the language of the country names with `locale`. ## Motion | Part | Motion | | --- | --- | | Open | popup · 150ms · ease-panel (0.2, 0.4, 0.2, 1) · fades in and scales from 95% | | Close | popup-exit · 120ms · ease-out (0, 0, 0.2, 1) | --- # Search Field > A search field with a key to focus it (/ or ⌘K), a clear button, and a spinner while results load. Escape clears it, and it waits for a pause in typing. Page: https://gelatinui.com/components/search-field ## When to use it Best for: A search query in one line, with a shortcut, a clear button, and a debounce. - Use it above a list or a table. - Set `shortcut` to focus it from anywhere. - Set `debounce` to run `onSearch` after typing stops. ## When not to use it - For a list of choices in a popup, use a [Combobox](https://gelatinui.com/components/combobox.md). - For a plain text field, use an [Input](https://gelatinui.com/components/input.md). ## Notes for agents - It needs a name: `aria-label`, or a `FieldLabel` in a `Field`. - `busy` swaps the search icon for a spinner. ## Anatomy ```text SearchField ``` ## API reference ### SearchField | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rounded` | `"default" \| "full"` | "default" | | | `size` | `"default" \| "lg" \| "sm" \| "xs"` | "default" | | | `variant` | `"dashed" \| "default"` | "default" | | | `value` | `string` | | The text, when the parent owns it. | | `defaultValue` | `string` | | The first text, when the field owns it. Default "". | | `onValueChange` | `function` | | Each change of the text, at once (each key, a clear). | | `onSearch` | `function` | | Run the search: on Enter, on a clear (with ""), and after `debounce` ms of no typing. | | `onClear` | `function` | | The text was cleared (the clear button, or Escape with text). | | `debounce` | `number` | | Ms of no typing before `onSearch` runs. `undefined` (the default): typing does not search, only Enter and a clear do. `0`: each change searches. | | `shortcut` | `false \| SearchFieldShortcut` | false | The key that focuses and selects the field from anywhere. Default `false` (none). | | `className` | `string` | | Classes of the frame (the InputGroup), for its width. | | `busy` | `boolean` | false | The field waits for results: the spinner takes the place of the search icon, and the input is `aria-busy`. | | `labels` | `Partial` | | The words (`SEARCH_FIELD_LABELS`). Keep the object stable. | ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | SearchField | `search-field` | `data-size` | | `motion-timing` | ## Usage Import Search Field and compose its parts. ```tsx title="search-field.tsx" import { SearchField } from "@/components/ui/search-field"; export function SearchFieldDemo() { return ( ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/search-field ``` It adds 22 registry items: 19 files, 3056 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `@tanstack/react-hotkeys`, `clsx`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Input Group](https://gelatinui.com/components/input-group.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Spinner](https://gelatinui.com/components/spinner.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Animated Close Icon](https://gelatinui.com/components/animated-close-icon.md) - [Input Group](https://gelatinui.com/components/input-group.md) - [Kbd](https://gelatinui.com/components/kbd.md) - [Spinner](https://gelatinui.com/components/spinner.md) - [Command](https://gelatinui.com/components/command.md): Pick Command for a search field over a list of commands, such as a command palette. - [Autocomplete](https://gelatinui.com/components/autocomplete.md): Pick Autocomplete when the field must suggest values in a popup while people type. ## Keyboard | Keys | Action | | --- | --- | | Escape | Clears the text. | | Enter | Runs `onSearch` at once. | | /, Mod K | Moves the focus to the field, when you set `shortcut`. | ## Accessibility It is a real input with the search role. The clear button has a name, and it comes from `labels`. ## Motion | Part | Motion | | --- | --- | | Clear | fade · 150ms · the clear button shows when there is text | --- # Tags Input > Type a word and press Enter or a comma, or paste a list, and each word becomes a tag you can remove. It can also suggest tags. Page: https://gelatinui.com/components/tags-input ## When to use it Best for: Type free text that turns into removable tags, with optional suggestions. - Use it when people may add any text as a value, with or without suggestions. - Use `validate`, `max`, and `isDuplicate` to refuse a tag, and show why with `TagsInputMessage`. - Use `name` to send one form entry per tag. ## When not to use it - When each value must come from a fixed list, use a [Combobox](https://gelatinui.com/components/combobox.md). - For tags that people only read, remove, or pick, use a [Tag Group](https://gelatinui.com/components/tag-group.md). ## Notes for agents - The value is `string[]`. Enter, a comma, a paste, or leaving the field adds a tag. - Change that behavior with `delimiters`, `addOnPaste`, `addOnBlur`, and `trim`. - Give `TagsInputTagList` an `aria-label`, such as "Topics". It is a toolbar. - `TagsInputTagList` renders a `TagsInputTag` for each value by default. - Keyboard users cannot Tab to `TagsInputTagRemove` or `TagsInputClear`. Each is pointer only. - The suggestions popup opens only with `items`. It stays closed at `max` and when read-only. - `TagsInputMessage` is not a Field error. The field stays valid while the message shows. - In a `Field`, a `FieldDescription` wins over the key hint of the input. Put the hint in the description text. ## Anatomy ```text TagsInput ├─ TagsInputControl (0..n) ├─ TagsInputTagList (0..n) ├─ TagsInputTag (0..n) ├─ TagsInputTagRemove (0..n) ├─ TagsInputInput (0..n) ├─ TagsInputClear (0..n) ├─ TagsInputContent (0..n) ├─ TagsInputList (0..n) ├─ TagsInputItem (0..n) ├─ TagsInputStatus (0..n) └─ TagsInputMessage (0..n) ``` ## API reference ### TagsInput | Prop | Type | Default | Description | | --- | --- | --- | --- | | `value` | `readonly string[]` | | The tags. Use with `onValueChange` for a controlled Tags Input. | | `defaultValue` | `readonly string[]` | | The tags of an uncontrolled Tags Input. | | `onValueChange` | `function` | | Called with the new tags after an add, a remove, or Clear, and the Base UI change details (the Combobox details of a pick, a chip remove, or Clear; reason `"none"` for a typed add). | | `inputValue` | `string` | | The typed text. Use with `onInputValueChange` for a controlled input. | | `defaultInputValue` | `string` | "" | The typed text of an uncontrolled input. | | `onInputValueChange` | `function` | | Called when the typed text changes. | | `items` | `readonly string[]` | | Suggestions. With `items` the input is a combobox and a list opens below the frame; without them it is a plain text field. Tags already added leave the list. | | `delimiters` | `readonly string[]` | DEFAULT_TAGS_INPUT_DELIMITERS | Characters that add the typed text, as Enter does (default: comma). Enter always adds. | | `addOnPaste` | `boolean` | true | Split a paste on the delimiters and on line breaks, and add each part (default: true). | | `addOnBlur` | `boolean` | true | Add the typed text when focus leaves the field (Tab, a click outside; default: true). | | `trim` | `boolean` | true | Remove the spaces around each tag (default: true). | | `isDuplicate` | `function` | isSameTag | When two texts are the same tag (default: the same text with case ignored). | | `max` | `number` | | The most tags. At the max the input stays, so Backspace still reaches the tags. | | `validate` | `function` | | A check of each new tag: return the message to show, or `null` to accept it. | | `labels` | `Partial` | | Every string the Tags Input says, to translate. Pass a stable object (module level or `useMemo`): a new object on each render rebuilds the context and re-renders every tag. | | `onRefuse` | `function` | | Called for each text that did not become a tag, with the reason and the message shown. | | `children` | `ReactNode` | | | Also takes every prop of Base UI `Combobox.Root`: https://base-ui.com/react/components/combobox ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | TagsInput | `tags-input` | | | | | TagsInputControl | `tags-input-control` | `aria-invalid`, `data-chip`, `data-input-group-control`, `data-popup-open`, `data-stage-focused`, `data-surface` | | | | TagsInputTagList | `tags-input-tag-list` | | | | | TagsInputTag | `tags-input-tag` | `data-duplicate` | | `motion-timing`, `status-colors` | | TagsInputTagRemove | `tags-input-tag-remove` | `data-duplicate` | | `status-colors` | | TagsInputInput | `tags-input-input` | | | | | TagsInputClear | `tags-input-clear` | `data-disabled` | | | | TagsInputContent | `tags-input-content` | | | | | TagsInputList | `tags-input-list` | | | | | TagsInputItem | `tags-input-item` | | | | | TagsInputStatus | `tags-input-status` | | | | | TagsInputMessage | `tags-input-message` | | | `motion-timing` | ## Usage The value is a `string[]`. Enter, a comma, a paste, or leaving the field adds a tag. Add `items` for suggestions. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/tags-input @gelatin-ui/field ``` ```tsx title="topics-field.tsx" import { Field, FieldLabel } from "@/components/ui/field"; import { TagsInput, TagsInputClear, TagsInputControl, TagsInputInput, TagsInputMessage, TagsInputTagList, } from "@/components/ui/tags-input"; export function TopicsField() { return ( Topics ); } ``` ## Compose Rules: - Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts. - Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry. ## Add it ```bash npx shadcn@latest add @gelatin-ui/tags-input ``` It adds 45 registry items: 42 files, 8236 lines, and the npm packages `@base-ui/react`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`. ## Built on - [Combobox](https://gelatinui.com/components/combobox.md) ## For AI agents - Every item, one file: https://gelatinui.com/llms.txt - MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp ## Related - [Combobox](https://gelatinui.com/components/combobox.md) - [Tag Group](https://gelatinui.com/components/tag-group.md): Pick Tag Group to show a set of tags that people read, remove, or pick as filters, with no typing. - [Input](https://gelatinui.com/components/input.md) ## Keyboard | Keys | Action | | --- | --- | | Enter | Adds the typed text as a tag, or picks the highlighted row. In an empty input, submits the form. | | Comma | Adds the typed text as a tag. Set other keys with `delimiters`. | | Tab | Leaves the field and adds the typed text as a tag, while `addOnBlur` is on. | | Backspace | In an empty input, moves focus to the last tag. | | Left Arrow | At the start of the text, moves focus to the last tag. Right to left uses Right Arrow. | | Left Arrow, Right Arrow | Moves focus between the tags. | | Backspace, Delete | On a tag, removes it. A held key removes one tag. | | Escape | With the list closed, clears the typed text. | ## Accessibility With no `items`, the input is a plain text field. With `items`, it is a combobox with a list. `TagsInputTagList` is a toolbar, so give it an `aria-label`, such as "Topics". The arrow keys move between tags. Backspace or Delete removes the focused tag. The remove and clear buttons are for the pointer and stay out of the tab order. ## Motion | Part | Motion | | --- | --- | | New tag | fade · 150ms · ease-out (0, 0, 0.2, 1) · the tag fades in | --- # Textarea > A field for text on many lines, such as a message. It grows with the text from 64px to 240px, then scrolls. Page: https://gelatinui.com/components/textarea ## When to use it Best for: A multi-line text field that grows with its text and works inside a Field. - Use it for text of more than one line, such as a comment or a note. - Put it in a `Field` to add a label, help text, and validation. - Use `InputGroupTextarea` when the box needs a toolbar or a header row. ## When not to use it - For one line of text, use an [Input](https://gelatinui.com/components/input.md). - For free text that turns into tags, use a [Tags Input](https://gelatinui.com/components/tags-input.md). ## Notes for agents - `ref`, `id`, `name`, `disabled`, `value`, `defaultValue`, and `onValueChange` go to Base UI `Field.Control`, so a `Field` labels it. - The box grows from 64px to 240px with `field-sizing: content`, then it scrolls. - A browser with no `field-sizing` (Firefox) keeps a 64px box with a vertical handle. - `size` sets only the padding (`sm`, `default`, `lg`). The height follows the text. ## Anatomy ```text Textarea ``` ## API reference ### Textarea | Prop | Type | Default | Description | | --- | --- | --- | --- | | `surface` | `"default" \| "group"` | | | | `className` | `string` | | | | `size` | `ControlSizeAtLeastSm` | | The padding of the box: `sm`, `default`, or `lg` (the height follows the text). | Also takes every prop of Base UI `Field.Control`: https://base-ui.com/react/components/field ## Styling | Part | Slot | States | CSS variables | Tokens | | --- | --- | --- | --- | --- | | Textarea | `textarea` | | | | ## Usage Put it in a `Field`, so the label and the error link to it. The box grows with the text and then scrolls. The sample also uses `field`, which this add does not write. One command adds them with this item: ```bash npx shadcn@latest add @gelatin-ui/textarea @gelatin-ui/field ``` ```tsx title="support-message.tsx" import { Field, FieldLabel } from "@/components/ui/field"; import { Textarea } from "@/components/ui/textarea"; export function SupportMessage() { return ( Message