Skip to content
CraftDocs
GitHub
Home
Home
Changelog
What's New
Guide
Guide
Getting Started
Principles
Styling Components
Theme System
Foundations
All Tokens
Color
Elevation
Icons
Motion
Shape
Spacing
Typography
Libraries
Libraries
@xds/cli
@xds/core
Themes
Themes
Theme: daily
Default Theme
Theme: matcha
Neutral Theme
Components
Components
AppShell
AspectRatio
Avatar
Avatar
AvatarStatusDot
Badge
Banner
Breadcrumbs
BreadcrumbItem
Breadcrumbs
Button
Button
IconButton
ToggleButton
ToggleButtonGroup
Calendar
Card
Carousel
Chat
ChatComposer
ChatComposerDrawer
ChatComposerInput
ChatComposerTokenElement
ChatDictationButton
ChatLayout
ChatLayoutScrollButton
ChatMessage
ChatMessageBubble
ChatMessageList
ChatMessageMetadata
ChatSendButton
ChatSystemMessage
ChatTokenizedText
ChatToolCalls
Checkbox
CheckboxInput
CheckboxList
CheckboxListItem
ClickableCard
Code
CodeBlock
Collapsible
Collapsible
CollapsibleGroup
useXDSCollapsible
CommandPalette
CommandPalette
CommandPaletteEmpty
CommandPaletteFooter
CommandPaletteGroup
CommandPaletteInput
CommandPaletteItem
CommandPaletteList
DateInput
Dialog
AlertDialog
Dialog
DialogHeader
useXDSImperativeAlertDialog
useXDSImperativeDialog
Divider
DropdownMenu
DropdownMenu
DropdownMenuDivider
DropdownMenuItem
DropdownMenuItemData
DropdownMenuSection
EmptyState
Field
Field
FieldLabel
FieldStatus
Heading
HoverCard
Icon
Kbd
Layout
Center
FormLayout
Grid
GridSpan
HStack
Layout
LayoutContainer
LayoutContent
LayoutFooter
LayoutHeader
LayoutPanel
Section
StackItem
VStack
Link
List
List
ListItem
Markdown
MetadataList
MetadataList
MetadataListItem
MobileNav
MoreMenu
NavIcon
NavMenuItem
NumberInput
OverflowList
Pagination
Popover
PowerSearch
ProgressBar
Radio
RadioList
RadioListItem
Resizable
ResizeHandle
useXDSResizable
SegmentedControl
SegmentedControl
SegmentedControlItem
SelectableCard
Selector
MultiSelector
Selector
SelectorOption
SideNav
SideNav
SideNavCollapseButton
SideNavHeading
SideNavItem
SideNavSection
Skeleton
Slider
Spinner
StatusDot
Switch
Table
BaseTable
Table
TableCell
TableHeaderCell
TableRow
useXDSTableColumnSettings
useXDSTablePagination
useXDSTableSelection
useXDSTableSelectionState
useXDSTableSortable
Tabs
Tab
TabList
TabMenu
Text
TextArea
TextInput
Thumbnail
TimeInput
Timestamp
Toast
Toast
useXDSToast
Token
Tokenizer
Toolbar
Tooltip
TopNav
TopNav
TopNavHeading
TopNavItem
TopNavMegaMenu
TopNavMegaMenuFeaturedCard
TopNavMegaMenuItem
TopNavMenu
TreeList
Typeahead
BaseTypeahead
Typeahead
TypeaheadItem
useXDSHoverCard
useXDSPopover
useXDSTooltip
Utilities
Utilities
LinkProvider
MediaTheme
SyntaxTheme
Theme
useClickableContainer
useEntryAnimation
useFocusTrap
useGridFocus
useImageMode
useInputContainer
useListFocus
useMediaQuery
useOverflow
useScrollLock
useScrollOverflow
useXDSLayer
useXDSStreamingText
Terms of UsePrivacy Policy
Type to search
↑↓Navigate↵SelectEscClose
Layout@xds/core v0.0.13 · XDSLayout

Usage

Layout provides composable components for building structured page shells with header, sidebar, content, and footer slots. Use XDSLayout for full app layouts and XDSHStack/XDSVStack for simple directional stacking.
ts
import {XDSLayout} from '@xds/core/Layout'

Best practices

GuidancePractices
DoUse XDSLayout for page shells that need distinct zones like header, sidebar(s), content, and footer.
DoUse XDSHStack and XDSVStack for simple directional stacking within a content area.
Don'tUse XDSLayout for simple stacking layouts — use XDSHStack or XDSVStack instead.
Don'tNest multiple XDSLayout components — use one per page shell and compose content within its slots.

Sub-components

Layout is a compound component with 9 sub-components.

XDSHStack

Horizontal stack that arranges children left-to-right.

XDSLayout

Page shell with header, sidebar(s), content, and footer slots for building full app layouts.
PropTypeDescription
content
ReactNodeMain content area (center).
header
ReactNodeHeader slot.
footer
ReactNodeFooter slot.
start
ReactNodeStart panel (left in LTR).
end
ReactNodeEnd panel (right in LTR).
height
'fill' | 'auto' (default: 'fill')Height behavior — fill the container or grow with content.

XDSLayoutContainer

Primitive component that sets CSS variables for padding, used as the base for XDSCard and XDSSection.

XDSLayoutContent

Scrollable main content area.
PropTypeDescription
children
ReactNodeContent.
isScrollable
boolean (default: true)Enable scrollable overflow.
label
stringAccessible label for the landmark element.
role
AriaRoleARIA landmark role.

XDSLayoutFooter

Bottom bar for action bars, pagination, and status bars.
PropTypeDescription
children
ReactNodeFooter content.
hasDivider
boolean (default: false)Border at top edge.
height
number | stringFooter height.
label
stringAccessible label for the landmark element.
role
AriaRoleARIA landmark role.

XDSLayoutHeader

Top bar for page titles, app bars, and toolbars.
PropTypeDescription
children
ReactNodeHeader content.
hasDivider
boolean (default: false)Border at bottom edge.
height
number | stringHeader height.
label
stringAccessible label for the landmark element.
role
AriaRoleARIA landmark role.

XDSLayoutPanel

Sidebar for navigation, settings, or inspector panels.
PropTypeDescription
children
ReactNodePanel content.
hasDivider
boolean (default: false)Border on the appropriate edge.
isScrollable
boolean (default: true)Enable scrollable overflow.
label
stringAccessible label for the landmark element.
role
AriaRoleARIA landmark role.

XDSStackItem

Stack item with fill and alignment control for use inside XDSHStack or XDSVStack.

XDSVStack

Vertical stack that arranges children top-to-bottom.

Examples

Common configurations, variations, and states.
Layout — Basic Card
A card layout with header, scrollable content area, and footer with action buttons.
Layout — Content Only
A minimal layout with just a content area inside a card, without header or footer.
Layout — Content Width
A layout using contentWidth to constrain and center content while keeping dividers full-bleed.
Layout — Dual Panel
A file browser style layout with start panel for folders, main content for files, and end panel for details.
Layout — Full Bleed Content
A layout where content extends edge-to-edge with zero padding, ideal for tables or images.
Layout — Sidebar Navigation
A settings page layout with a navigation sidebar panel, content area, header, and footer.