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

Container

Centers page content and caps its width, so sections share one line length and side margins.

ComponentsContainer
layoutstatic
<arc-container>

Overview

Container constrains width. It centers its content with `margin-inline: auto`, caps it at the `--max-width` token (1120px by default) and adds `--space-lg` of inline padding. Use it around page sections so line lengths and side margins match across the page. `size` picks the cap: `sm` is `--max-width-sm` (720px), `md` is the default, `lg` is 1400px, `xl` is 1600px and `full` removes it. Use `sm` for articles and single-column forms. `narrow` is the same cap as `size="sm"`. It applies while `size` is left at `md`, so `narrow size="lg"` is 1400px. `padding` sets the inline padding to `none`, `sm`, `md` (the default) or `lg`. It sets only inline spacing, with logical properties, so it works in right-to-left layouts. Vertical spacing is up to the parent or a Section.

Guidelines

Do

  • Put a Container inside a Section when you need both vertical spacing and a width cap
  • Change the `--max-width` and `--max-width-sm` tokens to change widths across the site
  • Use DashboardGrid or another grid inside it for the inner layout

Don't

  • Don't nest Containers. The inline padding doubles
  • Don't override `padding-inline` with fixed pixels. Use the `padding` prop or the `--space-*` tokens
  • Don't make it a flex or grid parent. Its children are inside the inner wrapper, so `display` on the host doesn't lay them out
  • Don't use it for column structure. That's PageLayout

Features

  • Content renders inside an inner wrapper exposed as the `container` CSS part, for one-off `::part(container)` changes

Preview

Default container (max-width: var(--max-width))
Narrow container (max-width: var(--max-width-sm))

Usage

<arc-container>
  <p>Content constrained to 1120px</p>
</arc-container>

<arc-container narrow>
  <p>Content constrained to 720px</p>
</arc-container>

API

narrowbooleanfalse
Caps the width at --max-width-sm (720px by default), the same as size="sm". Applies while size is the default md; a size of lg, xl or full wins over it.
size'sm' | 'md' | 'lg' | 'xl' | 'full''md'
Controls the maximum width.
padding'none' | 'sm' | 'md' | 'lg''md'
Controls inline padding.

See also