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

ParticipantList

Props, styling and a live ParticipantList example.

View as Markdown
ParticipantList
Sample data
@polymorfa/react

Customize

Display name for a participant, when the application knows one.

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

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

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

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

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

Props#

  • classNamestring
  • resolveName(participant: CallParticipant) => string | undefined

    Display name for a participant, when the application knows one.

  • controllerCallsController
  • createController() => CallsController

Types#

Named types used in the props above.

@polymorfa/browser
type CallParticipant = Participant;

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.