v0.1.2
layouts

Sidebar

Fixed-width column + fluid content area. Reverts to stacking when too narrow. Zero media queries.

API Reference

SidebarProps

Extends native HTML attributes inferred from the rendered element `as`.

PropertyTypeDefaultDescription
as
ElementTag
"div"HTML element to render as.
ref $bindable
HTMLElement
Reference to the rendered DOM element.
side
union
"left"Which side the sidebar is on.
sideWidth
string
"240px"Width of the sidebar. The content area fills the remaining space.
contentMin
string
"50%"Minimum width the content area must maintain before the layout wraps to a stacked column.
gap
union
"4"Gap between the sidebar and the content area.
sidebar
Snippet
The fixed-width sidebar region.
children
Snippet
The fluid content area.
ŒŒ