spacer

Inserts vertical whitespace between elements.

(Last Edited)

::spacer renders an invisible div of a fixed height. Use it to add breathing room between sections when the default paragraph spacing is not enough.

Maps to the <Spacer /> React component via the kebab-case → PascalCase directive convention.

Reference

::spacer ::spacer{size=xl}
AttributeTypeRequiredDefaultDescription
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'No'md'Amount of vertical space.
sizeHeight
xs8px
sm16px
md32px
lg48px
xl64px
2xl96px

Examples

Each example below uses a horizontal rule immediately after the spacer to make the gap visible.

xs — 8px

::spacer{size=xs}

sm — 16px

::spacer{size=sm}

md — 32px (default)

::spacer

lg — 48px

::spacer{size=lg}

xl — 64px

::spacer{size=xl}

2xl — 96px

::spacer{size=2xl}