Reference
Spacer
Vertical space; md when no size is given.
Spacer(size: Enum)
Before 5.0
size
Before you deploy
Run the checks, then the tests.
Last deployed 3 hours ago.
Example
Heading("Before you deploy").h3
Text("Run the checks, then the tests.")
Spacer.lg
Button("Deploy").primary
Spacer.sm
Text("Last deployed 3 hours ago.").muted.sm
Every size
Text("xs")
Spacer.xs
Text("sm")
Spacer.sm
Text("md")
Spacer.md
Text("lg")
Spacer.lg
Text("xl")
Spacer.xl
Text("end")
Props
| Prop | Type | Unset | Meaning |
|---|---|---|---|
size: | one of its cases | md | How tall the empty block is, from the theme's spacing scale; written as a flag,
|
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.
.xs
.sm
.md
.lg
.xl
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-spacer, stable across releases, so a stylesheet may target it.