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

wf

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

wf

Text("xs") Spacer.xs Text("sm") Spacer.sm Text("md") Spacer.md Text("lg") Spacer.lg Text("xl") Spacer.xl Text("end")

Props

Props of Spacer
PropTypeUnsetMeaning

size:

one of its cases

md

How tall the empty block is, from the theme's spacing scale; written as a flag, Spacer.lg. Written as a flag, .xs, or by name, size: .xs.

  • .xs: $spacing-xs, 0.25rem
  • .sm: $spacing-sm, 0.5rem
  • .md (the default): $spacing-md, 1rem (the default)
  • .lg: $spacing-lg, 1.5rem
  • .xl: $spacing-xl, 1.5–2rem, growing with the screen

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.