Select

A dropdown for choosing one value from a short list. The standard Select pops its list out of the trigger with a springy pinch and flips upward near the bottom of the screen; MorphSelect grows the trigger itself into the list. Both close on Escape.

Select

select.tsx

Compose Select, SelectTrigger, SelectValue, SelectContent and SelectItem. Opening squeezes the list away from the button like a droplet splitting off, options cascade in, and it opens upward when there is no room below.

Select Select preview width

Install

$ bunx --bun shadcn add @karaui/select
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

Select

value?
string
—
defaultValue?
string
—
onValueChange?
((value: string) => void)
—
open?
boolean

Controlled open state of the panel. A layout that stacks selects can hold this to keep exactly one panel open — the panel is absolutely positioned inside its field, so two open at once paint over each other's options.

—
defaultOpen?
boolean

Uncontrolled initial open state. Default false.

false
onOpenChange?
((open: boolean) => void)

Fires whenever the panel opens or closes. The panel is absolutely positioned inside the field, so a layout that stacks selects has to know which one is open to paint it above its neighbours.

—
disabled?
boolean
false
className?
string
—

SelectTrigger

className?
string
—

SelectValue

placeholder?
string
—
className?
string
—

SelectContent

className?
string
—

SelectItem

value
string
—
disabled?
boolean
false
className?
string
—

Morph Select

select-morph.tsx

The same composable API with a Morph prefix, except trigger and list share a layoutId: the button stretches into the open list and shrinks back into a button without ever breaking into two pieces.

Select Morph Select preview width

Install

$ bunx --bun shadcn add @karaui/select-morph

API Reference

MorphSelect

value?
string
—
defaultValue?
string
—
onValueChange?
((value: string) => void)
—
disabled?
boolean
false
className?
string
—

MorphSelectValue

placeholder?
string
—
className?
string
—

MorphSelectTrigger

className?
string
—

MorphSelectContent

className?
string
—

MorphSelectItem

value
string
—
disabled?
boolean
false
className?
string
—

Updated