Hiyve Components - v1.0.0
    Preparing search index...

    Function ParticipantList

    • Scrollable list showing all participants in the current room.

      Each row displays a colored avatar with initials, the participant's display name, and status indicators (Host, Muted, Video Off). The local user's name is annotated with a "(You)" suffix.

      The list is backed by a FlatList for efficient rendering with large participant counts. An optional header row shows the title and total participant count.

      Parameters

      Returns Element

      import { ParticipantList } from '@hiyve/rn-react';
      import { useParticipants, useRoom } from '@hiyve/rn-react';

      function ParticipantsPanel() {
      const { participants, localUserId } = useParticipants();
      const { room } = useRoom();

      return (
      <ParticipantList
      participants={participants}
      localUserId={localUserId}
      ownerId={room?.ownerId}
      />
      );
      }
      // With localized labels and custom colors
      <ParticipantList
      participants={participants}
      localUserId={localUserId}
      labels={{ title: 'Teilnehmer', you: '(Du)', host: 'Moderator' }}
      colors={{ background: '#1e1e2e', nameText: '#e0e0e0' }}
      showHeader={false}
      />