plushie/widget/progress_bar

ProgressBar widget builder.

Types

Option type for progress bar properties.

pub type Opt {
  Width(length.Length)
  Height(Float)
  Style(String)
  Vertical(Bool)
  Label(String)
  A11y(a11y.A11y)
}

Constructors

pub opaque type ProgressBar

Values

pub fn a11y(pb: ProgressBar, a: a11y.A11y) -> ProgressBar

Set accessibility properties for this widget.

pub fn build(pb: ProgressBar) -> node.Node

Build the progress bar into a renderable Node.

pub fn height(pb: ProgressBar, h: Float) -> ProgressBar

Set the height.

pub fn label(pb: ProgressBar, l: String) -> ProgressBar

Set the label text.

pub fn new(
  id: String,
  range: #(Float, Float),
  value: Float,
) -> ProgressBar

Create a new progress bar builder.

pub fn style(pb: ProgressBar, s: String) -> ProgressBar

Set the style.

pub fn value_animated(
  pb: ProgressBar,
  animation: node.PropValue,
) -> ProgressBar

Set value to an animation descriptor (Transition, Spring, or Sequence). The descriptor must be pre-encoded via its module’s encode function.

pub fn vertical(pb: ProgressBar, v: Bool) -> ProgressBar

Set whether the progress bar is vertical.

pub fn width(pb: ProgressBar, w: length.Length) -> ProgressBar

Set the width.

pub fn with_opts(pb: ProgressBar, opts: List(Opt)) -> ProgressBar

Apply a list of options to a progress bar builder.

Search Document