Skip to content

Application shell

Main layout

The shell that arranges left navigation, the admin or member sidebar, the admin toolbar, and page content for every creator space route.
Available
Ports as-is

All variants

Every variant this component declares, rendered together in one frame from its maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.

Main layout

Rendered live from Storybook

Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.

Props

The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.

PropTypeDefaultDescription
children*ReactNode—Undocumented — add TSDoc to the prop in the library.
showAdminTogglebooleantrueUndocumented — add TSDoc to the prop in the library.
hideAdminToolbarbooleanfalseUndocumented — add TSDoc to the prop in the library.
actionsReactNode—Undocumented — add TSDoc to the prop in the library.
onRefresh() => void—Undocumented — add TSDoc to the prop in the library.
skeletonVariant"table" | "cards" | "analytics" | "posts" | "default""default"Undocumented — add TSDoc to the prop in the library.
onEditPage() => void—Undocumented — add TSDoc to the prop in the library.
showEditButtonbooleanfalseUndocumented — add TSDoc to the prop in the library.
editButtonLabelstring—Undocumented — add TSDoc to the prop in the library.
onAdd() => void—Undocumented — add TSDoc to the prop in the library.
showAddButtonbooleanfalseUndocumented — add TSDoc to the prop in the library.
addButtonLabelstring—Undocumented — add TSDoc to the prop in the library.
addButtonIconReact.ReactNode—Undocumented — add TSDoc to the prop in the library.
hidePreviewbooleanfalseUndocumented — add TSDoc to the prop in the library.
hideSharebooleanfalseUndocumented — add TSDoc to the prop in the library.
onSettings() => void—Undocumented — add TSDoc to the prop in the library.
settingsModebooleanfalseSettings mode props — transforms AdminToolbar into settings header
settingsTitlestring—Undocumented — add TSDoc to the prop in the library.
onSettingsSave() => void—Undocumented — add TSDoc to the prop in the library.
onSettingsClose() => void—Undocumented — add TSDoc to the prop in the library.
settingsDirtybooleanfalseUndocumented — add TSDoc to the prop in the library.
editorModebooleanfalseEditor mode — replaces toolbar contents with text editor controls + Save/Cancel
editorPropsAdminToolbarEditorProps—Undocumented — add TSDoc to the prop in the library.
titleReactNode—Mobile-only: page title shown in the AdminToolbar
mobileExtraItemsReactNode—Mobile-only: extra menu items for the AdminToolbar ellipsis

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/layout/MainLayout.tsx
Portability
Copies across unchanged — only the utils import path moves.
Variants
skeletonVariant: table | cards | analytics | posts | default
Notes
Wrap creator space pages in this layout to get consistent nav, sidebar, and toolbar behavior; it switches between admin and member sidebars based on view mode, renders a preview shell for unauthenticated visitors, and shows a content skeleton while the space is loading.