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
Example
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
state busy = true
LoadingOverlay(visible: busy) {
Card { Text("Monthly revenue") }
}
Props
| Prop | Type | Unset | Meaning |
|---|---|---|---|
visible: | Bool (required) | — | While it holds, the region is busy: |
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.
| Part | Class | Meaning |
|---|---|---|
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.