Layout

A responsive application shell and composable semantic layout surfaces.

Layout

SLayout handles the standard application frame with named slots. It only renders the regions you provide, so the same API works for full dashboards, content pages, and settings views. Every surface uses spacing and elevation instead of dividers.

Application shell

Use the header, aside, default, and footer slots to assemble a complete page. Set aside-position="end" for a right rail. On small screens the regions stack to avoid horizontal scrolling.

Attached aside tools

Use the aside-outside slot to attach settings, language, theme, or similar actions outside the rail. SLayout forwards it to the internal SLayoutAsideoutside slot, while the aside owns the connected curve, placement, shadow, responsive fallback, and the collapse/expand control at the outer edge. The collapsed rail keeps a directional arrow visible and exposes hover and keyboard feedback. When composing SLayoutAside directly, use #outside.

Free composition

For non-standard structures, combine SLayoutContainer, SLayoutHeader, SLayoutAside, SLayoutBody, and SLayoutFooter directly. Containers support direction, gap, wrap, align, and justify, and can be nested freely. SLayoutHeader can opt into sticky positioning directly; use sticky-offset to clear an existing top navigation bar. Use the SLayoutAside outside slot for settings, language, and theme tools; the aside owns the seamless attached surface.

Slots

SlotPurpose
headerApplication header or top navigation.
asidePrimary navigation or contextual rail.
aside-outsideTools attached outside the rail; forwarded to the SLayoutAside outside slot.
defaultThe semantic main content region.
footerPage-level footer content.

When using SLayoutAside directly, provide its outside slot. The attached tool surface is only rendered when that slot exists. Both outside slots expose collapsed and toggle; use aside-outside-collapsible="false" on SLayout or outside-collapsible="false" on SLayoutAside to remove the built-in control. State changes emit update:asideOutsideCollapsed / aside-outside-collapse on SLayout and update:outsideCollapsed / outside-collapse on SLayoutAside.

API

PROPS

Property
Type
Values
Description
default
Example
More
aside-position
String
start | end
Places the aside before or after the main content.
start
—
aside-width
String | Number
CSS size
Width of the aside slot.
240
—
header-height
String | Number
CSS size
Optional fixed height for the header slot.
—
—
footer-height
String | Number
CSS size
Optional fixed height for the footer slot.
—
—
gap
String | Number
CSS size
Gap between layout surfaces.
16
—
padding
String | Number
CSS size
Padding around the application shell.
16
—
min-height
String | Number
CSS size
Minimum height of the application shell.
100%
—
responsive
Boolean
true | false
Stacks the aside and main region below 768px.
true
—
sticky-header
Boolean
true | false
Keeps the header surface visible while scrolling.
false
—
sticky-header-offset
String | Number
CSS size
Top offset of the SLayout sticky header; falls back to layout padding when omitted.
—
—
sticky-header-z-index
Number
number
Stacking level of the SLayout sticky header.
10
—
aside-outside-collapsible
Boolean
true | false
Adds the built-in collapse control to the aside-outside tool surface.
true
—
aside-outside-collapsed
Boolean
true | false
Controls the collapsed state of the SLayout attached tools.
false
—
sticky
Boolean
true | false
Enables sticky positioning on a standalone SLayoutHeader.
false
—
sticky-offset
String | Number
CSS size
Top offset of a standalone sticky SLayoutHeader.
0
—
z-index
Number
number
Stacking level of a standalone sticky SLayoutHeader.
10
—
direction
String
horizontal | vertical
SLayoutContainer flex direction.
horizontal
—
wrap
Boolean
true | false
Allows SLayoutContainer children to wrap.
false
—
align
String
start | center | end | stretch
Cross-axis alignment for SLayoutContainer.
stretch
—
justify
String
start | center | end | space-around | space-between | space-evenly
Main-axis distribution for SLayoutContainer.
start
—
size
String | Number
CSS size
Header/Footer height or Aside width.
—
—
outside-position
String
start | end
Position of the SLayoutAside outside slot relative to the rail.
end
—
outside-collapsible
Boolean
true | false
Shows the built-in collapse and expand control for the outside slot.
true
—
outside-collapsed
Boolean
true | false
Controls the collapsed state of the SLayoutAside outside slot.
false
—

EVENTS

Event
Type
Description
default
Example
More
update:asideOutsideCollapsed
Boolean
Fire when the outside aside surface is collapsed or expanded.
—
—
aside-outside-collapse
Boolean
Fire when the outside aside surface is collapsed or expanded.
—
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied