Skip to content

MainOptions

Defined in: components/main.ts:7

Options for main.

optional attrs?: string

Defined in: components/main.ts:9

Aberdeen attr/style string applied to the outermost shell element.


optional title?: Slot

Defined in: components/main.ts:11

App/page title shown in the top bar.


optional subtitle?: Slot

Defined in: components/main.ts:13

Secondary line under the title.


optional icon?: Slot

Defined in: components/main.ts:15

Leading icon/logo in the top bar.


optional menu?: Slot

Defined in: components/main.ts:17

Action area on the right of the top bar (buttons, menu, …).


optional content?: Slot

Defined in: components/main.ts:19

The scrollable page content. A string is rendered as rich text.


optional footer?: Slot

Defined in: components/main.ts:21

Footer content, pinned below the scroll area.


optional maxWidth?: string

Defined in: components/main.ts:30

Max width for the page’s content, e.g. "60rem". The header and footer backgrounds still span the full shell width, but their contents — and the sidebar + separator + content trio (or just the content when there’s no sidebar) — cap to this width and centre horizontally. When unset, everything fills the available width. Either way the content shares the page surface — it is not boxed.


optional contentAttrs?: string

Defined in: components/main.ts:32

Aberdeen attr/style string applied to the content area.


optional topbarAttrs?: string

Defined in: components/main.ts:34

Aberdeen attr/style string applied to the top bar.


optional nav?: MenuOptions

Defined in: components/main.ts:40

Navigation menu. When provided, renders a sidebar (in "left" / "right" mode) or a button+dropdown (in "button" mode). The sidebar automatically collapses to button mode when the shell is too narrow.


optional navPosition?: "button" | "left" | "right"

Defined in: components/main.ts:47

Where to render the nav. Defaults to "left".

  • "left" / "right": sidebar next to the content area; collapses to a button+dropdown in the top bar when the shell width drops below 640 px.
  • "button": always a button+dropdown, never a sidebar.

optional navAttrs?: string

Defined in: components/main.ts:49

Aberdeen attr/style string applied to the sidebar nav panel.