Select

Listbox with optional search, grouping and multi-select, positioned to stay on screen.

Source
2 files
Dependencies
none
Playground
no

Examples

Every variant of the shipped component, live. Switch the layout to read them as a table or one at a time, and open Code for the file behind them.

01

Default

<SelectItem value="..." />

Installation

One package for the whole library — run this once and every component on this site is importable. Adding the tokens to your stylesheet is the other half; the installation guide covers it.

npm install kipui
import { Select, SelectTrigger, SelectContent, SelectItem } from "kipui";
Peer dependencies

react 19

react-dom 19

tailwindcss 4

Bundled dependencies

None beyond the peers above.

Usage

select-example.tsx
import { Select, SelectTrigger, SelectContent, SelectItem } from "kipui";

<Select defaultValue="asia" onValueChange={setRegion}>
  <SelectTrigger placeholder="Pick a region" />
  <SelectContent>
    <SelectItem value="asia">Asia</SelectItem>
    <SelectItem value="emea">EMEA</SelectItem>
  </SelectContent>
</Select>
  • For a plain list with no grouping or search, `SimpleSelect` takes an options array and skips the composition.
  • The listbox flips above the trigger when there isn't room below — do not hard-code a direction.

API reference

Transcribed from the component's own types. Props with no default are required.

Select

PropDefaultDescription
valuestringrequiredControlled selection.
defaultValuestringrequiredUncontrolled seed.
onValueChange(value: string) => voidrequiredFires with the selected value.
disabledbooleanfalseBlocks opening the listbox.
idstringrequiredId on the trigger, for an external label.
onChange(event: { target: { value: string } }) => voidrequiredEvent-shaped alternative to `onValueChange`, for form libraries that expect one.
portalTargetHTMLElement | nullrequiredWhere the listbox is portalled. Defaults to the body.

SelectItem

PropDefaultDescription
valuestringrequiredRequired. Value reported on selection.
disabledbooleanfalseSkipped by keyboard navigation.
descriptionstringrequiredSecond line under the option label.