# Choosing a component

> Which component to use when people pick something, when you tell them something, for what floats above the page, while they wait, and for a row.

Source: https://raft-design.botiverse.build/patterns/choosing-components. Generated from the current release; where it differs from what you remember, this page is right.

Several components can look right for the same job. These tables pick one per situation. Each component's own doc says how to use it once chosen.

## When it applies

Whenever you put a control, a message, a popup or a row on a screen. Products don't override these choices; a product-specific case goes on the product's page.

## Rules

### Picking something

| You need | Use |
| --- | --- |
| To act on one thing | A menu ([DropdownMenu](https://raft-design.botiverse.build/components/dropdown-menu.md)); press and hold on a phone opens the same menu ([ContextMenu](https://raft-design.botiverse.build/components/context-menu.md)) |
| Yes or no, applied at once | [Switch](https://raft-design.botiverse.build/components/switch.md) |
| Yes or no, applied on Save | [Checkbox](https://raft-design.botiverse.build/components/checkbox.md) |
| One of 2 to 5 answers, submitted with a form | [RadioGroup](https://raft-design.botiverse.build/components/radio-group.md) |
| Another view of the same content | [SegmentedControl](https://raft-design.botiverse.build/components/segmented-control.md) |
| Sections of one page, each with its own content | [Tabs](https://raft-design.botiverse.build/components/tabs.md) |
| One of up to 10 values | [Select](https://raft-design.botiverse.build/components/select.md) |
| One of many values | A select with a search row at the top of its list ([ComboboxSelect](https://raft-design.botiverse.build/components/combobox-select.md)) |
| A few of several values | A multi-select: a box before each item, and the field shows the chosen values ([ComboboxSelect](https://raft-design.botiverse.build/components/combobox-select.md) with `multiple`) |
| A few of many values (people, agents, labels) | A multi-select with search: chosen values become chips in the field, and typing continues after them ([ComboboxSelect](https://raft-design.botiverse.build/components/combobox-select.md) with `multiple`, or [Combobox](https://raft-design.botiverse.build/components/combobox.md) with its chips) |
| To filter a list | A filter: a select or combobox opened from a [PickerTriggerButton](https://raft-design.botiverse.build/components/picker-trigger-button.md) |
| To change one property of an item in place | The value in a [DescriptionList](https://raft-design.botiverse.build/components/description-list.md) opens a picker |

### Telling people something

| Situation | Use | Stays |
| --- | --- | --- |
| Something the person just did has a result | [Toast](https://raft-design.botiverse.build/components/toast.md) | A few seconds |
| They need to know it before acting | [Banner](https://raft-design.botiverse.build/components/banner.md), inside a dialog or form | Always |
| Something in one panel failed: an agent won't start, a setting didn't save | A full-width banner under the panel header (`PanelNotice`, [Panel](https://raft-design.botiverse.build/components/panel.md)) | Until it is fixed |
| The state of the whole workspace: a computer offline, a quota nearly full, an update | The notification center ([NotificationCenter](https://raft-design.botiverse.build/components/notification-center.md)), with an attention dot on the bell | Until it changes |
| Something happened elsewhere that the person should see | Activity ([ActivityInbox](https://raft-design.botiverse.build/components/activity-inbox.md)); its entry point shows an attention dot or a count | Until it is read |
| An agent needs approval | An action card in the conversation ([MessageActionCard](https://raft-design.botiverse.build/components/message-action-card.md)), also listed in Activity | Until it is handled |
| The person must decide now | [Dialog](https://raft-design.botiverse.build/components/dialog.md) | Until they decide |
| An input is invalid | The input's error state ([Field](https://raft-design.botiverse.build/components/field.md)) | Until it is fixed |
| What an icon means | [Tooltip](https://raft-design.botiverse.build/components/tooltip.md) | While hovered |

- Never put anything in a toast that would confuse people if they missed it.

### Overlays

| Situation | Use |
| --- | --- |
| One sentence on hover | [Tooltip](https://raft-design.botiverse.build/components/tooltip.md) |
| A person or agent, on hover | A profile card ([PreviewCard](https://raft-design.botiverse.build/components/preview-card.md)) |
| A list of actions, on click or press and hold | [DropdownMenu](https://raft-design.botiverse.build/components/dropdown-menu.md) |
| One value, on click | [Select](https://raft-design.botiverse.build/components/select.md), with search when there are many values |
| Several values, on click | A multi-select, with search when there are many values. Choosing a value doesn't close the list |
| A little input, on click | [Popover](https://raft-design.botiverse.build/components/popover.md) |
| Details and settings people look at for a while | [Drawer](https://raft-design.botiverse.build/components/drawer.md) |
| A large form filled in one pass | The wide [Dialog](https://raft-design.botiverse.build/components/dialog.md); see [Forms](https://raft-design.botiverse.build/patterns/forms.md#the-large-form-dialog) |
| A place to go, on a phone (switch workspace, Working now) | A bottom sheet ([Drawer](https://raft-design.botiverse.build/components/drawer.md)). Picking a value is still a select list; acting on something is still a menu |
| A short explanation, on a phone | A bottom sheet ([Drawer](https://raft-design.botiverse.build/components/drawer.md)) |
| A confirmation | [AlertDialog](https://raft-design.botiverse.build/components/alert-dialog.md) |
| Task details | A centered dialog, at most 760px wide, full screen on a phone ([Tasks](https://raft-design.botiverse.build/patterns/tasks.md)) |

- Put a scrim behind every centered overlay: dialogs, confirmations, search, task details, large forms. How overlays move is in [Motion](https://raft-design.botiverse.build/foundations/motion.md#usage).

### Waiting

| Situation | Use |
| --- | --- |
| The layout is known | [Skeleton](https://raft-design.botiverse.build/components/skeleton.md) |
| The duration is unknown, and there is no layout to hold | The pixel spinner ([Spinner](https://raft-design.botiverse.build/components/spinner.md)) |
| The percentage is known | [Progress](https://raft-design.botiverse.build/components/progress.md) |
| A button started the wait | The button's loading state ([Button](https://raft-design.botiverse.build/components/button.md)) |

- Don't use pink for any of these. They are passive.

### Rows

| Where | Use |
| --- | --- |
| A phone list: channels, direct messages, settings, members | [ListRow](https://raft-design.botiverse.build/components/list-row.md) |
| Agents and people on a detail or profile page | [ListRow](https://raft-design.botiverse.build/components/list-row.md), in an inset group |
| The desktop sidebar | The sidebar row ([Sidebar](https://raft-design.botiverse.build/components/sidebar.md)) |
| Activity and notifications | [InboxItem](https://raft-design.botiverse.build/components/inbox-item.md) |
| A message found by search | The search result row ([Search](https://raft-design.botiverse.build/components/search.md)) |
| A task | [TaskCard](https://raft-design.botiverse.build/components/task-card.md), on a board or in a list |

## Related

- [Composites](https://raft-design.botiverse.build/patterns/composites.md): things built from these components.
- [Feedback](https://raft-design.botiverse.build/patterns/feedback.md): errors by scope.
- [Forms](https://raft-design.botiverse.build/patterns/forms.md): which controls apply at once and which are saved.
