CheckboxSwitch
value type: any[]
The CheckboxSwitch
block allows a user to select a boolean value between (true/false).
A similar switch block is
Switch
. Alternatively theCheckboxSelector
can be used to list multiple options.
Block
State
block_id: false
Block Setup
id: block_id
type: CheckboxSwitch
Settings
Examples
Checkbox only
id: checkbox_example
type: CheckboxSwitch
properties:
label:
disabled: true
Description only
id: description_example
type: CheckboxSwitch
properties:
description: Option
Description and label
id: description_label_example
type: CheckboxSwitch
properties:
description: Option
label:
title: Label
Agree to terms and conditions
id: terms_example
type: CheckboxSwitch
properties:
description: >-
I agree to the terms and conditions and privacy policy as found on the
website.... Thoroughly I agree to the terms and conditions and privacy
policy as found on the website....
label:
disabled: true
CheckboxSwitch JSON Schema Definition
type: object
properties:
events:
additionalProperties: false
properties:
onChange:
description: Trigger actions when selection is changed.
type: array
type: object
properties:
additionalProperties: false
properties:
color:
description: Selected checkbox color.
type: string
description:
description: Text to display next to the checkbox - supports html.
type: string
disabled:
default: false
description: Disable the block if true.
type: boolean
inputStyle:
description: Css style to applied to input.
type: object
label:
additionalProperties: false
description: Label properties.
properties:
align:
default: left
description: Align label left or right when inline.
enum:
- left
- right
type: string
colon:
default: true
description: Append label with colon.
type: boolean
disabled:
default: false
description: Hide input label.
type: boolean
extra:
description: Extra text to display beneath the content - supports html.
type: string
extraStyle:
description: Css style to applied to label extra.
type: object
feedbackStyle:
description: Css style to applied to label feedback.
type: object
hasFeedback:
default: true
description: >-
Display feedback extra from validation, this does not disable
validation.
type: boolean
inline:
default: false
description: Render input and label inline.
type: boolean
span:
description: Label inline span.
type: number
title:
description: Label title - supports html.
type: string
type: object
title:
description: >-
Title to describe the input component, if no title is specified the
block id is displayed - supports html.
type: string
type: object