Skip to content
SevenOne

Search documentation

Search pages and components

ComboboxPro

A searchable select. The 44px trigger (48px in Large mode) opens a search field and a list of 44px options; the chosen one shows a check. Built on Popover and Command.

Installation

This component is part of SevenOne Pro.

The Pro license includes the code of every Pro component, the complete Figma file and the Angular version.

Usage

import { Combobox } from "@/components/ui/combobox"

const frameworks = [
  { value: "next", label: "Next.js" },
  { value: "sveltekit", label: "SvelteKit" },
]

<Combobox options={frameworks} value={value} onValueChange={setValue} placeholder="Select framework..." />

Examples

Default

const frameworks = [
  { value: "next", label: "Next.js" },
  { value: "sveltekit", label: "SvelteKit" },
  { value: "nuxt", label: "Nuxt.js" },
  { value: "remix", label: "Remix" },
  { value: "astro", label: "Astro" },
]

const [value, setValue] = React.useState("next")

<Combobox
  options={frameworks}
  value={value}
  onValueChange={setValue}
  placeholder="Select framework..."
  searchPlaceholder="Search framework..."
  emptyText="No framework found."
/>

Placeholder

<Combobox options={frameworks} value="" onValueChange={setValue} placeholder="Select framework..." />

With label and hint

This is a hint text to help user.

<Field className="w-62">
  <FieldLabel id="framework-label" htmlFor="framework">Framework</FieldLabel>
  <Combobox
    id="framework"
    labelId="framework-label"
    options={frameworks}
    value={value}
    onValueChange={setValue}
    placeholder="Select framework..."
    aria-describedby="framework-hint"
  />
  <FieldDescription id="framework-hint">This is a hint text to help user.</FieldDescription>
</Field>

Accessibility

  • The trigger has role="combobox" and aria-expanded. The popover holds a labelled search field and a list; the chosen option has a check icon and is read as "selected" (WCAG 4.1.2, 1.4.1).
  • The visible value stays in the trigger so people can check their choice (WCAG 3.3.2).
  • 44px trigger and 44px options, 16px text (WCAG 2.5.5).