<SelectInput> Component

A dropdown select box input, nice and accessible.

Share
Code Editor

Where it's used

0.x.x
Loading 0.x.x releases...
1.x.x
Loading 1.x.x releases...
2.x.x
Loading 2.x.x releases...
3.x.x
Loading 3.x.x releases...
4.x.x
Loading 4.x.x releases...

Props

NameDescription
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
Options: "small", "medium"
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

Examples

With many options:

Share
Code Editor

With size="small":

Share
Code Editor