Skip to content

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.

PropTypeDefaultDescription
initialNamestring""Seeds the name field and the baseline `hasChanges` compares against.
initialDescriptionstring""Undocumented — add TSDoc to the prop in the library.
initialSlugstring""The URL slug — also the space id in the app.
initialCoverSrcstring | nullnullCover image src, or null for the dashed upload target.
initialIconSrcstring | nullnullIcon image src, or null for the dashed upload target.
urlPrefixstring"behindthescenes.com/"Text before the editable slug in the URL field.
maxNameLengthnumber30Undocumented — add TSDoc to the prop in the library.
maxDescriptionLengthnumber100Undocumented — 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.
hasChangesboolean—Forces the dirty state of the Save/Cancel pair regardless of what was typed.
initialCoverHoveredbooleanfalsePins 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.
initialIconHoveredbooleanfalseSame, for the icon tile.
classNamestring—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.