Settings
Settings details
The Details pane of space settings for editing a space's cover photo, icon, name, short description, and URL slug behind a Save/Cancel pair.
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.
Settings details
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 |
|---|---|---|---|
initialName | string | "" | Seeds the name field and the baseline `hasChanges` compares against. |
initialDescription | string | "" | Undocumented — add TSDoc to the prop in the library. |
initialSlug | string | "" | The URL slug — also the space id in the app. |
initialCoverSrc | string | null | null | Cover image src, or null for the dashed upload target. |
initialIconSrc | string | null | null | Icon image src, or null for the dashed upload target. |
urlPrefix | string | "behindthescenes.com/" | Text before the editable slug in the URL field. |
maxNameLength | number | 30 | Undocumented — add TSDoc to the prop in the library. |
maxDescriptionLength | number | 100 | Undocumented — add TSDoc to the prop in the library. |
onSave | (values: { name: string; description: string; slug: string; coverSrc: string | null; iconSrc: string | null; }) => void | — | Undocumented — add TSDoc to the prop in the library. |
onCancel | () => void | — | Undocumented — add TSDoc to the prop in the library. |
onCopyUrl | (url: string) => void | — | Fired with the assembled `${urlPrefix}${slug}`. The caller owns clipboard and toast. |
hasChanges | boolean | — | Forces the dirty state of the Save/Cancel pair regardless of what was typed. |
initialCoverHovered | boolean | false | Pins the cover tile's hover overlay on. The overlay is the only way to see the Replace/Delete controls, and hover is not a state a static story can enter — so it is liftable. |
initialIconHovered | boolean | false | Same, for the icon tile. |
className | string | — | Undocumented — add TSDoc to the prop in the library. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/settings/SettingsDetails.tsx- Portability
- Copies across unchanged — only the utils import path moves.
- Notes
- Use where a space owner needs to edit core identity fields; the cover and icon tiles are click-to-upload with hover-revealed Replace/Delete controls, and the URL slug self-sanitizes to lowercase, hyphenated text as it's typed. Name and description hard-truncate at their character limits rather than showing an error, and Save/Cancel stay disabled until a field differs from its seeded value.