Text, dropdowns and switches
This page contains the parameters for text-based, dropdown, URI, and boolean input field components — used for properties of type string and boolean.
For the shared "ui:component" syntax used across all input components, see Specifying property component parameters.
Try the interactive examples on this page
Edit the schemas to see how your changes affect the fields they generate.
TextLink copied!
For properties of type string with no component name specified the default string component is used.
ParametersLink copied!
| Parameter | Description |
|---|---|
| placeholder | Initial guide text |
Example: single line text with placeholderLink copied!
Schema source
Rich text (markdown)Link copied!
A rich text component that supports markdown. Used with a property of type string and format markdown. You do not have to specify the component name.
ParametersLink copied!
| Parameter | Description |
|---|---|
| defaultView | Whether the initial view should be the markdown or rich text editor. markdown or editor (default) |
| withMarkdownView | Is the markdown view shown. true (default) or false |
| withToolbar | Is the toolbar shown. true (default) or false |
Example: rich text opening in markdown viewLink copied!
Schema source
Text areaLink copied!
A component that renders single or multi line text.
ParametersLink copied!
| Parameter | Description |
|---|---|
| name | text-area |
| minRows | Minimum number of rows for the text box |
| maxRows | Maximum number of rows for the text box |
| placeholder | Initial guide text |
| autosize | true or false. Specifies if the text area should grow with the content. false by default. |
Example: a multi-line text areaLink copied!
Schema source
Example: a localized text areaLink copied!
Schema source
Dropdown listLink copied!
A component that shows a list of string, integer or number. The list is populated from an enum.
ParametersLink copied!
You can control the behaviour of the scroll bars in the list by setting the scrollAreaProps and choosing the type as shown in the table below. You should use auto if the list contains more items than can be shown without scrolling (usually 6 items).
| Parameter | Description |
|---|---|
scrollAreaProps | Controls the scroll bar behaviour. An object containing a type value chosen from the table below |
scrollAreaProps type valuesLink copied!
| Value | Description |
|---|---|
hover | Visible on hover |
scroll | Visible on scroll (default) |
auto | Always visible when the list contains more items than can be shown without scrolling |
always | Always shown |
never | Always hidden |
Example: a scrollable string dropdownLink copied!
Schema source
Dropdown list with labelsLink copied!
A component that shows a list of labels and values. The list is populated using the oneOf keyword and can be used with string, integer and number.
The title of each item is shown as the label in the list, while the value selected is defined by a const.
ParametersLink copied!
| Parameter | Description |
|---|---|
| searchable | true (default) or false . Determines whether the user can enter a value to search the list as well as scrolling |
Example: a decimal dropdown with labelsLink copied!
Schema source
UriLink copied!
A component that displays properties of type string and format uri. No name is specified so the default text component is used.
ParametersLink copied!
| Parameter | Description |
|---|---|
| placeholder | Initial guide text |
Example: a web address fieldLink copied!
Schema source
BooleanLink copied!
A checkbox component used for allowing the user a boolean selection.
ParametersLink copied!
| Parameter | Description |
|---|---|
| name | switch |
| labelPosition | left or right (default) |