Select

A dropdown selector for choosing from a list of options.

When to Use

  • For selecting one or more items from a predefined list
  • When a dropdown is more appropriate than radio buttons
  • For searchable or taggable selection

Import

import { Select } from "orizon";

Examples

Basic

<Select
  defaultValue="option1"
  options={[
    { value: "option1", label: "Option 1" },
    { value: "option2", label: "Option 2" },
    { value: "option3", label: "Option 3" },
  ]}
  style={{ width: 200 }}
/>

Multiple Selection

<Select
  mode="multiple"
  placeholder="Select items"
  options={options}
  style={{ width: 300 }}
/>

Searchable

<Select showSearch placeholder="Search and select" options={options} />

Disabled

<Select disabled defaultValue="disabled" options={options} />

API

SelectProps

  • options{ value, label, disabled? }[] — Option list
  • valuestring | string[] — Selected value (controlled)
  • defaultValuestring | string[] — Default value
  • onChange(value, option) => void — Change handler
  • mode"multiple" | "tags" — Selection mode
  • showSearchboolean — Enable search (default: false)
  • filterOption(input, option) => boolean — Custom search filter
  • placeholderstring — Placeholder text
  • disabledboolean — Disable selector
  • allowClearboolean — Show clear button
  • size"small" | "middle" | "large" — Size
  • status"error" | "warning" — Validation status
  • loadingboolean — Loading state
  • maxTagCountnumber | "responsive" — Max tags to show in multiple mode