Getting StartedComponentsDesign TokensThemingTheme SynthesizerFrameworksAccessibilityUtilitiesServer RenderingBrowser SupportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting StartedFrameworksServer RenderingDesign TokensThemingTheme SynthesizerTypographyUtilitiesAll ComponentsAccessibilityBrowser SupportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Center

Content centering primitive with max-width, intrinsic centering, and text-center options.

ComponentsCenter
layoutstatic
<arc-center>

Overview

Center is a layout primitive that horizontally centers its children within the available space. By default it applies `margin-inline: auto` with a configurable `max-width`, the standard block-level pattern for keeping a content column centered at a readable width. The `intrinsic` prop switches to intrinsic centering mode, which uses `display: flex` with `align-items: center` and `justify-content: center` to center children based on their natural (intrinsic) size rather than stretching them to the max-width. Use it for buttons, icons, or short labels that should not stretch to fill a column. The `text` prop adds `text-align: center` for centering inline text content within the block. The three modes (block, intrinsic, and text centering) can be combined, which covers most centering cases without custom CSS.

Guidelines

When to use

  • Use default mode for centering page content columns with a max-width
  • Use intrinsic mode for centering buttons, icons, or small elements by their natural width
  • Use text mode for centering heading text or short descriptive paragraphs
  • Combine intrinsic and text modes for centered call-to-action sections
  • Override max-width to match your layout needs (e.g. "480px" for narrow forms)

When not to use

  • Do not use Center as a substitute for Container. Container adds padding; Center only centers
  • Do not use Center for vertical centering; it handles horizontal centering only
  • Do not apply Center to elements that should be full-width (like navigation bars)
  • Do not set max-width to 100%, which makes the centering constraint meaningless
  • Do not nest multiple Centers; a single Center wrapper is enough

Features

  • Block-level centering with `margin-inline: auto` and configurable `max-width`
  • Intrinsic centering mode with flexbox for natural-width children
  • Text centering mode with `text-align: center` for inline content
  • Configurable max-width via the `max-width` prop (defaults to --max-width token)
  • Modes can be combined: intrinsic + text for centered buttons with centered labels
  • Pure CSS, with no JavaScript
  • CSS part: `center` for targeted ::part() styling

Preview

Block centering — max-width: 280px
Intrinsic centering
Text centering — text-align: center

Usage

<!-- Block centering with max-width -->
<arc-center max-width="720px">
  <h2>Centered Heading</h2>
  <p>This content is constrained to 720px and centered on the page.</p>
</arc-center>

<!-- Intrinsic centering for a button -->
<arc-center intrinsic>
  <arc-button>Centered Button</arc-button>
</arc-center>

<!-- Text centering -->
<arc-center text>
  <p>This text is centered within the full-width block.</p>
</arc-center>

API

max-widthstring'60ch'
Maximum width for the centered content block. Accepts any CSS length or custom property. Only applies in default (block) centering mode.
intrinsicbooleanfalse
Enables intrinsic centering mode using flexbox, which centers children based on their natural width rather than stretching to max-width.
textbooleanfalse
Adds text-align: center for centering inline text content within the block.

See Also