Skip to content

Application shell

Space sidebar

SpaceSidebar — exported from the library at `src/components/layout/SpaceSidebar.tsx`. Awaiting a written description.
Available
Ports as-is

Examples

Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.

Space sidebar

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
isOpen*boolean—Undocumented — add TSDoc to the prop in the library.
onToggle*() => void—Undocumented — add TSDoc to the prop in the library.
onAddLayerRefReact.MutableRefObject<(() => void) | null>—Imperative handle: parent can call this to open the Add Layer modal
onCreateSubspaceRefReact.MutableRefObject<(() => void) | null>—Imperative handle: parent can call this to open the Create Subspace modal
isMobileMenuHomebooleanfalseWhen true, the sidebar acts as the mobile home menu page (hides the close X).
shouldWarnOnExternalLink(url: string) => boolean—Whether clicking an external link layer should show the warning dialog. Defaults to warning every time. The app reads its own persisted preference (see `EXTERNAL_LINK_WARNING_STORAGE_KEY`) and answers here — this component does not touch browser storage.
onExternalLinkConfirm(url: string, dontShowAgain: boolean) => void—Confirmed an external link, with the "don't show again" checkbox state.

Reference

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

Source
src/components/layout/SpaceSidebar.tsx
Portability
Copies across unchanged — only the utils import path moves.
Variants
visibility: public | private | invite-onlypostingPermissions: everyone | admins-only