PinnedTileBar renders the set of pinned participants in a horizontal filmstrip above or below the main grid. Returns null when no participants are pinned (zero-cost when unused).
Install
pnpm add @levelchat/react-components @levelchat/webRequirements
- React —
reactandreact-dom^18 || ^19(peer dependency). - LevelChat Web SDK —
@levelchat/web^0.2.4(peer dependency, wires hook-driven mode to the live Room). - Provider — wrap the tree in
<LevelChatProvider>from@levelchat/web-reactso hook-driven mode can subscribe to room events. Prop-driven demos work without it. - Styles — import the brand tokens + kit stylesheet exactly once at the app entry, before any kit component renders.
In Next.js (App Router), import the stylesheets at the top of your root layout:
TypeScript (TSX)
// app/layout.tsx
import '@levelchat/brand/tokens.css';
import '@levelchat/react-components/styles.css';In Vite (or any plain React app), import them at the top of your entry module:
TypeScript (TSX)
// src/main.tsx
import '@levelchat/brand/tokens.css';
import '@levelchat/react-components/styles.css';Basic usage
TypeScript (TSX)
import { PinnedTileBar, ParticipantGrid } from '@levelchat/react-components';
<>
<PinnedTileBar maxPinned={4} />
<ParticipantGrid />
</>Pin semantics
- Server pins — broadcast pins set by a host. Everyone in the room sees the same pinned set.
- Local pins — per-viewer overrides. Layered on top of server pins; not broadcast.
- Deduplication + cap at
maxPinned(default 8). Server pins lead.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
maxPinned | number | 8 | Visible tile cap. |
hideUnpin | boolean | false | Hide the per-tile Unpin button. |
renderTile | (id, name) => ReactNode | — | Replace the default VideoTile (e.g. for a thumbnail-only render). |