Skip to content
weftGitHub

Lobby

Waiting to be let into a call.

SourcePackage @weft-js/warp

Preview

tsx
import { state } from '@weft-js/core'import { Button, Lobby, Row, Text } from '@weft-js/warp'export function Waiting() {  const waiting = state(true)  return (    <>      {waiting.value        ? <Lobby title="Waiting for Sam Okafor" onCancel={() => (waiting.value = false)}>Sam is running the incident review. You'll get in as soon as they let you.</Lobby>        : <Row gap="related"><Text subtle>Request cancelled.</Text><Button emphasis="outline" tone="neutral" size="sm" onClick={() => (waiting.value = true)}>Ask again</Button></Row>}    </>  )}

Installation

npm install @weft-js/warp

Usage

tsx
import { Lobby } from '@weft-js/warp'

Accessibility

  • "Asking to join" is a status, so it is read out without taking focus.

API Reference

PropTypeDefaultDescription
titleunknown'Waiting for the host'The heading.
childrenunknown"We'll chime when it's your turn."What happens next.
EventTypeDefaultDescription
onCancel(() => void)—Cancel request was pressed.

RelatedPrejoinScheduled lobby