terra-form
Version:
Components for building forms
23 lines (18 loc) • 586 B
Markdown
Select Field component for rendering selects with standard structured style. Uses the select component. Also exposes attributes specific to the select.
```jsx
import React from 'react';
import SelectField from 'terra-form/lib/SelectField';
<SelectField
options={[{ value: 'm', display: 'moo' },
{ value: 'b', display: 'boo' },
{ value: 'z', display: 'zar' }]}
error="This field is required"
name="description"
label="Description"
selectAttrs={{ className: 'healtheintent-application' }}
defaultValue="b"
required
/>
```