Component props
The rendered ParticipantList component
The component automatically integrates with the HiyveProvider context to:
Status Indicators:
Owner Controls (automatic for room owners):
Automatic Sorting: Participants are sorted: local user first, then owner, then alphabetically.
Full Customization: All text labels, icons, colors, and styles can be customized through props.
Basic usage inside HiyveProvider:
import { HiyveProvider } from '@hiyve/react';
import { ParticipantList } from '@hiyve/react-ui';
function VideoRoom() {
return (
<HiyveProvider client={client} roomName={roomName} userId={userId}>
<VideoGrid />
<ParticipantList
localUserName="John Doe"
maxHeight={400}
/>
</HiyveProvider>
);
}
With remove participant callback:
<ParticipantList
localUserName={userName}
onRemoveParticipant={async (userId) => {
await client.removeParticipant(userId);
}}
/>
Full customization:
<ParticipantList
localUserName={userName}
title="In this meeting"
enableDominantClick={false}
labels={{
localUserSuffix: '(me)',
roomOwner: 'Host',
}}
colors={{
headerBackground: '#1a1a1a',
speakingBorder: '#00ff00',
}}
styles={{
avatarSize: 48,
borderRadius: 8,
}}
renderProps={{
renderParticipant: (participant, isLocal, defaultContent) => (
<Box sx={{ opacity: participant.isSpeaking ? 1 : 0.7 }}>
{defaultContent}
</Box>
),
}}
onParticipantClick={(userId) => setSelectedUser(userId)}
/>
ParticipantListLabels in types for customizable text labelsParticipantListColors in types for color configuration
ParticipantList displays a scrollable list of room participants with their status indicators and optional owner controls.
Requirement: Must be used inside a
<HiyveProvider>component.