Select
Select element input
name | type | default | description |
|---|---|---|---|
| align | "left" | "right" | - | If the option list is wider than the select, which |
| autocomplete | boolean | false | If the options list will filter options based on text input. |
| createable | boolean | false | If it is possible to create an option if it does not exist in the options list. |
| createablePrefix | string | Add | The string or component to prefix the value in the create value option. |
| description | ReactNode | - | Description text or react component. |
| direction | "up" | "down" | down | If the menu opens up top or bottom. |
| disabled | boolean | false | If true, prevents user interaction with component. |
| emptyListMessage | string | No results | Message displayed if there is no available options. |
| id | string | - | The id attribute of div element. |
| onChange | (e: ChangeEvent<HTMLInputElement>) => void | - | The handler for change events. |
| error | ReactNode | - | Error text or a react component. |
| hideLabel | boolean | - | If true, hides the label and secondary label. |
| inline | boolean | - | If true, moves the label and status messages to the right of the content. |
| inputSize | number | { max?: number | undefined; min?: number | undefined; } | - | The size attribute for input element. Useful for controlling input size in flexboxes. |
| label * Required | ReactNode | - | Label text or react component |
| labelSecondary | ReactNode | - | Secondary text or react component |
| padding | "auto" | "60vh" | "80vw" | "0" | "unset" | "initial" | "px" | "0.25" | "0.5" | "0.75" | "1" | "1.25" | "1.5" | "1.75" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "6.5" | "7" | "7.5" | "8" | "8.5" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "18" | "20" | "22.5" | "24" | "25" | "26" | "28" | "30" | "32" | "36" | "40" | "44" | "45" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "112" | "128" | "144" | "168" | "192" | "224" | "256" | "288" | "320" | "1/4" | "1/3" | "1/2" | "2/3" | "3/4" | "full" | "fit" | "max" | "min" | "viewHeight" | "viewWidth" | "none" | "dialogMobileWidth" | "dialogDesktopWidth" | "center" | "-0.5" | "-1.5" | "-4" | "-4.5" | "-6" | "-px" | "-full" | { outer?: "auto" | "60vh" | "80vw" | "0" | "unset" | "initial" | "px" | "0.25" | "0.5" | "0.75" | "1" | "1.25" | "1.5" | "1.75" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | ... 65 more ... | undefined; inner?: "auto" | ... 87 more ... | undefined; } | - | Overide the padding setting of the element |
| readOnly | boolean | false | If true, sets the select component into read only mode
If true, will set the Fields component to read only mode |
| size | "small" | "medium" | medium | Preset size spacing settings |
| tabIndex | number | -1 | The tabindex attribute for |
| onFocus | FocusEventHandler<HTMLInputElement> | - | The handler for focus events. |
| onBlur | FocusEventHandler<HTMLInputElement> | - | The handler for blur events. |
| onCreate | (value: string) => void | - | A handler for when new values are created |
| name | string | - | The name property of an input element. |
| options * Required | SelectOptionProps[] | - | An arrary of objects conforming to OptionProps interface. |
| ref | null | string | (instance: HTMLInputElement | null) => void | RefObject<HTMLInputElement> | - | Allows getting a ref to the component instance.
Once the component unmounts, React will set `ref.current` to `null`
(or call the ref with `null` if you passed a callback ref).
@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
| required | boolean | - | Adds mark to label |
| reverse | boolean | - | Have label appear on the left of the form element. |
| rows | number | - | The approximate number of rows to display on menu. |
| showBorder | boolean | - | If true, show a border around the select component * |
| showDot | boolean | false | If true will show the indicator dot |
| validated | boolean | - | If true and showDot is true, will show a green indicator |
| value | string | - | The selected option's value. |
| width | "auto" | "60vh" | "80vw" | "0" | "unset" | "initial" | "px" | "0.25" | "0.5" | "0.75" | "1" | "1.25" | "1.5" | "1.75" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "6.5" | "7" | "7.5" | "8" | "8.5" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "18" | "20" | "22.5" | "24" | "25" | "26" | "28" | "30" | "32" | "36" | "40" | "44" | "45" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "112" | "128" | "144" | "168" | "192" | "224" | "256" | "288" | "320" | "1/4" | "1/3" | "1/2" | "2/3" | "3/4" | "full" | "fit" | "max" | "min" | "viewHeight" | "viewWidth" | "none" | "dialogMobileWidth" | "dialogDesktopWidth" | "center" | "-0.5" | "-1.5" | "-4" | "-4.5" | "-6" | "-px" | "-full" | - | A tokens space key value setting the width of the parent element. |
name | type | default | description |
|---|---|---|---|
| color | Colors | - | The color of the option. |
| disabled | boolean | - | If true, prevents user interaction with option. |
| label | string | - | The human readable text for the option. |
| node | ReactNode | - | A react node that acts as the label as an alternative to the label prop. |
| prefix | ReactNode | - | The text or component inserted before the label. |
| value * Required | string | - | The value of the option. |