Components
Every component owns its roles, keyboard handling and focus. Style it with the Clarity theme, with your own CSS on its data-* attributes, or not at all. Each page has a live preview, the parts and props, the keyboard map and the ARIA pattern it follows.
Containers, dividers and text, with the HTML semantics already right.
- AspectRatioKeeps media at a fixed ratio while it scales.
- CardGroups related content and actions in one surface.
- SeparatorA horizontal or vertical divider between sections.
- ScrollAreaA scrollable container with custom scrollbars.
- SplitterResizable panels you drag or resize with the keyboard.
- HeadingTitles and subtitles with the right heading level.
- TextBody copy with control over the element it renders.
- StrongMarks text as important with a strong element.
- EmEmphasises text with an em element.
- QuoteAn inline quotation with its own quotation marks.
- BlockQuoteA quoted passage set apart from the text around it.
- CodeAn inline code snippet.
- KbdA keyboard key or shortcut.
- LinkAn anchor for pages and external URLs.
- LabelA native label that names a form control.
Inputs that submit with the form, validate with the browser and reset with it.
- TextFieldA single-line input with leading and trailing slots.
- TextAreaA multi-line text input.
- NumberFieldA numeric input with step buttons and a scrub area.
- OTPFieldOne-time code slots that fill left to right and accept paste.
- CheckboxA single on, off or mixed choice.
- CheckboxGroupSeveral checkboxes that share one value.
- CheckboxCardsMulti-select where each option is a card.
- RadioA single radio button for custom layouts.
- RadioGroupPick one option from a set.
- RadioCardsSingle-select where each option is a card.
- SwitchAn on/off toggle that submits like a checkbox.
- SliderPick a number or a range by dragging.
- SelectChoose one value from a dropdown list.
- ComboboxA dropdown you can type into to filter the options.
- AutocompleteA text input with suggestions; the value is what you type.
- FieldWires a label, help text and an error to any control.
- FieldsetGroups related controls under one legend.
- FormValidates its fields before submitting and focuses the first error.
Pressable things, alone or in groups with one tab stop.
Dialogs, popups and menus with focus, dismissal and positioning handled.
- DialogA modal window that traps focus until it closes.
- AlertDialogA dialog that asks the user to confirm or cancel.
- DrawerA panel that slides in from an edge, with drag to close.
- PopoverA floating surface anchored to a trigger.
- HoverCardA preview card on hover or focus.
- TooltipA short hint on hover or focus.
- DropdownMenuA menu opened from a button, with submenus.
- ContextMenuA menu opened with a right click or long press.
- MenubarAn application-style bar of menus.
- CommandPreviewA command palette for searchable actions.
Moving between views and revealing more without leaving the page.
- BreadcrumbShows where the current page sits in the hierarchy.
- TabsSwitch between views in place.
- TabNavTabs that are links, one URL per tab.
- NavigationMenuSite navigation with dropdown panels.
- StepsProgress through a multi-step flow.
- AccordionStacked sections that expand one or many at a time.
- CollapsibleShow or hide one block of content.
- DisclosureSeveral show/hide items, composed or from an array.
- TreeNested items like folders and files.
- MinimapA scaled overview that jumps between sections.
Telling the user what is happening, visibly and to assistive tech.
- BadgeA small label for status or a count.
- CalloutA message that needs attention.
- ProgressHow far a task has got.
- MeterA bounded measurement such as usage or a score.
- SpinnerSomething is loading.
- SkeletonA placeholder in the shape of the content to come.
- ToastStacked notifications with swipe to dismiss.
- LiveRegionAnnounces updates to screen readers.
People, records and structured values.
Providers and building blocks for your own components.