Switch Input - Writer AI Studio
Fields
| Name | Type | Description | Options |
|---|---|---|---|
| Label | Text | - | - |
| Accent | Color | - | - |
| Primary text | Color | - | - |
| Separator | Color | - | - |
| Custom CSS classes | Text | CSS classes, separated by spaces. You can define classes in custom stylesheets. | - |
Events
wf-toggle
Sent when the switch is toggled.
def handle_toggle(state, payload):
# The payload will be a bool
state["its_on"] = payload