Checkbox

The b.Checkbox constructor creates a checkbox input, together with its label container.

ModifierAction
b.DisabledDisable the checkbox input
ChildAction
b.OnInput(...any)Apply children to the <input> element
b.OnLabel(...aby)Apply children to the <label> element
stringAdd to the <label> element
gomponents.Nodeof type gomponents.AttributeTypeApply attribute to the <input> element
gomponents.Nodeof type gomponents.ElementTypeAdd element to the <label> element
e.ElementAdd element to the <label> element
Anything elseApply child to the <input> element

Bulma examples

Example
Code
b.Checkbox("Remember me")
ResultHTML
Example
Code
b.Checkbox("I agree to the ", e.AHref("#", "terms and conditions"))
ResultHTML
Example
Code
b.Checkbox(b.Disabled, "Save my preferences")
ResultHTML