Toggle component attributes
warning
The content on this page is outdated and will not receive updates. For the most up-to-date functionality, refer to Setting up and managing flows.
You can customize toggle components by applying attributes..
Default legacy player runtime
You can apply the following attributes when running flows with the default legacy player.
| Key | Value | Description |
|---|---|---|
classesPage builder: Space delimited css classes | string | Apply CSS directly to the component. The string value can consist of multiple entries to build up a CSS class selector, separated by a space character. See CSS reference.For example, if a custom " .mw-bs .myChosenClassName" style is added to a player (either directly or through a linked stylesheet), this custom style can then be applied to the component using the value "myChosenClassName". |
backgroundPage builder: custom background colour | string | Change the background color of the toggle component. The following string values are supported:• Danger: Red background.• Info: Purple background.• Success: Green background.• Warning: Orange background.• CSS named colours: For example, ' black', 'red', 'blue' and so on. |
shapePage builder: A custom CSS class | string | Change the appearance of the toggle component by specifying either of the following values: • round: Set by default, the toggle component has rounded corners.• square: The toggle component has square corners. |
Metadata example
This metadata example uses the default legacy player runtime.
"attributes": {
"shape": "round",
"background": null
}