PollPanel renders live in-call polls — list of open + closed polls, vote buttons with progress bars, and (when isHost is true) a composer at the bottom for posting a new poll with 2–6 options. Composes usePolls.
Install
pnpm add @levelchat/react-components @levelchat/webBasic usage
import { PollPanel } from '@levelchat/react-components';
<PollPanel isHost={isHost} className="h-full w-80" />Host composer
Hosts get the composer at the bottom. Each poll supports 2–6 options, an optional anonymous mode, optional auto-close timer, and a "show results live" toggle. Server enforces all caps; we don't double-validate client-side.
Live vs. post-close results
liveResults: true— vote bars + percentages render the moment a vote lands.liveResults: false— bars stay hidden until the poll closes (or the host taps Close poll).
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
isHost | boolean | false | Show the composer + close-poll action. |
hideComposer | boolean | false | Hide the composer even when isHost is true. |
className | string | — | Container override. |