<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 |
|---|---|
namestring | input name attribute |
labelstring | text to display above the input |
defaultLabelstring | text to act as placeholder label |
sizestring | Controls font size and size of the element |
valueobject | set the value via prop Object contains nested props, see below: |
value.namestring | programmatic name of the option |
value.labelstring | 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].namestring | |
options[x].labelstring | |
onValueChangefunction | 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 }]}/>