plushie/widget/checkbox

Checkbox widget builder.

Types

pub opaque type Checkbox

Custom icon for the checkbox check mark.

pub type CheckboxIcon {
  CheckboxIcon(
    code_point: String,
    size: option.Option(Float),
    line_height: option.Option(Float),
    font: option.Option(font.Font),
    shaping: option.Option(shaping.Shaping),
  )
}

Constructors

Values

pub fn a11y(cb: Checkbox, a: a11y.A11y) -> Checkbox

Set accessibility properties for this widget.

pub fn build(cb: Checkbox) -> node.Node

Build the checkbox into a renderable Node.

pub fn disabled(cb: Checkbox, d: Bool) -> Checkbox

Set whether the widget is disabled.

pub fn font(cb: Checkbox, f: font.Font) -> Checkbox

Set the font.

pub fn icon(cb: Checkbox, i: CheckboxIcon) -> Checkbox

Set a custom icon.

pub fn line_height(cb: Checkbox, h: Float) -> Checkbox

Set the line height.

pub fn new(
  id: String,
  label: String,
  is_toggled: Bool,
) -> Checkbox

Create a new checkbox builder.

pub fn shaping(cb: Checkbox, s: shaping.Shaping) -> Checkbox

Set the text shaping strategy.

pub fn size(cb: Checkbox, s: Float) -> Checkbox

Set the size.

pub fn spacing(cb: Checkbox, s: Int) -> Checkbox

Set the spacing between children.

pub fn style(cb: Checkbox, s: String) -> Checkbox

Set the style.

pub fn text_size(cb: Checkbox, s: Float) -> Checkbox

Set the text size in pixels.

pub fn width(cb: Checkbox, w: length.Length) -> Checkbox

Set the width.

pub fn wrapping(cb: Checkbox, w: wrapping.Wrapping) -> Checkbox

Set the text wrapping mode.

Search Document