Components
Every component, in one place.
141 items. Each has what it is for, when to use it, an example that works, its whole source, and a demonstration you can try.
141 components
Controls and surfaces
Buttons, fields, menus, dialogs, dates, lists, conversation parts, players and records.
- accessible-iconGives an icon that stands alone a name for screen readers, and hides the drawing itself from them.
- accordionStacked sections whose content opens and closes under its heading.
- alertA message in the page with an icon, a title, a description and an optional action. Four variants: info, success, warning, destructive.
- alert-dialogA dialog that interrupts with a question and waits for an answer: it has no close button and does not close on a click outside.
- audio-playerThe parts of a sound player around an `<audio>` element: play, a waveform that is also the time bar, time, speed and mute.
- avatarA round picture of a person or a team, with initials shown until the image loads or when it fails, and a group that overlaps.
- badgeA small label for a status, a count or a category. Six variants and an optional leading dot.
- bottom-sheetA panel that rises from the bottom edge, rests at one of several heights (snap points), and can be dragged between them or down to dismiss, with a keyboard handle that does the same.
- breadcrumbThe path from the top of the site to the current page, as links with separators.
- buttonA button, or a link that looks like one. Five variants, three sizes, a loading state.
- calendarA month grid for choosing a day, several days or a range of days, with days that can be unavailable for a stated reason and days that carry a mark. Days are plain "YYYY-MM-DD" strings, so no time zone can move them.
- captionsCaptions drawn by the page instead of the browser, on a solid ground that reads on any picture, and a transcript: every line of a clip as a list that can be pressed to go there.
- cardA flat surface with a hairline edge, and parts for a header, title, description, content and footer.
- carouselA row of slides that is scrolled sideways one at a time (or a few at a time), with previous and next buttons, dots or a count, keys, and an optional autoplay that always has a pause button.
- certainty-legendA small key of three or four named classes (how sure something is, or any other kind), each with its own pattern as well as its own colour, where each class can be switched off and on.
- checkboxA checkbox with checked, unchecked and indeterminate states.
- chipA small pill for one short value: a filter that is on and can be removed, a suggestion to press, or one of a set of choices that can be switched on and off.
- collapsibleOne section that a button opens and closes in place.
- comboboxA select with a search field: a button that shows the choice and opens a list that narrows as one types.
- commandA command palette: a search field over a filtered, keyboard-driven list of actions, inline or in a dialog.
- compare-sliderTwo layers of the same size, one over the other, with a divider that is dragged or moved with the keyboard to show more of one and less of the other: then and now, before and after.
- compare-tableTwo to four things side by side, attribute by attribute: a table whose first column (the attribute names) stays in view while the things scroll sideways inside it on narrow screens.
- composerThe box a person writes a message in: a field that grows with the text, a list of attachments, and a toolbar with slots for an attach button, a voice button and send (which becomes stop while a reply is on its way).
- consentAsks permission before something is switched on or shared: what is asked for, item by item, each optional one with its own switch that starts off, and two equal buttons to allow or decline. As a sheet (ConsentSheet) or in the page (ConsentPanel).
- context-menuA menu of actions that opens at the pointer on right-click, and on a long press on touch screens: items, checkbox and radio items, labels, separators, sub-menus and a shortcut slot.
- countdownThe time left until a moment, as text that counts down ("4 min 12 s"), announced to screen-reader users only at the moments the project lists.
- date-pickerA button that shows a date, or a range of dates, and opens a calendar in a popover to choose it. Values are "YYYY-MM-DD" strings.
- dialogA modal window over a dimmed page, with parts for a header, title, description and footer.
- direction-providerSets the reading direction (left to right, or right to left) for everything inside it: the `dir` attribute for layout and text, and the context Radix-based components read for arrow keys and placement.
- dockA layout of main content with a panel docked beside it that stays while the person works: the panel can be resized with a splitter, collapsed to a slim bar, and on narrow containers gives way to a bar at the bottom.
- dropdown-menuA menu of actions that opens from a button: items, checkbox and radio items, labels, separators, sub-menus and a shortcut slot.
- dropzoneA place to choose files to upload, by dropping them, pasting them or pressing a button, and the rows that show each file's progress with slots for pause, resume, retry and remove.
- empty-stateWhat a list, a table or a search shows when there is nothing in it: an icon, a title, a description and an action.
- fact-rowOne thing the system knows or remembers about a person or a record, shown with where it came from and what the person can do about it: correct it in place, say it is no longer true, or have it removed.
- fieldLays out a label, a control, a description and an error message, and connects them (htmlFor, id, aria-describedby, aria-invalid) without hand-written ids.
- galleryA set of picture tiles that open a full-screen viewer: a mosaic of one large and several small, an even grid, or a row that scrolls sideways.
- hotspotsNamed buttons placed over a picture or a video at a point, each present only between two moments of the clip, with the same choices as a plain list for people who cannot point at the picture.
- hover-cardA preview that appears beside a link while the pointer rests on it or the keyboard focuses it.
- inputA single-line text input in three sizes, with an invalid state.
- input-groupAn input with a leading or trailing icon, text or button inside one shared border.
- kbdA key cap for showing a keyboard key or a shortcut.
- labelThe text name of a control. Clicking it focuses or toggles the control it points to.
- language-switcherA menu for choosing the interface language: each language under its own name in its own script, the current one marked, no flags.
- lightboxA full-screen viewer for a set of pictures (or any media the project renders): swipe or arrow between slides, zoom and pan, a counter, captions, thumbnails, and the picture growing out of the thumbnail that opened it.
- media-row-listThe pictures or clips a person has added, as rows they can put in order, describe and choose a cover from: each row shows its state in words (an upload's, or one the project names), its progress or its error with pause, resume and retry, a field for its text alternative that can be required, a "cover" choice, a remove button, and room for a status line and controls of the project's own.
- menubarA row of menus that stays on screen, as along the top of a desktop application: File, Edit, View.
- messageOne message in a conversation, from the person, the assistant or the system, with parts for an avatar, the words, the time and sending state, a toolbar of actions, and suggested replies.
- navbarA responsive site header: a brand, a row of links and a slot for actions. Below `md` the links move into a menu button that opens them in a sheet.
- navigation-menuA row of site links where some open a panel of further links beneath them.
- number-stepperA number with a button either side to take one away or add one, that can also be typed: a spin button.
- otp-fieldA one-time code typed into one box per character: typing moves on, Backspace moves back, and a pasted code fills every box.
- paginationLinks to the previous, next and numbered pages of a long list, with the look of buttons.
- part-frameA card for one structured piece of a conversation (a plan, a result, a form) that has a life: loading, live, saving a change, replaced by a newer one, or final.
- password-fieldA password input with a button that shows or hides what was typed.
- popoverA small floating surface attached to the control that opens it.
- price-breakdownWhat a price is made of, line by line, and the total: labels at the start, amounts in aligned figures at the end.
- progressA bar that fills as a task completes, or slides back and forth when the amount done is not known.
- provenance-labelA label that stays on a picture, a video or a 3D view and says what it is (a photograph, a reconstruction, made by a model), with a popover for its sources, placed so the media's own controls can never cover it.
- radio-groupA set of radio buttons where exactly one is chosen, with arrow-key movement between them.
- scene-stripA row of the scenes or chapters of a clip, each with a picture, a name and a length, that scrolls sideways, marks the one that is playing and goes to a scene when it is pressed.
- scroll-areaA scrolling region with thin, themed scrollbars that look the same on every platform. Native scrolling underneath.
- scrubberThe time bar of a player: a slider over the length of a clip that shows what has played and what has loaded, marks chapters, and can show the time and a picture for the moment under the pointer.
- segmented-controlA row of two to five segments where exactly one is chosen, with a marker that slides to the choice.
- selectA themed dropdown for choosing one value from a list, with groups, labels and separators. Never a native select.
- separatorA hairline between two pieces of content, horizontal or vertical, with an optional label in the middle.
- sheetA modal panel that slides in from an edge of the screen, with parts for a header, title, description and footer.
- skeletonA pulsing block that stands in for content that is loading: a bare block sized by hand, lines of text, or a wrapper that takes the exact size of the real content. It is still under reduced motion.
- sliderA slider for one value, or a range with two thumbs.
- slot-pickerOffered times as a set of pills to choose one from, optionally under named groups, each able to carry a note and to be unavailable for a stated reason.
- sortable-listA list whose order the person sets, three ways: dragging a row by its handle (mouse, pen or touch), lifting it with the keyboard and moving it with the arrow keys, or pressing "Move up" and "Move down" buttons. Every move is read out.
- spinnerA turning ring that says something is in progress, announced to assistive technology by its label.
- statA number tile: a label, a value, an optional change with its direction, and a slot for a sparkline.
- status-lineOne line that says in words what is happening now ("Searching", "Writing a reply", "Done"), read out politely by screen readers, with an optional moving mark and a slot for a stop button.
- stepsA rail that shows where one is in a sequence of steps: a row of thin segments, or numbered markers with titles, each step with a state (done, filled in for you, current, not started, skipped, blocked).
- streaming-textText that grows as it arrives, with a caret while it is arriving, that is never read out word by word: it is announced once, when it is finished.
- switchAn on/off switch.
- tableA semantic table with styled parts, inside a wrapper that scrolls sideways so it never overflows a narrow screen.
- tabsPanels that share one place, switched by a row of tabs. Two looks: an underline, or a segmented pill.
- textareaA multi-line text input that grows with its content, with an invalid state.
- theme-providerHolds the theme (light or dark, roundness, highlight colour), applies it to the page, remembers the visitor's choice, and avoids a flash of the wrong theme.
- threadThe scrolling log of a conversation: it follows the newest content while the person is at the bottom, stops the moment they scroll up, and offers a way back down.
- tile-groupA grid of large tiles, each a picture or an icon with a word, where one or several are chosen.
- time-pickerA time field made of an hour and a minute that are each stepped with the arrow keys or typed, with an AM/PM part where the locale uses a 12-hour clock. The value is a 24-hour "HH:mm" string.
- timelineAn ordered list of numbered rows joined by a line: each with an optional time, a title and content, and a state (done, current, upcoming).
- toasterThe place where toasts appear: sonner's Toaster drawn with the theme's tokens, and its `toast` function.
- toggleA button that stays pressed: on or off.
- toggle-groupA joined row of toggles where one (type="single") or several (type="multiple") are on.
- toolbarA row of buttons, toggles and links that the keyboard enters once and then moves through with the arrow keys.
- tooltipA few words that appear beside a control on hover or keyboard focus.
- undo-lineA line that stays where something was just done, says what it was, and offers to undo it.
- video-playerThe parts of a video player around a `<video>` element the project renders: a frame that keeps its shape, controls that step back while it plays, play, mute, volume, time, a scrubber, captions, speed, full screen, and words for loading and failure.
- virtual-listA long list or grid that renders only the rows in view: thousands of items of any height in a box that scrolls, or down a page that scrolls with the window, each still announced with its position in the whole list, with a way to go to an item and to come back to where the person was.
- visually-hiddenKeeps its content out of sight and still read by screen readers.
- wizardThe shell of a guided task done one step at a time inside a card: a title with "Step 2 of 5", a rail of the steps, the current step, and Back, Skip and a main button named after what the step does.
Layout
Containers, sections, a bento grid, a marquee and frames.
- aspectHolds its content at a fixed width-to-height ratio, so space is reserved before an image, video or canvas loads.
- bento-gridA grid of flat cards of unequal sizes. One column on a phone, two on a tablet, then 2, 3, 4 or 6: decided by the grid's own width, so it works inside any container.
- containerCentres content at the page width with the page gutter on both sides. Four sizes: narrow, page, wide, full.
- gridA responsive grid of equal columns that fits as many as the width allows, from a minimum column width. No breakpoints.
- map-frameThe frame around a map, not a map: it holds the map's size, shows a still until the person asks for the map, keeps a text list beside it, and takes the map to full screen and back. The map engine is yours.
- marqueeA row that scrolls sideways without end. It pauses on hover and on keyboard focus, and under reduced motion it is an ordinary wrapped row.
- sectionA band of a page with consistent vertical rhythm, an optional eyebrow, title and description, and three tones: default, muted, inverse.
- splitTwo columns, usually media beside text, that stack into one on a narrow width. A ratio between the columns and a reverse option.
- stackA flex row or column with a gap from a fixed scale, and props for alignment, distribution and wrapping.
Motion
Reveals, scroll scenes, pointer effects and page transitions, from the theme's durations.
- film-stageA stage for a sequence of timed scenes with a transport: it owns the clock and the chrome (play, time bar, speed, sound), mounts the scene for the current moment, cuts or crossfades between scenes, and can draw any moment on request for export.
- layout-transitionA shared element that animates from one place to another: render Morph with the same layoutId in two places and it travels between them.
- magneticA wrapper whose child is gently pulled toward the pointer while it is hovered, and springs back when the pointer leaves.
- number-tickerA number that counts up to its value when it scrolls into view, formatted with Intl.NumberFormat.
- page-transitionWraps page content and plays a short enter (a fade and a small rise) each time the route changes.
- parallaxA clipped frame whose layer moves at a different speed from the page as it scrolls past.
- presenceAnimates its children in when they are shown and out before they are removed.
- revealFades and moves its content into place when it scrolls into view.
- scroll-progressA thin bar fixed to the top of the viewport that fills as the page, or one element, is scrolled through.
- scroll-sceneA tall section with a pinned viewport whose children are driven by scroll progress from 0 to 1, for scroll-told sequences.
- spotlightA surface on which a soft light in the highlight colour follows the pointer.
- staggerA container whose items fade and move into place one after another when it scrolls into view.
- text-revealReveals a heading word by word, or line by line, when it scrolls into view.
- tiltA wrapper that tilts its content in 3D toward the pointer on hover and springs back, with an optional glare.
- view-transitionView transitions two ways: wrappers over React's own <ViewTransition> (a shared element that morphs between two places, a boundary that cross-fades what changes inside it), and helpers for the browser's API (run an update as a transition, name an element, a link that navigates inside a transition).
3D
Scenes that take their colours from the theme and fall back to a still.
- floating-shapesA few simple solids (icosahedron, torus, box, octahedron) floating and turning slowly, flat-shaded or wireframe, coloured from theme variables.
- globeA dotted globe that turns slowly and can be dragged to spin, with optional highlighted markers by latitude and longitude.
- model-stageA turntable for any mesh or group: centres and fits it, turns it slowly, and lets the pointer orbit it within limits.
- model-viewerShows one 3D model that a person can turn, zoom and reset: a glTF or GLB file, or Gaussian splats (.spz, .ply, .splat, .ksplat, .sog), with a poster and progress while it loads and a still fallback where 3D cannot run.
- orbA softly morphing sphere in the highlight colour, lit at its rim so it reads on light and dark grounds, leaning gently toward the pointer.
- particle-fieldA field of small round points drifting slowly, with depth that shifts as the pointer moves.
- sceneThe wrapper every 3D component is used inside: a transparent WebGL canvas that mounts late, pauses off screen and falls back to a static block.
Charts
SVG charts and sparklines in the theme's series colours, each with a text alternative.
- area-chartA line chart with the space under each line filled flat at low opacity, optionally stacked so the series add up to a total.
- bar-chartA bar chart, vertical or horizontal, grouped or stacked, always measured from zero, with a tooltip on hover and arrow-key reading.
- chartThe shared parts every chart is built from: a container that measures itself and carries the text alternative, an SVG root, a tooltip, a legend, series styles, and axis and format helpers.
- donut-chartA ring showing how one whole splits into at most five parts, with a label in the centre and each part's value and share in the legend.
- heatmapA matrix of cells (day by hour, for example) coloured on one-hue scale from faint to the highlight colour, with a tooltip, arrow-key reading and a scale legend.
- line-chartA line chart of one or more series over a numeric or time x, with a crosshair tooltip, arrow-key reading and labels at the line ends.
- radial-progressA ring gauge for one value against a limit, with the value and a label in the centre.
- sparklineA tiny line, area or bar chart with no axes, for a stat tile or a table cell, described in words for assistive technology.
Helpers
Class names, motion tokens, reading direction, announcements and controllable state.
- announceSays a message to screen-reader users through one shared live region, politely or at once, without moving focus.
- cnJoins class names and resolves Tailwind conflicts, so a class passed in wins over a component's own.
- directionTells whether an element reads right to left, and turns "start" and "end" arrow keys and offsets the right way round for it.
- motionThe motion tokens as numbers for the motion package (easing, durations, a pointer spring), the useMotionSafe gate, and the entrance engine the reveal components share.
- theme-colorResolves a theme CSS variable such as "--highlight" to an rgb() string that three.js and canvas code can parse, and re-reads it when the theme changes.
- use-controllable-stateState that a parent may control: it follows `value` when one is given and keeps its own from `defaultValue` when not, calling `onChange` either way.
- use-mediaFollows an audio or video element (playing, time, duration, buffered, volume, rate, text tracks, waiting, error) as React state, with the actions to drive it, the context player parts share, and time formatting through Intl.
- use-sizeMeasures an element with ResizeObserver and returns its content width and height in whole pixels.