EEnterUI
DocsComponentsThemesDonation
Get Started
      • Container
      • Spacer
      • VStack
      • HStack
      • ZStack
      • Grid
      • LazyVGrid
      • LazyHGrid
EnterUIDocsLayout UtilitiesLayout PrimitivesContainersSpacer
Layout UtilitiesUpdated 6 May 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

  1. Default usage
  2. Import
  3. Accessibility
  4. API
  5. Styling