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

Center

Used to center its child within itself.

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

Usage

The Center pattern is used to center the content of a container.

Loading example...

Icon

Center can be used to create frames around icons or numbers.

Loading example...

Center with Inline

Use the inline to change the display to inline-flex.

Loading example...

Square

Square centers its child given the size (width and height).

Loading example...

Circle

Circle centers its child given the size and creates a circle around it.

Loading example...

Props

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

PropTypeDescription
inlinebooleanChanges the display to inline-flex.
sizestringSets the width and height of the element.

On this page

  • Import
  • Usage
    • Icon
    • Center with Inline
    • Square
    • Circle
  • Props
Edit this page on Github
This is centered
1

This will be centered