# Introduction

An obsessively pixel-perfect component library, built on Base UI and Tailwind CSS.

Jarvis UI is a set of React components and hooks. [Base UI](https://base-ui.com) provides their
behavior and accessibility. Tailwind CSS v4 and a single set of [theme tokens](https://ui.jarv.is/docs/theming.md)
provide their styling.

It isn't a package you install from npm. The [`shadcn` CLI](https://ui.shadcn.com/docs/cli) copies
each component's source into your project, and from there you can change it however you like.
Everything supports dark mode.

## Next steps

- [Installation](https://ui.jarv.is/docs/installation.md)
- [Philosophy](https://ui.jarv.is/docs/philosophy.md)
- [Theming](https://ui.jarv.is/docs/theming.md)
- [Chat](https://ui.jarv.is/docs/chat.md)
- [Agents](https://ui.jarv.is/docs/agents.md)
- The [gallery](https://ui.jarv.is/components.md), with every component on one page
- The [hooks](https://ui.jarv.is/hooks.md) behind the components

## Components

### Controls

Buttons, fields, pickers and the other controls users press, pick or type into.

- [Autocomplete](https://ui.jarv.is/components/autocomplete.md): A text field that suggests values as users type, and takes any text.
- [Button](https://ui.jarv.is/components/button.md): A button, or a component that looks like one, alone or joined in a group.
- [Calendar](https://ui.jarv.is/components/calendar.md): A month grid for picking a date, several dates or a range of them.
- [Checkbox](https://ui.jarv.is/components/checkbox.md): A control that toggles between checked, unchecked and indeterminate, alone or in a group.
- [Combobox](https://ui.jarv.is/components/combobox.md): An input with a filterable list of suggestions, including multi-select chips.
- [Copy Button](https://ui.jarv.is/components/copy-button.md): An icon button that copies a value and shows whether it worked.
- [Date Input](https://ui.jarv.is/components/date-input.md): A date field typed one part at a time, like a native date input.
- [Date Picker](https://ui.jarv.is/components/date-picker.md): A field that opens a calendar to pick a date or a range of dates, or to type one.
- [Field](https://ui.jarv.is/components/field.md): Labels, descriptions and errors for form controls, and the form that submits them.
- [File Input](https://ui.jarv.is/components/file-input.md): A drop zone or button for choosing files, and a list of the files chosen.
- [Inline Edit](https://ui.jarv.is/components/inline-edit.md): Text that turns into a field when clicked, for changing a value where it's shown.
- [Input](https://ui.jarv.is/components/input.md): A text field.
- [Input Group](https://ui.jarv.is/components/input-group.md): An input with icons, text or buttons attached.
- [Number Input](https://ui.jarv.is/components/number-input.md): A number input with stepper buttons, formatting and a draggable label.
- [OTP Input](https://ui.jarv.is/components/otp-input.md): A one-time code with a box for each character.
- [Password Input](https://ui.jarv.is/components/password-input.md): A password input with a button that shows and hides what's typed.
- [Radio](https://ui.jarv.is/components/radio.md): A set of options where only one can be selected.
- [Segmented Control](https://ui.jarv.is/components/segmented-control.md): A row of mutually exclusive options with a sliding indicator, for switching views.
- [Select](https://ui.jarv.is/components/select.md): A button that opens a list of values to pick from.
- [Slider](https://ui.jarv.is/components/slider.md): A track with a thumb to drag, for picking a value or a range.
- [Switch](https://ui.jarv.is/components/switch.md): A control that toggles between on and off.
- [Tag Input](https://ui.jarv.is/components/tag-input.md): A text field that turns what's typed into a list of removable tags.
- [Textarea](https://ui.jarv.is/components/textarea.md): A multi-line text field that grows with its content.
- [Time Input](https://ui.jarv.is/components/time-input.md): A time field typed one part at a time, like a native time input.
- [Time Picker](https://ui.jarv.is/components/time-picker.md): A time field users type into, with a list of times to pick from.
- [Toggle](https://ui.jarv.is/components/toggle.md): A two-state button, alone or in a group that makes up one setting.
- [Toolbar](https://ui.jarv.is/components/toolbar.md): A bar of buttons, toggles and menus that the arrow keys move between.
- [Value Field](https://ui.jarv.is/components/value-field.md): A read-only monospace value with a copy button, which can be masked like an API key.

### Display

Cards, badges, avatars, images and other ways to present content.

- [Avatar](https://ui.jarv.is/components/avatar.md): A picture of a person, with their initials as a fallback.
- [Badge](https://ui.jarv.is/components/badge.md): A small label for status, counts or categories.
- [Card](https://ui.jarv.is/components/card.md): A raised surface with a header, content and footer.
- [Carousel](https://ui.jarv.is/components/carousel.md): A row of slides that snaps into place, with arrows, dots and autoplay.
- [Frame](https://ui.jarv.is/components/frame.md): A tinted shell with an optional header around a raised body.
- [Image](https://ui.jarv.is/components/image.md): An image with a placeholder while it loads and a fallback when it fails.
- [Marquee](https://ui.jarv.is/components/marquee.md): A row of content that scrolls past on a loop.
- [Status](https://ui.jarv.is/components/status.md): A colored dot, followed by a label or on its own.

### Feedback

Alerts, banners, toasts, notices, progress, steps, and loading and empty states.

- [Alert](https://ui.jarv.is/components/alert.md): A callout for important information, with optional status colors.
- [Banner](https://ui.jarv.is/components/banner.md): A slim bar across the top of a page for announcements and site-wide notices.
- [Consent](https://ui.jarv.is/components/consent.md): A cookie consent notice, as a card or a bar.
- [Empty](https://ui.jarv.is/components/empty.md): A placeholder for screens and lists with nothing to show.
- [Progress](https://ui.jarv.is/components/progress.md): A bar showing how far a task has progressed.
- [Skeleton](https://ui.jarv.is/components/skeleton.md): A shimmering placeholder shown while content loads.
- [Spinner](https://ui.jarv.is/components/spinner.md): An indicator that something is loading.
- [Stepper](https://ui.jarv.is/components/stepper.md): A numbered list of steps, stacked or in a row.
- [Toast](https://ui.jarv.is/components/toast.md): Brief, temporary notifications.

### Overlays

Dialogs, menus, popovers and tooltips that open above the page.

- [Alert Dialog](https://ui.jarv.is/components/alert-dialog.md): A modal dialog that asks users to confirm an action.
- [Command](https://ui.jarv.is/components/command.md): A searchable menu of commands, with keyboard shortcuts.
- [Context Menu](https://ui.jarv.is/components/context-menu.md): A menu that opens on right click or long press.
- [Dialog](https://ui.jarv.is/components/dialog.md): A window overlaid on the page.
- [Drawer](https://ui.jarv.is/components/drawer.md): A panel that slides in from an edge and can be swiped away.
- [Dropdown Menu](https://ui.jarv.is/components/dropdown-menu.md): A menu of actions or options opened from a button.
- [Menubar](https://ui.jarv.is/components/menubar.md): A row of menus, like a desktop app's menu bar.
- [Popover](https://ui.jarv.is/components/popover.md): Rich content in a floating panel anchored to a trigger.
- [Preview Card](https://ui.jarv.is/components/preview-card.md): A card that previews a link when a user hovers over or focuses it.
- [Sheet](https://ui.jarv.is/components/sheet.md): A floating panel that slides in from an edge of the screen.
- [Tooltip](https://ui.jarv.is/components/tooltip.md): A short label that appears on hover or focus.

### Layout

Headers, dividers, collapsible regions and bars that respond to scrolling.

- [Accordion](https://ui.jarv.is/components/accordion.md): Vertically stacked headings that each reveal a section of content.
- [Aspect Ratio](https://ui.jarv.is/components/aspect-ratio.md): A box that keeps its content at a fixed width-to-height ratio.
- [Clamp](https://ui.jarv.is/components/clamp.md): Long content clamped to a few lines, with a button to show the rest.
- [Collapsible](https://ui.jarv.is/components/collapsible.md): A panel that expands and collapses.
- [Direction Provider](https://ui.jarv.is/components/direction-provider.md): Sets the reading direction the components follow, from the page's dir attribute or a direction you pass.
- [Grid](https://ui.jarv.is/components/grid.md): Cells laid out on a grid with visible guide lines between them.
- [Page Header](https://ui.jarv.is/components/page-header.md): A page or section title with a description and actions.
- [Resizable](https://ui.jarv.is/components/resizable.md): Panels that share a space, with handles between them to resize them.
- [Retracting Bar](https://ui.jarv.is/components/retracting-bar.md): A bar that slides out of the way as users scroll down, and comes back when they scroll up.
- [Scroll Area](https://ui.jarv.is/components/scroll-area.md): Native scrolling with a thin overlay scrollbar and edge fades.
- [Scroll Header](https://ui.jarv.is/components/scroll-header.md): A header that stays at the top as the page scrolls, and gains an edge once content passes under it.
- [Separator](https://ui.jarv.is/components/separator.md): A line that separates content.

### Navigation

Breadcrumbs, tabs, pagination and site menus for moving around an app.

- [Breadcrumb](https://ui.jarv.is/components/breadcrumb.md): A row of links that shows the path to the current page.
- [Navigation Menu](https://ui.jarv.is/components/navigation-menu.md): Site navigation links, with panels that open from the bar.
- [Outline](https://ui.jarv.is/components/outline.md): Links to the sections of a page, marking the one in view.
- [Pagination](https://ui.jarv.is/components/pagination.md): Navigation between pages of results.
- [Section Nav](https://ui.jarv.is/components/section-nav.md): A grouped list of links that turns into a scrolling row on small screens.
- [Tabs](https://ui.jarv.is/components/tabs.md): Sections of content shown one at a time.

### Text

Code, keyboard keys, links, times and other formatted text.

- [Code Block](https://ui.jarv.is/components/code-block.md): Multi-line code with a copy button, line numbers, added or removed lines and syntax highlighting from any highlighter.
- [Kbd](https://ui.jarv.is/components/kbd.md): A keyboard key or shortcut, in text or a hint.
- [Link](https://ui.jarv.is/components/link.md): A styled anchor that opens external links in a new tab, with an arrow to say so.
- [Package Command](https://ui.jarv.is/components/package-command.md): A command with a tab for each package manager, and a copy button.
- [Prose](https://ui.jarv.is/components/prose.md): Styles the headings, text, lists, code and tables inside it, such as rendered Markdown.
- [Relative Time](https://ui.jarv.is/components/relative-time.md): The time since or until a moment, kept current, with the exact time in a tooltip.
- [Truncate](https://ui.jarv.is/components/truncate.md): A line of text cut short with an ellipsis at the end or in the middle when it doesn't fit, with the full text in a tooltip.

### Data

Tables, lists and trees, and the controls that filter, page through and reorder them.

- [Description List](https://ui.jarv.is/components/description-list.md): Labeled values, such as the details of a record.
- [Filter Bar](https://ui.jarv.is/components/filter-bar.md): A bar of filters that users add, change and remove, each shown as a chip with its field and value.
- [Item](https://ui.jarv.is/components/item.md): A row in a list, with optional media and actions.
- [JSON Viewer](https://ui.jarv.is/components/json-viewer.md): A folding tree of JSON, with search and copyable values and paths.
- [Paged List](https://ui.jarv.is/components/paged-list.md): A button that adds the next page to a list, in place, without the page jumping.
- [Reorderable List](https://ui.jarv.is/components/reorderable-list.md): A list that users reorder by dragging or with the keyboard.
- [Table](https://ui.jarv.is/components/table.md): A table for rows of data.
- [Tree](https://ui.jarv.is/components/tree.md): A hierarchy of items that open and close, such as files and folders.

### Charts

Charts, gauges, meters and metrics for presenting numbers.

- [Area Chart](https://ui.jarv.is/components/area-chart.md): Lines over shaded areas, for totals that change over time.
- [Bar Chart](https://ui.jarv.is/components/bar-chart.md): Bars side by side or stacked, for comparing amounts across categories.
- [Gauge](https://ui.jarv.is/components/gauge.md): A dial for a value within a known range.
- [Heatmap](https://ui.jarv.is/components/heatmap.md): A heatmap of daily activity over the past year, one square per day.
- [Line Chart](https://ui.jarv.is/components/line-chart.md): Lines through points, for trends and rates over time.
- [Meter](https://ui.jarv.is/components/meter.md): A bar showing a value within a known range, such as storage used.
- [Metric](https://ui.jarv.is/components/metric.md): A small label over a large figure.
- [Pie Chart](https://ui.jarv.is/components/pie-chart.md): Sectors of a circle, for the parts of a whole.
- [Uptime](https://ui.jarv.is/components/uptime.md): A strip of daily bars showing a service's status, day by day.

### AI

Messages, prompts, Markdown replies and the steps an agent takes, for chat interfaces.

- [Citation](https://ui.jarv.is/components/citation.md): A numbered marker in a reply that links to a source and previews it on hover.
- [Conversation](https://ui.jarv.is/components/conversation.md): A scrolling thread of messages that follows a reply as it streams in.
- [Markdown](https://ui.jarv.is/components/markdown.md): A reply's Markdown, rendered safely as it streams in.
- [Message](https://ui.jarv.is/components/message.md): One message in a conversation, with an optional avatar, header and footer.
- [Prompt Input](https://ui.jarv.is/components/prompt-input.md): The field a person writes a message in, with a button that sends it or stops the reply.
- [Suggestion](https://ui.jarv.is/components/suggestion.md): Prompts a person can send with one press, in a row that scrolls or wraps.
- [Tool](https://ui.jarv.is/components/tool.md): A tool call, from its arguments to its result, as an expandable line.
- [Trace](https://ui.jarv.is/components/trace.md): The steps an agent takes, as lines that can expand to show their detail.

## Hooks

- [useAsyncOptions](https://ui.jarv.is/hooks/use-async-options.md): Loads options for typed text after a pause, and reports why one is highlighted.
- [useCopyToClipboard](https://ui.jarv.is/hooks/use-copy-to-clipboard.md): Copies text to the clipboard and tracks whether it worked.
- [useField](https://ui.jarv.is/hooks/use-field.md): Connects a custom control to the Field around it: its labels, description, error and state.
- [useShortcut](https://ui.jarv.is/hooks/use-shortcut.md): Runs a callback on a keyboard shortcut and formats the shortcut for the user's platform.
