<SelectInput>
ComponentA dropdown select box input, nice and accessible.
<SelectInputlabel='Options'options={[{ label: 'Option One', name: 1 },{ label: 'Option Two', name: 2 },{ label: 'Option Three', name: 3 }]}/>
Name | Description |
---|---|
name string | input name attribute |
label string | text to display above the input |
defaultLabel string | text to act as placeholder label |
size string | Controls font size and size of the element |
value object | set the value via prop Object contains nested props, see below: |
value.name string | programmatic name of the option |
value.label string | visual, human-readable name of the option |
options* array | array of option objects within the select Array members must be of the type below: |
options[x] object | Object contains nested props, see below: |
options[x].name string | |
options[x].label string | |
onValueChange function | function called with the value when it |
With many options:
<SelectInputoptions={[{name: '1',label: 'One'},{name: '2',label: 'Two'},{name: '3',label: 'Three'},{name: '4',label: 'Four'},{name: '5',label: 'Five'},{name: '6',label: 'Six'},{name: '7',label: 'Seven'},{name: '8',label: 'Eight'},{name: '9',label: 'Nine'},{name: '10',label: 'Ten'},{name: '11',label: 'Eleven'},{name: '12',label: 'Twelve'},{name: '13',label: 'Thirteen'},{name: '14',label: 'Fourteen'},{name: '15',label: 'Fifteen'},{name: '16',label: 'Sixteen'},{name: '17',label: 'Seventeen'},{name: '18',label: 'Eighteen'}]}/>
With size="small"
:
<SelectInputlabel='Options'size='small'options={[{ label: 'Option One', name: 1 },{ label: 'Option Two', name: 2 },{ label: 'Option Three', name: 3 }]}/>