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

Wrap

Used to add space between elements and wraps automatically if there isn't enough space.

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

Usage

By default, Wrap applies display: flex, flex-wrap: wrap, and gap: 8px to its children.

Loading example...

Gap or Spacing

Pass the gap prop to apply a consistent spacing between each child, even if it wraps.

Loading example...

Alignment

Pass the align prop to change the alignment of the child along the cross axis.

Loading example...

Justify

Pass the justify prop to change the alignment of the child along the main axis.

Loading example...

Row and Column Gap

Pass the rowGap and columnGap props to apply a consistent spacing between the rows and columns.

Loading example...

Props

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

PropTypeDescription
rowGapnumber | stringGap between rows
columnGapnumber | stringGap between columns
justifyCSSProperties['justify-content']Justify content
gapnumber | stringGap between children

On this page

  • Import
  • Usage
    • Gap or Spacing
    • Alignment
    • Justify
    • Row and Column Gap
  • Props
Edit this page on Github
Box 1
Box 2
Box 3
Box 4
Box 5
Box 1
Box 2
Box 3
Box 4
Box 5