EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
Layout·component·@astryxdesign/core

Layout Panel

Sidebar for navigation, settings, or inspector panels.

Open in Playground @astryxdesign/core/Layout

Showcases and examples

2 documented examples

Layout Panel

LayoutPanel is a sidebar slot within a Layout, used for navigation, detail views, or secondary content alongside the main content area.

Preview loads on approachPreview loads on approach
Exact source · layout-panel-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {
  Layout,
  LayoutPanel,
  LayoutContent,
  LayoutHeader,
  LayoutFooter,
  Card,
} from '@astryxdesign/core/Layout';
import {Center} from '@astryxdesign/core/Center';
import {List, ListItem} from '@astryxdesign/core/List';

export default function LayoutPanelShowcase() {
  return (
    <Center width={400}>
      <Layout
        style={{width: '100%'}}
        height="fill"
        header={
          <LayoutHeader hasDivider>
            <Card variant="muted" />
          </LayoutHeader>
        }
        start={
          <LayoutPanel hasDivider width={140} role="navigation">
            <List>
              <ListItem label="Overview" isSelected />
              <ListItem label="Analytics" />
              <ListItem label="Reports" />
              <ListItem label="Settings" />
            </List>
          </LayoutPanel>
        }
        content={
          <LayoutContent>
            <Card variant="muted" />
          </LayoutContent>
        }
        footer={
          <LayoutFooter hasDivider>
            <Card variant="muted" />
          </LayoutFooter>
        }
      />
    </Center>
  );
}

Usage

Sidebar for navigation, settings, or inspector panels.

Typed props

PropType and behavior
childrenReactNode
Panel content.
hasDividerboolean · default false
Border on the appropriate edge.
padding0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10
Internal padding using the spacing scale. Overrides the default padding from the layout container.
isScrollableboolean · default true
Enable scrollable overflow.
labelstring
Accessible label for the landmark element.
roleAriaRole
ARIA landmark role.
widthnumber | string
Width of the panel. Numbers are treated as pixels, strings are used as-is. Ignored when resizable is provided; the hook controls width.
resizableResizableProps
Resize props from useResizable(). When provided, the hook drives the panel width and a ResizeHandle should be placed adjacent to the panel. Carries the region's axis ('horizontal' | 'vertical'), which must match the adjacent ResizeHandle's direction.