Components
Select
Select enables a user to select a single item from a list of options.
Always use a component to identify and describe the purpose of a select element. Selects are often used within a .
Pro tip
If you need to customize the styles of the select menu or offer multiple selections, you should use the component instead.
import { Select } from '@sproutsocial/racine'
Properties
Name | Type | Default | Description | Required? |
---|---|---|---|---|
id | string | ID of the form element, should match the "for" value of the associated label | ||
name | string | |||
ariaLabel | string | Label used to describe the select if not used with an accompanying visual label | ||
ariaDescribedby | string | Attribute used to associate other elements that describe the Select, like an error | ||
children | React.Node | |||
defaultValue | any | |||
value | any | Current value of the input | ||
required | boolean | |||
isInvalid | boolean | |||
autoFocus | boolean | |||
disabled | boolean | |||
inputProps | any | Props to spread onto the underlying input element | ||
qa | any | |||
onChange | (e: SyntheticInputEvent<HTMLInputElement>) => void | |||
size | "large" "small" "default" | "default" |