Skip to content

Application shell

Live event indicator

A dismissible sidebar banner that surfaces a space's live or imminent event, pulsing red while live and amber with a countdown in the 30 minutes before it starts.
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.

Live event indicator

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
event*LiveEvent—Undocumented — add TSDoc to the prop in the library.
scopeKey*string—Storage key suffix for dismissal — usually spaceId.
initiallyDismissedbooleanfalseWhether this event has already been dismissed. Upstream this was read straight out of `sessionStorage` during the initial state calculation, which made the component's first render depend on whatever a previous render had written — so in Storybook one story could silently blank another. The app owns the persistence and passes the answer in; `dismissalStorageKey` below is the key it used, exported so the same slot can be reused.
onDismiss(storageKey: string) => void—Dismissed the indicator. Persist this if the dismissal should stick.
nownumber—Current time in epoch ms, for the countdown. Supplying it makes the component **controlled and deterministic**: it stops its own 15-second timer and renders exactly the moment given, which is what a story needs — `Date.now()` and live timers are both barred from ported components. Omit it and the component ticks on its own, as the app wants.

Reference

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

Source
src/components/layout/sidebar/LiveEventIndicator.tsx
Portability
Copies across unchanged — only the utils import path moves.
Notes
Render one per event you want surfaced in the sidebar; it hides itself automatically once the event ends or once a viewer dismisses it, since the dismissal is stored per session and per event/scope key. It stays hidden entirely until an event is either live or within its 30-minute pre-start window.