Skip to content

Spacer

Empty room: it pushes what follows to the end of a row, or keeps a fixed step of the scale between two things.

import { Spacer } from '@sypnia/ui/react'

On this page
  1. Pushing and keeping apart
  2. When to use it
  3. For everyone
  4. Props

Pushing and keeping apart

orders1,240
Code
import { Badge, Button, Spacer } from '@sypnia/ui/react';

export default function Push() {
  return (
    <div className="sy-stack" style={{ '--gap': 'var(--s-4)' } as React.CSSProperties}>
      <div className="sy-row sy-row--nowrap"><strong>orders</strong><Badge>1,240</Badge><Spacer /><Button size="sm">Export</Button></div>
      <div className="sy-row sy-row--nowrap" style={{ '--gap': 0 } as React.CSSProperties}><Button size="sm">Back</Button><Spacer size={6} /><Button size="sm" variant="primary">Continue</Button></div>
    </div>
  );
}

When to use it

Use it when

  • One item of a row must sit at the end.

Do not use it when

  • Spacing every item: use the gap of Row or Stack.

For everyone

  • Hidden from screen readers.

Props

SpacerTypeDefault
size Gap
  1. Pushing and keeping apart
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms