NUI / Components / Input
CheckBox
CheckBox renders a boolean check input.
Supported as a boolean input component.
Overview
CheckBox renders a boolean check input.
When to use
- On/off settings.
- Toggles that should read as a checkbox.
- Boolean form choices.
Children
Does not support children.
Basic syntax
CheckBox EnableShadows {
checked: true
}Supported properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
checked | bool | No | false | Initial checked state. |
enabled | bool | No | true | Whether the checkbox can be used. |
focusable | bool | No | true | Whether the checkbox can receive focus. |
checkColor | color | No | Default | Check mark color. |
checkedColor | color | No | Default | Checked background color. |
backgroundColor | color | No | Default | Normal background color. |
hoveredColor | color | No | Default | Hover color. |
disabledColor | color | No | Default | Disabled color. |
borderColor | color | No | Default | Border color. |
borderThickness | number | No | 0 | Border thickness. |
radius | number | No | 0 | Corner radius. |
width | number | No | Auto | Desired width. |
height | number | No | Auto | Desired height. |
opacity | number | No | 1 | Render opacity. |
visible | bool | No | true | Visibility flag. |
Contextual properties
Contextual property rules
CheckBox may receive stack, canvas, grid, wrap, or ExpandableArea slot properties only when it is authored as a direct child of the matching parent. See section 7.
Full syntax example
CheckBox EnableShadows {
checked: true
enabled: true
focusable: true
checkColor: "#FFFFFF"
checkedColor: "#275DAD"
backgroundColor: "#111827"
hoveredColor: "#1F2937"
disabledColor: "#4B5563"
borderColor: "#64748B"
borderThickness: 1
radius: 3
width: 24
height: 24
opacity: 1
visible: true
}Limitations
- CheckBox does not support child labels. Use a Row with CheckBox and Text for labeled controls.