Skip to content

Component · popover + listbox

Select

The popup button. Opens a listbox in the top layer, works in forms.

Vintage · 1984
Y2K · 2001
Now · 2026
Remix

Install

npx @lazizbekio/mitame add select

Usage

import { Select } from "@/components/mitame/ui/select";

export default function SelectDemo() {
  return (
    <Select
      aria-label="Era"
      name="era"
      defaultValue="y2k"
      options={[
        { value: "vintage", label: "Vintage · 1984" },
        { value: "y2k", label: "Y2K · 2001" },
        { value: "now", label: "Now · 2026" },
        { value: "remix", label: "Remix", disabled: true },
      ]}
    />
  );
}

Props

PropTypeDefaultDescription
options{ value, label, disabled? }[]—The choices.
value / defaultValuestring—Controlled or uncontrolled value.
onValueChange(value: string) => void—Called when a choice is made.
placeholderReactNode"Select…"Shown when nothing is selected.
namestring—Adds a hidden input so the value is sent with forms.
aria-label / aria-labelledbystring—Give it a name.

Keyboard

KeyDoes
↓ / ↑ on the buttonOpen
↓ ↑ Home EndMove
Type lettersJump to a match
Enter / SpaceChoose
EscClose

Styling

Every part has a data-slot starting with select, and state lives in data-state,data-variant and friends. Pass any class to override; theme styles sit in a lower CSS layer, so yours win. See Theming.