Select
v3.0.0Select provides a means to select a single item from a collapsible list. Use of select helps to reduce input errors and screen space. It's commonly used to help users enter a value into a form field.
Released
- History
- View changes
- Install
- npm i @gold.au/select
- Tags
- Requires
- Contributors
React Usage
import AUselect from '@gold.au/select';
<AUselect id="exampleSelect" options={[
{
value: '',
text: 'Please select',
},
{
value: '1',
text: 'Option 1',
},
{
value: '2',
text: 'Option 2',
},
]} />
Props
Prop name | Type | Description |
---|---|---|
dark | boolean | A dark variation of the component |
block | boolean | The block option to make the select fill the available width |
options | array | All options in a neat array |
options[ 0 ].value | string | The value attribute of the option |
options[ 0 ].text | string | The text of the option |
All other props are spread into the component
Exports
Name | Type | Description |
---|---|---|
AUselect |
default | The select component |
node_modules import
import AUselect from '@gold.au/select';
pancake import
import AUselect from './select';