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

Flex

Used to manage flex layouts as an alternative to HStack and VStack.

  • 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 { Flex } from 'styled-system/jsx'

Usage

Used to manage flex layouts

Loading example...

Direction

Use the direction or flexDirection prop to change the direction of the flex

Loading example...

Align

Use the align or alignItems prop to align the children along the cross axis.

Loading example...

Justify

Use the justify or justifyContent prop to align the children along the main axis.

Loading example...

Order

Use the order prop to change the order of the children.

Loading example...

Auto Margin

Apply margin to a flex item to push it away from its siblings.

Loading example...

Wrap

Use the wrap or flexWrap prop to wrap the children when they overflow the parent.

Loading example...

Props

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

PropTypeDescription
alignSystemStyleObject['alignItems']The alignment of the children along the cross axis.
directionSystemStyleObject['flexDirection']The flex direction.
justifySystemStyleObject['justifyContent']The alignment of the children along the main axis.
wrapSystemStyleObject['flexWrap']The wrapping behavior of the children.
basisSystemStyleObject['flexBasis']The flex behavior of the children.
growSystemStyleObject['flexGrow']The flex grow behavior of the children.
shrinkSystemStyleObject['flexShrink']The flex shrink behavior of the children.

On this page

  • Import
  • Usage
    • Direction
    • Align
    • Justify
    • Order
    • Auto Margin
    • Wrap
  • Props
Edit this page on Github
flex-start
center
flex-end
space-between
1
2
3