Skip to content

Settings

Connect modal

A configurable dialog that walks an operator through connecting an analytics platform to a Space, showing the platform name, a one-line pitch, and a single branded connect button.
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.

Connect modal

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
platformName*string—Platform name — drives the default title and button label ("Meta" → "Connect Meta").
description*React.ReactNode—What connecting this platform buys the operator. Shown as the modal's body copy.
titleReact.ReactNode—Overrides the default `Connect {platformName}` heading.
actionLabelReact.ReactNode—Overrides the default `Connect with {platformName}` button label.
connectingLabelReact.ReactNode"Connecting…"Label while `connecting` is true.
logoSrcstringPLACEHOLDER_PLATFORM_LOGOLogo image source. Defaults to {@link PLACEHOLDER_PLATFORM_LOGO}; must be a data URI or bundled asset, never remote.
logoAltstring—Alt text for `logoSrc`. Falls back to `platformName`.
logoClassNamestring"w-3.5 h-3.5"Sizing for the mark. `w-3.5 h-3.5` for most platforms; GA4's fuller square uses `w-4 h-4`.
logoReact.ReactNode—A rendered mark (inline SVG) instead of an image — wins over `logoSrc`.
openboolean—Controlled open state. Pair with `onOpenChange`.
defaultOpenbooleanfalseUncontrolled initial open state — use for open-on-mount stories.
onOpenChange(open: boolean) => void—Undocumented — add TSDoc to the prop in the library.
connectingbooleanfalseRenders the in-flight spinner state. Owned by the caller — this component runs no timer.
onConnect() => void—Fired when the operator confirms. The caller performs the OAuth handoff.
closeOnConnectbooleantrueClose the dialog after `onConnect`. Defaults to true, matching the shipped flow.
titleClassNamestring—Extra classes on the heading — TikTok's pane tightened it to `text-sm font-medium`.
classNamestring—Extra classes on the dialog surface.

Reference

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

Source
src/components/settings/analytics/ConnectModal.tsx
Portability
Copies across unchanged — only the utils import path moves.
Notes
Use for any analytics integration's OAuth handoff by passing platformName, description, and a logo; both the open state and the in-flight connecting spinner are driven by props, so the caller owns the actual OAuth call and any loading state.