Skip to content

Layout Panel

@astryxdesign/core v0.7.1 · LayoutPanel

Props ​

PropTypeDefaultDescription
hasDividerbooleanfalseDraws a rule on the edge that faces the content. Leave it off when an adjacent ResizeHandle already draws a line on that edge.
isScrollablebooleantrueScrolls the panel when its content is taller than the panel.
labelstring—Accessible name for the landmark element.
paddingSpacingStep—Internal padding using the spacing scale. Overrides the padding the surrounding layout passes down. 0 makes the panel full bleed.
resizableLayoutResizable—The props object from useResizable. When it is given, the hook owns the width and width is ignored. Place a ResizeHandle next to the panel and give it the same object. The object carries the region's axis as _direction ('horizontal' | 'vertical'), which must match the handle's direction. Only _size is required, so a hand-built { _size: 250 } still works.
rolestring—ARIA landmark role, for example navigation.
widthnumber | string—Panel width. Numbers are pixels, strings are used as they are. Ignored when resizable is given.

SpacingStep accepts these values:

ts
type SpacingStep = 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10

Slots ​

  • default: the panel content.

Template ref ​

LayoutPanel exposes element. Its type is HTMLDivElement | null.

Native attributes ​

The root element receives HTML attributes, aria-* attributes, data-* attributes, class, and style. class is merged with the component's own classes.