stnd.build

Panel

The Astro door to Panel.svelte (which is the panel). It resolves what only a page knows (the nav from the site config, the current path), passes the slots that are present, mounts the Svelte component as an island, and keeps the small script that folds a remembered panel before first paint. A Svelte host uses Panel.svelte directly.

A floating panel (.panel) supporting 4 anchor positions (position="left" | "right" | "top-center" | "bottom-center") and collapse modes (collapse="icon" | "rail" | "none"). A dock (top-center, bottom-center) is a bar and does not fold. The behaviour is ./panel.js, the look is @stnd/styles (_standard-15-application.scss).

Positions:

Collapse Modes:

Type Name Description
Array items nav entries (sorted by order).
string brand accessible name of the brand link.
string brandHref brand link target (default: “/”).
string storageKey localStorage key for folding state (default: “stnd:panel”).
string id optional element ID and key suffix.
boolean defaultFolded whether the panel starts folded (default: true).
number foldBelow start folded anyway under this screen width (px) when the person never chose.
“left” | “right” | “top-center” | “bottom-center” position viewport anchor position (default: “left”).
“left” | “right” side legacy alias for position.
“icon” | “rail” | “none” collapse minimized state behavior (default: “icon”). Ignored for a dock.
“float” | “flow” layout “float” (default): a layer over the page. “flow”: a column of the page, for an app whose content sits beside it in a flex row; left, as a rail (àVélo’s shape).
object labels the words the panel writes, for another language: nav, open, expand, collapse.
“auto” | “custom” | “none” trigger trigger button mode (default: “auto”).
string icon icon rendered in the sticky trigger and collapse toggle.
string shortcut keyboard shortcut key to toggle fold state (default: “[” for left, “]” for right, “” for center).
string width custom open width (CSS value).

Props

Type Name Description
Array<{ title: string; url: string; order?: number; group?: string; icon?: string; badge?: string | number; match?: string[]; external?: boolean; }> items? Navigation entries (sorted by order).
string brand? Accessible name of the brand link.
string brandHref? Brand link target (default: “/”).
string storageKey? localStorage key for folding state (default: “stnd:panel”).
string id? Optional unique identifier.
boolean defaultFolded? Whether the panel starts folded (default: true).
number foldBelow? Start folded anyway on a screen narrower than this (px), when the person never chose.
“left” | “right” | “top-center” | “bottom-center” position? Which viewport position the panel anchors to.
“left” | “right” side? Fallback / alias for position (“left” | “right”).
“icon” | “rail” | “none” collapse? Minimized behavior: “icon” (default), “rail”, or “none”. A dock does not fold.
“auto” | “custom” | “none” trigger? Trigger button mode: “auto” (default) renders the entry button; “custom” or “none” leave it to the host.
“float” | “flow” layout? “float” (default) lays over the page; “flow” is a column of it (left, rail).
{ nav?: string; open?: string; expand?: string; collapse?: string } labels? The words the panel writes (aria-labels, titles), for a site that is not in English.
string icon? Icon name for the sticky trigger and collapse toggle.
string shortcut? Keyboard shortcut key to toggle fold state.
string width? Custom open width (CSS value).
string class? Additional CSS class names.