# Select A form-ready dropdown select component supporting controlled and uncontrolled usage with four visual variants. ```tsx demo import { Select } from "@tenstorrent/vesper/select"; export default function SelectDemo() { return ( ` element that holds the selected value. All other props are forwarded to the underlying ` ); } ``` ### Different sizes The `Select` component can be rendered at `sm`, `md`, or `lg` size, defaulting to `md`. Size affects the height, padding, and text styles of the trigger, as well as the size of its icons. ```tsx demo import { Select } from "@tenstorrent/vesper/select"; const COUNTRIES = [ { label: "Canada", value: "ca" }, { label: "Japan", value: "jp" }, { label: "Norway", value: "no" }, ]; export default function SelectSizes() { return (
} placeholder="Select a region" options={[ { label: "United States", value: "us" }, { label: "Europe", value: "eu" }, { label: "Asia Pacific", value: "ap" }, ]} /> ); } ``` > [!NOTE] > > The trailing caret is rendered by the component itself, and flips between its open and closed states as the dropdown is toggled. Only the leading icon is configurable. ### Disabling the select Pass `disabled` to prevent all interaction with the trigger and its dropdown. A disabled `Select` still displays its current selection, but is skipped in the tab order and excluded from form data: ```tsx import { Select } from "@tenstorrent/vesper/select"; export default function DisabledSelect() { return ( {submitted !== null && ( Submitted value: {submitted} )} ); } ``` The value submitted is the `value` of the selected option, not the `label` displayed in the trigger. The form above submits `fruit=apple` when "Apple" is selected. ### Accessing the underlying element Use the `ref` prop when you need direct access to the underlying trigger `