Select

Displays a list of options for the user to pick from—triggered by a button.

Installation

npm install pnpm add @notion-kit/select

Or if you prefer using Shadcn primitives, use

pnpm add @notion-kit/ui

Examples


Custom Options

API Reference

Select

A Select follows Base UI's composition API. Compose Select, SelectTrigger, SelectValue, SelectContent, SelectGroup, and SelectItem directly. Pass option data to Select with Base UI's items prop when you want SelectValue to render item labels automatically.

PropTypeDefaultDescription
itemsSelect.Root.Props["items"]-Optional item data used by Base UI value lookup.
valueValue | Value[] | null-The selected value.
defaultValueValue | Value[] | null-The uncontrolled initial value.
disabledboolean-Whether the select is disabled.
onValueChange(value: Value | Value[] | null) => void-Handler called when an option is selected.

SelectGroup

Groups related options. Every SelectItem must be rendered inside a SelectGroup.

PropTypeDefaultDescription
childrenReact.ReactNode-The grouped items.

SelectLabel

A non-interactive label used to title a group of options.

PropTypeDefaultDescription
titlestring-The group label text.

SelectItem

A single selectable option.

PropTypeDefaultDescription
valuestring-The option value.
labelstring-The option label.
iconReact.ReactNode-An optional leading icon.
descstring-An optional description below the label.
hideCheckbooleanfalseWhether the check indicator is hidden.