DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Concepts

OverviewCompositionCerberus ContextTesting

Layout

Aspect RatioBleedBoxCenterContainerContainer QueryDividerFlexFloatGridGroupLink OverlayScrollableStackWrap

Components

AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTA ModalDate PickerDialogFieldFieldsetFile UploaderIconButtonInputLoading StatesMarqueeMenuNotificationsNumber InputPaginationPin InputPopoverProgress IndicatorsPrompt ModalRadioRatingSelectSliderSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

Utilities

Client OnlyDownload TriggerEnvironmentFeature FlagsFocus TrapForFormat ByteFormat NumberFormat Relative TimeFormat Relative TimeFrameHighlightJSON Tree ViewLocalePortalPresenceShowSwapsplitPropsTheme

Stack

Used to layout its children in a vertical or horizontal stack.

  • Panda
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

Import

import { Stack, HStack, VStack } from 'styled-system/jsx'

Usage

By default, Stack applies flex-direction: column and gap: 8px to its children.

Loading example...

Horizontal

Use the direction prop to change the direction of the stack.

Loading example...

HStack

Alternatively, you can use the HStack to create a horizontal stack and align its children horizontally.

Loading example...

VStack

Use the VStack to create a vertical stack and align its children vertically.

Loading example...

Responsive Direction

Loading example...

Props

The Stack component accepts the following utility props in addition to style and factory props:

PropTypeDescription
direction'row' | 'column' | ResponsiveValueThe direction of the stack.
gapCerberusSpacingThe gap between the stack items.
alignCSSProperties['align-items']The alignment of the stack items.
justifyCSSProperties['justify-content']The justification of the stack items.

On this page

  • Import
  • Usage
    • Horizontal
    • HStack
    • VStack
  • Responsive Direction
  • Props
Edit this page on Github