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

Split Pane

Resizable split layout with two panes.

ComponentsSplit Pane
layoutinteractive
<arc-split-pane>

Overview

SplitPane divides its container into two panes with a handle between them. Use it when the reader should decide how two panes share the space. `orientation="horizontal"` puts the panes side by side, and `vertical` stacks them. `ratio` sets the primary pane's share, from 0 to 1. Dragging the handle, or pressing the arrow keys, Home or End on it, changes the ratio, and `min-ratio` and `max-ratio` (0.15 and 0.85 by default) stop either pane from collapsing. `arc-resize` fires each time the ratio changes, with the new ratio in `detail.ratio`. A key press at a limit changes nothing and fires nothing. The `primary` slot gets the ratio's share, and `secondary` fills the rest. Each pane scrolls on its own (`overflow: auto`).

Guidelines

Do

  • Use it for editor and preview, list and detail, or tree and content layouts
  • Keep `min-ratio` at 0.15 or more and `max-ratio` at 0.85 or less (the defaults) so both panes stay usable
  • Save the ratio from `arc-resize` to keep the reader's layout. It fires on every drag step, so debounce the write
  • Give the parent a set height, such as `100vh` or `flex: 1`. SplitPane takes 100% of it
  • Use `orientation="vertical"` for top and bottom splits, such as a console under an editor

Don't

  • Don't use it for a fixed two-column layout. Use PageLayout with `sidebar-left` or `sidebar-right`
  • Don't set `min-ratio` and `max-ratio` so close together that the handle barely moves
  • Don't put controls the reader needs in the secondary pane if `max-ratio` lets it get too narrow to show them

Features

  • The handle is a 4px bar that turns `--border-bright` on hover and during a drag
  • Text selection is off while the handle is being dragged

Preview

File tree
src/ index.ts utils.ts types.ts package.json
Select a file to view its contents

Usage

This component needs JavaScript. Use the Web Component or a framework wrapper.

<arc-split-pane orientation="horizontal" ratio="0.4">
  <div slot="primary">Primary pane</div>
  <div slot="secondary">Secondary pane</div>
</arc-split-pane>

API

STEPnumber0.05
Keyboard step, and the larger Shift step: the same 5-and-20 as arc-resizable.
STEP_LARGEnumber0.2
labelstring''
Accessible name for the divider, applied as aria-label. Defaults to "Resize panes".
orientation'horizontal' | 'vertical''horizontal'
Controls the split direction. Horizontal places panes side by side with a vertical divider. Vertical stacks panes top and bottom with a horizontal divider.
rationumber0.5
The proportion of space allocated to the primary pane, clamped to minRatio..maxRatio on every path, including assignment from script. From 0 to 1. A value of 0.4 gives the primary pane 40% of the available width (or height in vertical mode).
minRationumber0.15
Minimum allowed ratio. The divider cannot be dragged below this value, preventing the primary pane from collapsing.
maxRationumber0.85
Maximum allowed ratio. The divider cannot be dragged above this value, preventing the secondary pane from collapsing.

Events

arc-resizedetail:{ value: number, ratio: number }
Fired on every step of a divider drag and on every keyboard step, with the new ratio on both detail.value and detail.ratio.

See also