• Docs
    • Components
    • Storybook
    • Figma
    • Theme
    Getting Started
  • Introduction
  • Design Principles
  • Installation
  • Routing
    Updated
  • Forms
  • Tailwind v4
    New
  • Figma
    Frameworks
  • Next.js
  • Vite
  • Remix
  • Astro
  • Laravel
    Customization
  • Theme
  • Layout
  • Colors
  • Customize theme
  • Create theme
  • Dark mode
  • Override styles
  • Custom variants
    Components
  • Accordion
  • Autocomplete
  • Alert
  • Avatar
  • Badge
  • Breadcrumbs
  • Button
  • Calendar
  • Card
  • Checkbox
  • Checkbox Group
  • Chip
  • Circular Progress
  • Code
  • Date Input
  • Date Picker
  • Date Range Picker
  • Divider
  • Dropdown
  • Drawer
  • Form
  • Image
  • Input
    Updated
  • Input OTP
  • Input Tags
  • Input Mask
  • File Upload
  • Kbd
  • Link
  • Listbox
  • Modal
  • Navbar
  • Number Input
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Range Calendar
  • Scroll Shadow
  • Select
    Updated
  • Select With Query
  • Skeleton
  • Scrollbar
  • Slider
    Updated
  • Snippet
  • Spacer
  • Spinner
  • Switch
  • Table
    Updated
  • Data Table
  • Tabs
  • Toast
    Updated
  • Textarea
  • Time Input
  • Tooltip
  • Truncate
  • User
    API References
  • HeroUIProvider

Spacer

Spacer is a component used to add space between components.

Storybook@heroui/spacerServer componentSourceStyles source

Installation

The above command is for individual installation only. You may skip this step if @heroui/react is already installed globally.

Import

Usage

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

API

Spacer Props

PropTypeDefault
x
Space
"1"
y
Space
"1"

Types

SnippetSpinner
Edit this page on GitHub

On this page

  • Installation
  • Import
  • Usage
  • API
  • Spacer Props
  • Types

  • Back to top
docs left background
docs right background

© 2025 All rights reserved.