Skip to Content

Select

The Select component is a custom dropdown supporting labels, helper text, error states, and three sizes. Pass <option> elements as children.

Preview

States
Variants

Choose your favourite fruit from the list.

Import

import { Select } from '@chloe0592/pebble'

Usage

<Select placeholder="Choose an option"> <option value="a">Option A</option> <option value="b">Option B</option> </Select> <Select label="Country" placeholder="Select a country"> <option value="us">United States</option> <option value="uk">United Kingdom</option> </Select> <Select label="Status" errorText="Please select a status." />

Props

PropTypeDefaultDescription
labelstringLabel displayed above the select
helperTextstringMuted hint text below the select
errorTextstringError message; also sets error styling
placeholderstringPlaceholder shown when no value is selected
size'sm' | 'md' | 'lg''md'Select height
disabledbooleanfalseDisables interaction

All other props are forwarded to the underlying select element.

Last updated on