# fndn/ui

A spec-first component system, in the spirit of shadcn, for React, Vue and Svelte. Each component is one JSON spec (the contract: parts, props, states, tokens, accessibility, motion), a Tailwind recipe written with tailwind-variants, and thin adapters for React, Vue and Svelte that render the same markup, with Ark UI (Zag.js) for behaviour and Phosphor for icons. Components are copied into your project as files you own, by the system's own tool: a command line that is also an MCP server, with a check that holds your code to the rules the components follow.

First time? [Installation](/installation.md) sets the project up once. Then add a component:

```bash
npx fndn add button
```

## Components

The basic building blocks: one control or one piece of display each.

- [Button](/components/button.md): Triggers an action, from the main call to action to a small icon button.
- [Toggle](/components/toggle.md): A button that stays pressed, such as Bold in a text toolbar.
- [Button Group](/components/button-group.md): Buttons joined into one control, such as a split button or a toolbar segment.
- [Clipboard](/components/clipboard.md): Copies a value such as an API key, a link or a command.
- [Toggle Group](/components/toggle-group.md): A row of toggle buttons where one or several stay pressed.
- [Input](/components/input.md): A one-line text field.
- [Select](/components/select.md): Pick one value from a list that opens from a field.
- [Switch](/components/switch.md): Turns a setting on or off, taking effect at once.
- [Segmented Control](/components/segmented-control.md): Pick one of a few options that sit side by side.
- [Checkbox](/components/checkbox.md): Turns one option on or off, independently of the others.
- [Radio Group](/components/radio-group.md): Pick exactly one of a short list of options, all visible at once.
- [Combobox](/components/combobox.md): A select you can type into to filter its options.
- [Slider](/components/slider.md): Pick a number, or a range, by dragging along a track.
- [Label](/components/label.md): The name of a form control, shown above or beside it.
- [Listbox](/components/listbox.md): A list of options in the page to pick one or several, without a popup.
- [Number Input](/components/number-input.md): A number field with buttons to step the value down and up.
- [Calendar](/components/calendar.md): A month grid to pick a date, several dates or a range.
- [Field](/components/field.md): A label, a control and its help or error text, wired together.
- [Pin Input](/components/pin-input.md): A one-time code or PIN typed one character per box.
- [Tags Input](/components/tags-input.md): A field that collects several values as tags, such as emails or keywords.
- [Date Picker](/components/date-picker.md): A date field that opens a calendar, for one date, several dates or a range.
- [Editable](/components/editable.md): Text that turns into a field when you edit it.
- [Rating](/components/rating.md): A score out of a few stars, which can be set or only shown.
- [Textarea](/components/textarea.md): A multiline text field that grows with its text.
- [Input Group](/components/input-group.md): A text field with addons at its start or end: text, an icon or a button.
- [Password Input](/components/password-input.md): A password field with a button that shows or hides what was typed.
- [File Upload](/components/file-upload.md): Pick files by dropping them on a zone or choosing them from the system dialog.
- [Menu](/components/menu.md): A list of actions that opens from a button.
- [Tooltip](/components/tooltip.md): A short label that names a control on hover or focus.
- [Popover](/components/popover.md): A small panel anchored to its trigger, with a title, content and a close button.
- [Hover Card](/components/hover-card.md): A preview that opens when its trigger is hovered or focused.
- [Dialog](/components/dialog.md): A window over the page for a form, details or settings.
- [Alert Dialog](/components/alert-dialog.md): A window that asks a person to confirm a destructive or important action.
- [Drawer](/components/drawer.md): A panel that slides in from an edge of the screen and can be swiped away.
- [Context Menu](/components/context-menu.md): The menu a right-click opens on a row, a file or a canvas.
- [Search](/components/search.md): A search field and its results in one panel, to find and run a command.
- [Tabs](/components/tabs.md): Switch between views that share one place.
- [Pager](/components/pager.md): Previous, a position such as “2 of 5”, and next, for stepping through a short set.
- [Breadcrumb](/components/breadcrumb.md): A trail of links that shows where the current page sits.
- [Page Header](/components/page-header.md): The strip at the top of a screen's content: a title, a description, a back link and the actions.
- [Navigation Menu](/components/navigation-menu.md): A site's top navigation, with links and panels of links.
- [Tree View](/components/tree-view.md): A hierarchy of rows that open and close, such as files and folders.
- [Steps](/components/steps.md): A multi-step flow shown as numbered markers: done, current and to do.
- [Link](/components/link.md): A link in running text or on its own.
- [Card](/components/card.md): A surface that groups the content of one thing, with an optional header and footer.
- [Chip](/components/chip.md): A monospace chip for a code value in text or a table.
- [Status Pill](/components/status-pill.md): A tinted pill with a dot for a status, such as Active or Failed.
- [Tag](/components/tag.md): A small label attached to something: a category, an environment, a file.
- [Value Pill](/components/value-pill.md): A plain value, such as a date or an amount, set off in text.
- [Entity Chip](/components/entity-chip.md): A person, team or company named inline, with its monogram.
- [Text Row](/components/text-row.md): A label and its value on one row, as in a summary or an invoice.
- [Progress Ring](/components/progress-ring.md): A small ring that shows a task's progress, with a count or a mark in its centre.
- [Code Block](/components/code-block.md): Code to read and copy: a listing with line numbers, a diff or a command.
- [Code View](/components/code-view.md): Code on its own, with line numbers: a listing, a diff, or an editor.
- [Collapsible](/components/collapsible.md): A button that shows or hides a region under it.
- [Count](/components/count.md): A small number badge next to a label, a tab or a heading.
- [Kbd](/components/kbd.md): Shows a keyboard key or shortcut, such as ⌘ K.
- [Avatar](/components/avatar.md): A picture or initials that stand for a person, a team or a source.
- [Separator](/components/separator.md): A thin line that divides content, with an optional label.
- [Accordion](/components/accordion.md): A stack of sections that open and close, one at a time or several.
- [Scroll Area](/components/scroll-area.md): A scrolling region with a thin scrollbar that shows only while it is used.
- [Aspect Ratio](/components/aspect-ratio.md): A box that keeps its width-to-height ratio for images, video and embeds.
- [Splitter](/components/splitter.md): Panels side by side with a handle between them that resizes them.
- [Carousel](/components/carousel.md): A row of slides that scrolls sideways one page at a time.
- [Spinner](/components/spinner.md): A small spinning ring for work of unknown length.
- [Shimmer](/components/shimmer.md): A label with a moving sheen that says work is under way.
- [Empty State](/components/empty-state.md): What a list, a table or a popup shows when there is nothing in it.
- [Alert](/components/alert.md): A message in the page: a note, a success, a warning or an error.
- [Progress](/components/progress.md): A bar that shows how far a task has gone.
- [Toast](/components/toast.md): A brief message that appears in a corner and leaves by itself.
- [Message](/components/message.md): One message of a conversation with an assistant.
- [Table](/components/table.md): Rows and columns of data, such as invoices, members or deploys.

## Blocks

Built from several components for a product use: agent surfaces, tables, composers.

- [Command Palette](/components/command-palette.md): Every page and action of an app in one searchable list, opened with ⌘K.
- [Sidebar Nav](/components/sidebar-nav.md): An app's side navigation, which collapses to a rail of icons.
- [Loading State](/components/loading-state.md): A compact loader with an elapsed timer for long-running agent work.
- [Prompt Bar](/components/prompt-bar.md): The composer of an agent: a growing text field with attachments, a model picker and send.
- [Chat Composer](/components/chat-composer.md): A chat panel with conversation tabs, a thread of messages and a composer.
- [Thinking](/components/thinking-state.md): What an agent is doing while it works, with the steps behind it.
- [Selection Actions](/components/selection-actions.md): A toolbar of AI actions that appears under the text a person selects.
- [Streaming Text](/components/streaming-text.md): An agent's answer as it streams in, with sources and follow-up questions.
- [Approval Card](/components/approval-card.md): Questions and actions an agent asks a person to approve before it goes on.
- [Tool Chips](/components/tool-chips.md): An agent run shown as compact rows of tool calls and the files they changed.
- [Task Rows](/components/task-rows.md): The live status of an agent's tasks, each row opening to its steps.
- [Recommendation Card](/components/recommendation-card.md): A suggestion from an agent with its confidence, the action to take and the alternatives.
- [Context Cards](/components/context-cards.md): The passages an agent retrieved to answer a question, each with its source.
- [Flowchart](/components/flowchart.md): An agent workflow drawn as a trigger and its conditions on a canvas.
- [Fine-tune Card](/components/fine-tune-card.md): A small inspector for the last adjustments to something an agent made.
- [Agent Screen](/components/agent-screen.md): A live view of the screen an agent is working on, with its cursor.
- [Diff Table](/components/diff-table.md): Changes an agent proposes to a table, accepted or rejected row by row.
- [Filter Table](/components/filter-table.md): A table with filter chips above it that narrow its rows in place.
- [Records Table](/components/records-table.md): A spreadsheet-style table of records with sorting, selection and column menus.
- [Insight Cards](/components/insight-cards.md): Insights from an agent, one at a time, each with a small chart.
