Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Combobox examples · Grouped

Multiple Groups with Labels Combobox for React

A combobox with Frontend and Backend groups, each under its own label.

Framework
UI library

A technology picker split into two labeled groups: React, Vue and Angular under Frontend, and Node.js, Python and Ruby under Backend. Use it when the options fall into a few clear categories and the labels help people scan.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

How are the groups built?

The data is a list of groups. Each ComboboxGroup gets its items, a ComboboxLabel, and a ComboboxCollection that renders the items.

Which technologies are listed?

React, Vue and Angular under Frontend. Node.js, Python and Ruby under Backend.

What does the button show?

Select technology... until one is picked, then its label.

How are the labels announced?

Each group is a group in the list, named by its label, so screen readers say Frontend or Backend when the highlight moves into it.

Can I add a line between the groups?

Yes, put a ComboboxSeparator between them, as in Categories with Separators.