Reference

LoadingOverlay

A region covered while it is busy: aria-busy on it, its content out of reach, and a spinner with label: over it — the region, not the page.

LoadingOverlay(visible: Bool, label: String) { … }

Since 6.2.0

visible

label

Saving your profile

Example

wf

state saving = false state name = "Ada Lovelace" LoadingOverlay(visible: saving, label: "Saving your profile") { Card { Input(bind: name, label: "Name") Button("Save").primary { on click { saving = true } } } } Button("Finish saving") { on click { saving = false } }

With the default label

wf

state busy = true LoadingOverlay(visible: busy) { Card { Text("Monthly revenue") } }

Props

Props of LoadingOverlay
PropTypeUnsetMeaning

visible:

Bool (required)

—

While it holds, the region is busy: aria-busy, its content inert, a spinner and label: drawn over it; any Bool expression, read and never written. Written as a flag, .visible, or visible: true.

label:

String

Loading

What it is busy with, shown under the spinner and read by a screen reader

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.

.visible

Events

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

Slots

children

Drawn for it

What LoadingOverlay draws itself, by the class a stylesheet can select. They are not written.

Drawn for it
PartClassMeaning

LoadingOverlay.Content

—

The region.

LoadingOverlay.Cover

—

What covers it while it is busy.

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