1 | # Select Field
|
2 |
|
3 | Select Field component for rendering selects with standard structured style. Uses the select component. Also exposes attributes specific to the select.
|
4 |
|
5 | ## Usage
|
6 |
|
7 | ```jsx
|
8 | import React from 'react';
|
9 | import SelectField from 'terra-form/lib/SelectField';
|
10 |
|
11 | <SelectField
|
12 | options={[{ value: 'm', display: 'moo' },
|
13 | { value: 'b', display: 'boo' },
|
14 | { value: 'z', display: 'zar' }]}
|
15 | error="This field is required"
|
16 | name="description"
|
17 | label="Description"
|
18 | selectAttrs={{ className: 'healtheintent-application' }}
|
19 | defaultValue="b"
|
20 | required
|
21 | />
|
22 | ```
|