CreationKit Documentation

Class Checkbox

public final class Checkbox: UIControl  

A checkbox view that can be toggled on or off.

The designs show the checkbox at 16 points, however the HIGs recommends at least 44 points for controls. Instances of Checkbox should be with a height and width of at least points to conform to HIGS. The internal checkbox layout will always be rendered at 16pt.

Normal constructors, init(frame:), are not available for this type. Please use make instead.

  • Tag: Checkbox

Checkbox Checkbox UIControl UIControl Checkbox->UIControl

Conforms To




@Published public var isOn: Bool = false

True if the checkbox is set to on, otherwise false.

You can programmatically set the state of the checkbox by toggling this property. This will send a valueChanged action to the control if you wish to react on any changes.

You may either react to this via it's Publisher, or the action.


$isOn - Published.Publisher Usage

let checkbox = Checkbox.make()
  .sink { value in /* value is the new state of the checkbox */ }
  .store(in: $subscriptions)


public var togglesOnTap: Bool = true

Set to true if you want the checkbox to update on tap, otherwise set to false. Default is true.

You can use isOn to programmatically change the state fo the checkbox.


public private(set) var component: Component<CheckboxLayout>  

The component that holds the CheckBoxLayout.



public static func make(isOn: Bool = false) -> Checkbox  

Creates a new Checkbox

  • Tag: make