Choosing components
A guide to selecting the right Base UI component for your use case.
View as MarkdownOverlay content (dialogs, menus, drawers)
| If you need… | Use |
|---|---|
| A popup that opens on top of the entire page | Dialog |
| A dialog that requires a user response | Alert Dialog |
| A list of actions in a dropdown with keyboard | Menu |
| A right-click or long-press action list | Context Menu |
| A panel that slides in from the screen edge | Drawer |
| A popup when a link is hovered (preview) | Preview Card |
Key differences:
- Dialog vs Alert Dialog:
Dialogcan be dismissed with Escape or backdrop click.Alert Dialogrequires an explicit user action (confirm/cancel) to proceed and is intended for destructive or irreversible operations. - Dialog vs Drawer:
Drawerextends Dialog with gesture support, snap points, and indent effects. UseDrawerwhen you need those; otherwise a positionedDialogis sufficient.Dialogdoes not support gestures. - Menu vs Popover: Menu is for a list of actions with keyboard navigation (arrow keys, type-ahead). Use
Popoverfor general interactive content (see next section).
Contextual hints and notifications (Popover, Tooltip, Toast)
These three are often confused. Use the table and key differences below to decide.
| If you need… | Use |
|---|---|
| An accessible popup anchored to a trigger (interactive content) | Popover |
| A short hint on hover/focus; trigger not for opening popup | Tooltip |
| A short-lived notification without a specific trigger | Toast |
Key differences:
-
Popover — An accessible popup anchored to a button. Use when the trigger’s purpose is to open the popup and the popup can contain interactive content (buttons, links, form fields).
Popoveris non-modal and can open on click or hover (openOnHover). UsePopoverinstead ofTooltipwhen the content must be available to touch or screen reader users (e.g. infotips on an info icon). -
Tooltip — A popup that appears when an element is hovered or focused, showing a hint for sighted users. Use when you need a short, non-interactive label or hint for an element whose main purpose is something else (e.g. an icon button). Tooltips act as supplementary visual labels; they are not accessible to touch or screen reader users. The trigger must have an accessible name (e.g.
aria-label). If the description is important for everyone, use inline text orPopoverinstead. See the Tooltip documentation for alternatives to tooltips. -
Toast — Generates toast notifications. Use when you need to notify the user about something that just happened (e.g. saved, error, copied) without a specific trigger. Toasts are temporary and can stack; they can also be anchored for contextual feedback. Do not use
Toastfor content tied to a specific control—useTooltiporPopoverfor that.
Actions and toggles
| If you need… | Use |
|---|---|
| A clickable action (submit, cancel, navigate) | Button |
| A two-state button that can be on or off (e.g. toolbar) | Toggle |
| A group of toggle buttons (single or multi-select) | Toggle Group |
Key differences:
- Button vs Toggle: Button triggers an action. Toggle indicates a pressed/unpressed state (e.g. bold in a toolbar) and uses
aria-pressed. Do not use Button for links—style an<a>element directly. - Toggle Group vs Radio: Both allow exclusive selection. Toggle Group is for toolbar-style actions;
Radiois for form fields. Toggle Group also supports multi-select.
On/off, choice, and range controls
| If you need… | Use |
|---|---|
| A control that indicates whether a setting is on or off | Switch |
| A binary form field with a checkmark | Checkbox |
| Multiple checkboxes with shared state (e.g. Select all) | Checkbox Group |
| One selection from a small set of options | Radio |
| One or more values in a numeric range by dragging | Slider |
Key differences:
- Switch vs Checkbox: Both are boolean form controls.
Switchindicates whether a setting is on or off.Checkboxis for selected/unselected and is typically submitted with a form. - Toggle vs Switch:
Toggleis for toolbar actions (e.g. bold/italic) and usesaria-pressed.Switchis for form settings and usesrole="switch".
Choosing from a list
| If you need… | Use |
|---|---|
| A dropdown to choose a predefined value (no filtering) | Select |
| A filterable dropdown; value must be from the list | Combobox |
| An input with suggested completions; free-form text allowed | Autocomplete |
Key differences:
- Select vs Combobox:
Selectis not filterable (aside from keyboard typeahead). PreferComboboxwhen the number of items is large enough to warrant filtering. UseSelectinstead ofComboboxwhen no input is rendered (listbox-only pattern). - Combobox vs Autocomplete:
Comboboxrestricts the value to predefined items.Autocompleteallows free-form text; suggestions only optionally autocomplete. UseComboboxwhen the selection must be remembered and the value cannot be custom; useAutocompletefor search widgets or filterable command pickers.
Tabs, accordions, and collapsible content
| If you need… | Use |
|---|---|
| Toggling between related panels on the same page | Tabs |
| A set of collapsible panels with headings | Accordion |
| A single collapsible panel controlled by a button | Collapsible |
| A visual divider between sections | Separator |
| A scrollable region with custom scrollbars | Scroll Area |
Key differences:
- Tabs vs Accordion:
Tabsshow one panel at a time with tab list navigation.Accordionis a set of collapsible panels with headings and can have multiple panels open. - Accordion vs Collapsible:
Accordionmanages a group of sections with shared state.Collapsibleis a single panel controlled by a button.
Form structure and inputs
| If you need… | Use |
|---|---|
| Labeling and validation for form controls | Field |
| Grouping related form controls with a legend | Fieldset |
| A native form with consolidated error handling | Form |
| A text input | Input |
| A numeric input with increment/decrement and scrub | Number Field |
| A date (or date range) picker | Calendar |
Form is composed with Field. See the forms guide for naming controls, validation, and integration with React Hook Form or TanStack Form.
Navigation
| If you need… | Use |
|---|---|
| A horizontal bar of menu triggers (e.g. File, Edit) | Menubar |
| Site or app navigation with links and flyouts | Navigation Menu |
Progress and status
| If you need… | Use |
|---|---|
| Short-lived notifications (success, error, etc.) | Toast |
| The status of a task that takes a long time | Progress |
| A graphical display of a value within a range | Meter |
Key differences: Progress displays task completion (e.g. upload). Meter displays a value within a known range (e.g. capacity, rating), not task progress. For when to use Toast vs Tooltip or Popover, see the Popover, Tooltip, and Toast section above.