Skip to content
kerfjsGitHub

ScheduledLobby

A call that has not started yet: a countdown, with Join off until it is time.

SourcePackage @kerf-js/veneer

Preview

tsx
import {  ScheduledLobby,  Toaster,  toast} from '@kerf-js/veneer'export function Review() {  const to = Date.now() + 8 * 60_000  return (    <>      <ScheduledLobby        title="Incident review"        to={to}        onJoin={() => toast.show({ title: 'Joining' })}        onAddToCalendar={() =>          toast.show({ title: 'Added to your calendar' })        }      >        Join opens when the countdown ends.      </ScheduledLobby>      <Toaster />    </>  )}

Installation

npm install @kerf-js/veneer

Usage

tsx
import { ScheduledLobby } from '@kerf-js/veneer'

Open early

joinable lets people in now.

tsx
import { state } from '@kerf-js/core'import {  ScheduledLobby,  Stack,  Text} from '@kerf-js/veneer'export function Open() {  const to = Date.now() + 2 * 60_000  const joined = state(false)  return (    <Stack gap="related">      <ScheduledLobby        title="Incident review"        to={to}        joinable        onJoin={() => (joined.value = true)}      />      {joined.value && (        <Text subtle>Joining the call.</Text>      )}    </Stack>  )}

Accessibility

  • This has no shortcuts of its own: controls inside it use Tab, Enter and Space as usual, and veneer's parts keep their roles and labels.

API Reference

PropTypeDefaultDescription
titleunknown—The heading.
childrenunknown—What it contains.
tonumber—When it starts, in epoch ms.
nownumber—The time now, to render on the server.
joinablebooleanfalseTurns Join on before the end.
opensAtstring—When Join opens, in words.
EventTypeDefaultDescription
onJoin(() => void)—Join was pressed.
onAddToCalendar(() => void)—Adds Add to calendar.

RelatedCountdownLobby