Checkbox Node

Checkboxes are a common form control that allows the user to check and uncheck a box. Checkboxes are often used for simple yes/no choices, like confirmations.

When checked, the checkbox will trigger the checked event. Conversely, when unchecked, the checkbox will trigger the unchecked event. When disabled, neither of these events will be triggered.

Properties

Visible

PropcheckboxNode.isVisible
Typeboolean
Default{{true}}

Whether or not this node is visible.

Enabled

PropcheckboxNode.isEnabled
Typeboolean
Default{{true}}

Whether or not this node is enabled.

Tooltip

PropcheckboxNode.tooltip
Typestring
Defaultundefined

The tooltip text to display when hovered or focused over this node.

Top

PropcheckboxNode.top
Typestring
Default1

The position of the node from the top side of the grid (grid-row-start).

Left

PropcheckboxNode.left
Typestring
Default1

The position of the node from the left side of the grid (grid-column-start).

Width

PropcheckboxNode.width
Typestring
Default128px

The width of the node. When this node is in a grid layout, this should be done using unitless grid column units (specifying 4 will become grid-column-end: span 4). When this node is in a stack layout, the width must be specified using CSS units (e.g. 100px or 100%).

Min Width

PropcheckboxNode.minWidth
Typestring
Defaultnone

The minimum width of the node. When this node is in a grid layout, this property is ignored.

Max Width

PropcheckboxNode.maxWidth
Typestring
Defaultnone

The maximum width of the node. When this node is in a grid layout, this property is ignored.

Height

PropcheckboxNode.height
Typestring
Default32px

The height of the node. When this node is in a grid layout, this should be done using unitless grid row units (specifying 4 will become grid-row-end: span 4). When this node is in a stack layout, the height must be specified using CSS units (e.g. 100px or 100%).

Min Height

PropcheckboxNode.minHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Max Height

PropcheckboxNode.maxHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Overflow

PropcheckboxNode.overflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal and vertical axes for content that is larger than its container.

Overflow X

PropcheckboxNode.overflowX
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal axis for content that is larger than its container.

Overflow Y

PropcheckboxNode.overflowY
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the vertical axis for content that is larger than its container.

Custom Styles

PropcheckboxNode.styles
Typestring
Defaultelement.styles { }

Custom CSS styles to be applied to the node. Use element.styles to refer to the current node.

Label

PropcheckboxNode.label
Typestring
DefaultCheck this box?

The label displayed next to the checkbox.

Field Name

PropcheckboxNode.formFieldName
Typestring
Defaultundefined

Defines the key for this input in the body of the submitted form.

Label Style

PropcheckboxNode.labelStyle
TypeCheckboxLabelStyle ('left' | 'top' | 'hidden' | 'right')
Defaultright

The display style of the label next to the checkbox.

Size

PropcheckboxNode.size
TypeCheckboxSize ('sm' | 'md' | 'lg')
Defaultmd

The size of the checkbox. Size is a measurement value like "md" and can be configured in the theme.

Value

PropcheckboxNode.value
Typeboolean
Default{{false}}

The current value of the checkbox. If checked, this will be true. If unchecked, this will be false.

Required

PropcheckboxNode.isRequired
Typeboolean
Default{{false}}

Whether or not this checkbox must be checked. This is a visual flag that updates the corresponding accessibility properties. It is up to the app developer to enforce the requirement.

Event Handlers

On Checked

HandlercheckboxNode.onChecked

Called when the checkbox is checked.

On Unchecked

HandlercheckboxNode.onUnchecked

Called when the checkbox is unchecked.