Reference

Progress

Progress bar; a value that reads state moves with it.

Progress(value: Number, max: Number)

Before 5.0

max

Sending invitations: 3 of 8

Example

wf

state sent = 3 Stack(gap: .sm) { Text("Sending invitations: {sent} of 8") Progress(value: sent, max: 8) Button("Send one more") { on click { sent = if sent < 8 { sent + 1 } else { 0 } } } }

Out of a hundred

wf

Progress(value: 64, max: 100)

Props

Props of Progress
PropTypeUnsetMeaning

value:

Number

none: indeterminate

How far along, out of max:; unset, the bar shows activity with no amount (indeterminate); a value that reads state follows it

max:

Number

1

The value at which the bar is full (the native <progress>'s max); with it unset value: is a fraction of 1

Attribute families: global, aria, data. Plus the 22 universal props every element takes: animate:, exit:, speed:, duration:, delay:, easing:, stagger:, on:, count:, shared:, class:, ref:, drag:, dragGroup:, dropValue:, dropAxis:, dropInside:, roving:, trapFocus:, mount:, update:, cleanup:.

Flags and cases

A flag is written after the parentheses with a dot: a Bool prop, or a case of one of the element's enum props. A case the enum lacks is an error with a hint.

No flags of its own.

Events

Every element also takes the props, the events and the attribute families listed on every element.

Slots

It takes no slots.

Renders with the class wf-progress, stable across releases, so a stylesheet may target it.