Spacer

Spacer is a component used to add space between components.

Storybook@nextui-org/spacerServer componentSourceStyles source
Zigma by NextUI (YC S24) - Connect your design files to production code in minutes | Product Hunt

We're live on Product Hunt! Join the conversation and help us get to #1 Product of the day 🚀


Installation

npx nextui-cli@latest add spacer
The above command is for individual installation only. You may skip this step if @nextui-org/react is already installed globally.

Import

Usage

Note: The x and y values are based on Tailwind Spacing Scale

API

Spacer Props

AttributeTypeDescriptionDefault
xSpaceThe x axis space1
ySpaceThe y axis space1

Spaces

type Space = 0 | "px" | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;