Select

Playground

Properties

Size
Leading icon
Disabled

Usage

SelectValue shows the selected item. SelectContent renders the list in a portal. SelectItem adds the item label and selection indicator automatically; do not add another indicator. Use hasFinalSeparator on SelectContent to show a separator at the end of the list.

'use client';
import {
  Select,
  SelectTrigger,
  SelectValue,
  SelectContent,
  SelectItem,
} from '@mbsw/ui';

export default function Example() {
  return (
    <Select defaultValue="0">
      <SelectTrigger aria-label={"Choose an option"}>
        <SelectValue />
      </SelectTrigger>
      <SelectContent>
        <SelectItem value="0">option A</SelectItem>
        <SelectItem value="1">option B</SelectItem>
        <SelectItem value="2">option C</SelectItem>
      </SelectContent>
    </Select>
  );
}

The Playground Code tab includes the full example with your current settings. See Installation for the CSS imports.

Composition