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.
| Prop | Type | Default | Description |
|---|---|---|---|
children* | ReactNode | — | Undocumented — add TSDoc to the prop in the library. |
showAdminToggle | boolean | true | Undocumented — add TSDoc to the prop in the library. |
hideAdminToolbar | boolean | false | Undocumented — add TSDoc to the prop in the library. |
actions | ReactNode | — | 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. |
showEditButton | boolean | false | Undocumented — add TSDoc to the prop in the library. |
editButtonLabel | string | — | Undocumented — add TSDoc to the prop in the library. |
onAdd | () => void | — | Undocumented — add TSDoc to the prop in the library. |
showAddButton | boolean | false | Undocumented — add TSDoc to the prop in the library. |
addButtonLabel | string | — | Undocumented — add TSDoc to the prop in the library. |
addButtonIcon | React.ReactNode | — | Undocumented — add TSDoc to the prop in the library. |
hidePreview | boolean | false | Undocumented — add TSDoc to the prop in the library. |
hideShare | boolean | false | Undocumented — add TSDoc to the prop in the library. |
onSettings | () => void | — | Undocumented — add TSDoc to the prop in the library. |
settingsMode | boolean | false | Settings mode props — transforms AdminToolbar into settings header |
settingsTitle | string | — | 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. |
settingsDirty | boolean | false | Undocumented — add TSDoc to the prop in the library. |
editorMode | boolean | false | Editor mode — replaces toolbar contents with text editor controls + Save/Cancel |
editorProps | AdminToolbarEditorProps | — | Undocumented — add TSDoc to the prop in the library. |
title | ReactNode | — | Mobile-only: page title shown in the AdminToolbar |
mobileExtraItems | ReactNode | — | 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.