Skip to content
Shortcut: /, ⌘K or Ctrl+K

ParticipantVideoGrid

Props, styling and a live ParticipantVideoGrid example.

View as Markdown
ParticipantVideoGrid
Sample data
@polymorfa/react

Customize

Label for a tile. Defaults to the participant's number or ID, then the participant reference of another app connection, then "Participant".

React only: @polymorfa/elements has no element for ParticipantVideoGrid.

ParticipantVideoGridExample.jsx
npm install @polymorfa/react@dev @polymorfa/browser@dev
import { PolymorfaProvider, ParticipantVideoGrid } from "@polymorfa/react";

const appearance = { theme: "light", variables: { colorPrimary: "#635bff" } };

export function ParticipantVideoGridExample({ calls }) {
  return (
    <PolymorfaProvider tokenEndpoint="/api/polymorfa/token" appearance={appearance}>
      <ParticipantVideoGrid
        controller={calls}
      />
    </PolymorfaProvider>
  );
}

ParticipantVideoGrid from @polymorfa/react. Choose props and styles above; the preview stays visible in every code view.

Props#

  • classNamestring
  • labelVideo(video: RemoteVideoInfo) => string | undefined

    Label for a tile. Defaults to the participant's number or ID, then the participant reference of another app connection, then "Participant".

  • controllerCallsController
  • createController() => CallsController

Styling#

Use className, classNames (a class for any slot, typed SlotClassNames), appearance variables and element styles. The Style panel applies changes to the live component. See Appearance.

Setup#

Use the provider and server route for your application. The preview above uses local sample data and controllers. Chat controllers and inbox data sources keep your data separate from the UI.