plushie/widget/radio

Radio button widget builder.

Types

Option type for radio properties.

pub type Opt {
  Group(String)
  Spacing(Int)
  Width(length.Length)
  Size(Float)
  TextSize(Float)
  Font(font.Font)
  LineHeight(line_height.LineHeight)
  Shaping(shaping.Shaping)
  Wrapping(wrapping.Wrapping)
  Style(String)
  A11y(a11y.A11y)
}

Constructors

pub opaque type Radio

Values

pub fn a11y(r: Radio, a: a11y.A11y) -> Radio

Set accessibility properties for this widget.

pub fn build(r: Radio) -> node.Node

Build the radio into a renderable Node.

pub fn font(r: Radio, f: font.Font) -> Radio

Set the font.

pub fn group(r: Radio, g: String) -> Radio

Set the radio button group name.

pub fn line_height(r: Radio, lh: line_height.LineHeight) -> Radio

Set the line height.

pub fn new(
  id: String,
  value: String,
  selected: option.Option(String),
  label: String,
) -> Radio

Create a new radio builder.

pub fn shaping(r: Radio, s: shaping.Shaping) -> Radio

Set the text shaping strategy.

pub fn size(r: Radio, s: Float) -> Radio

Set the size.

pub fn spacing(r: Radio, s: Int) -> Radio

Set the spacing between children.

pub fn style(r: Radio, s: String) -> Radio

Set the style.

pub fn text_size(r: Radio, s: Float) -> Radio

Set the text size in pixels.

pub fn width(r: Radio, w: length.Length) -> Radio

Set the width.

pub fn with_opts(r: Radio, opts: List(Opt)) -> Radio

Apply a list of options to a radio builder.

pub fn wrapping(r: Radio, w: wrapping.Wrapping) -> Radio

Set the text wrapping mode.

Search Document