Skip to content

ToggleButton properties

PropertyTypeDescription
valuestring(required) Defines the value as a string. Use it to get the value during the on_change event listener callback in the ToggleButtonGroup.
textstring(required) The text shown in the ToggleButton.
checkedboolean(optional) Determine whether the ToggleButton is checked or not. The default will be false.
titlestring(optional) The title of the input - describing it a bit further for accessibility reasons.
labelstring(optional) Use either the label property or provide a custom one.
iconstring
React.ReactNode
(optional) Icon to be included in the toggle button.
icon_positionleft
right
(optional) Position of the icon inside the toggle button. Set to left or right. Defaults to right if not set.
icon_sizestring(optional) Define icon width and height. Defaults to 16px.
sizesmall
medium
default
large
(optional) The size of the button. For now there is small, medium, default and large.
statuserror
info
boolean
(optional) Text with a status message. The style defaults to an error message. You can use true to only get the status color, without a message.
status_stateerror
info
(optional) Defines the state of the status. Currently, there are two statuses [error, info]. Defaults to error.
status_propsobject(optional) Use an object to define additional FormStatus properties.
globalStatusobject(optional) The configuration used for the target GlobalStatus.
suffixstring
React.ReactNode
(optional) Text describing the content of the ToggleButton more than the label. You can also send in a React component, so it gets wrapped inside the ToggleButton component.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

ToggleButton.Group properties

PropertyTypeDescription
valuestring(optional) Defines the pre-selected ToggleButton button. The value has to match the one provided in the ToggleButton button. Use a string value.
valuesarray(optional) Defines the pre-selected ToggleButton buttons in multiselect mode. The values have to match the one provided in the ToggleButton buttons. Use array, either as JS or JSON string.
multiselectboolean(optional) Defines if the ToggleButton's should act as a multi-selectable list of toggle buttons. Defaults to false.
layout_directioncolumn
row
(optional) Define the layout direction of the ToggleButton buttons. Can be either column or row. Defaults to column.
titlestring(optional) The title of group, describing it a bit further for accessibility reasons.
statusstring(optional) Uses the form-status component to show failure messages.
status_stateerror
info
(optional) Defines the state of the status. Currently, there are two statuses [error, info]. Defaults to error.
status_propsobject(optional) Use an object to define additional FormStatus properties.
globalStatusobject(optional) The configuration used for the target GlobalStatus.
labelstring(optional) Use either the label property or provide a custom one.
label_directionvertical
horizontal
(optional) To define the label layout direction on how the next element should be placed on. Can be either vertical or horizontal. Defaults to horizontal.
label_sr_onlyboolean(optional) Use true to make the label only readable by screen readers.
verticalboolean(optional) Will force both direction and label_direction to be vertical if set to true.
suffixstring(optional) Text describing the content of the ToggleButtonGroup more than the label. You can also send in a React component, so it gets wrapped inside the ToggleButtonGroup component.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.