EnterUI
DocsComponentsThemesExamplesDonation
Get Started
      • Container
      • Spacer
      • VStack
      • HStack
      • ZStack
      • Grid
      • LazyVGrid
      • LazyHGrid

Default usage

  1. EnterUI
  2. /Docs
  3. /Layout and Utilities
  4. /Layout Primitives
  5. /Containers
  6. /Spacer
Updated 3 October 2026

Spacer

A flexible utility to absorb remaining space inside stack-based layouts.

Spacer is useful when you want one child to push sibling content apart in a flex-based row or stack while preserving layout semantics.

#Default usage

Spacer

Fill remaining space between two labels.

Start
End
Code
<HStack align="center" fullWidth gap={8}>
  <Card><CardContent>Start</CardContent></Card>
  <Spacer />
  <Card><CardContent>End</CardContent></Card>
</HStack>

#Import

Code
import { Spacer } from "@froggdesign/enter-ui-react";

#Accessibility

Spacer is layout-only and has no semantic meaning by itself. Keep actual content semantics in child elements and use proper landmarks or labels on real content containers.

#API

  • size (optional): number or CSS size, used as flex-basis.
  • Extends standard div props.
  • className and style are forwarded.

#Styling

Spacer uses the .eui-spacer class and applies flex: 1 1 auto so it can grow inside flex containers. Use it alongside gap controls on stack primitives or regular flex layouts.

PreviousContainer
NextVStack
On this page
  • Default usage
  • Import
  • Accessibility
  • API
  • Styling