@govuk-react/select

Styled select menu, taking its options as children and with various configurable parameters via props.

Stats

StarsIssuesVersionUpdatedCreatedSize
@govuk-react/select
0.10.010 days ago4 years agoMinified + gzip package size for @govuk-react/select in KB

Readme

Select

Import

  import Select from '@govuk-react/select';

The select component should only be used as a last resort in public-facing services because research shows that some users find selects very difficult to use.

Properties

Prop Required Default Type Description
error `````` boolean Apply error state styling to the component
errorText undefined string
hint undefined ReactNode
input {} SelectHTMLAttributes
label true `````` string
margin `````` Margin Margin[]
mb `````` string number
meta {} { error?: string string[]; touched?: boolean; }
padding `````` Padding Padding[]

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.