OptionalcolorsCustom colors for the VideoGrid container.
VideoGridColors for available options.
OptionalcontrolPosition of control buttons (flip, zoom) on local tile.
OptionalcontrolsForwarded to every tile (local and remote). Default 'icons'
keeps each control as its own button in the overlay; 'menu'
collapses them into a single overflow trigger rendered next to
the tile's name caption. Useful for tight grids / mobile.
OptionalcustomCustom layout handler for implementing custom layout modes.
When the layout prop is not one of the built-in modes ('grid', 'speaker', 'sidebar'),
this handler is called to calculate tile positions. If no handler is provided for
a custom layout, the grid layout is used as a fallback.
// "Focus" layout - large center tile with small corners
const focusLayout: CustomLayoutHandler = ({ availableWidth, availableHeight, participants, padding }) => {
const positions: Record<string, TilePosition> = {};
const cornerSize = 120;
// Local user in large center area
positions['local'] = {
left: padding + cornerSize,
top: padding + cornerSize,
width: availableWidth - cornerSize * 2,
height: availableHeight - cornerSize * 2,
};
// Participants in corners
const corners = [
{ left: padding, top: padding },
{ left: padding + availableWidth - cornerSize, top: padding },
{ left: padding, top: padding + availableHeight - cornerSize },
{ left: padding + availableWidth - cornerSize, top: padding + availableHeight - cornerSize },
];
participants.forEach((p, i) => {
if (i < corners.length) {
positions[p.userId] = {
...corners[i],
width: cornerSize,
height: cornerSize,
};
}
});
return positions;
};
<VideoGrid
layout="focus"
customLayoutHandler={focusLayout}
/>
OptionalengagementPosition of engagement indicator on video tiles.
OptionalgapGap between tiles in pixels.
OptionalhideHide the local video tile from the grid. When true, the local tile is hidden (display: none) but remains in the DOM so the video element stays attached for WebRTC streaming. Remote participants still see the local user's video.
OptionalindicatorPosition of recording/streaming indicator on local tile.
OptionallabelPosition of name labels on tiles.
OptionallayoutLayout mode for arranging video tiles.
LayoutMode for available modes.
OptionallocalCustom colors for the local VideoTile component. Includes overlay, recording indicator, and mute colors.
OptionallocalCustom icons for the local VideoTile component. Replace default flip, fullscreen, and record icons.
OptionallocalCustom labels for the local VideoTile component. Use for i18n/localization of control tooltips.
OptionallocalRender order for overlay elements on the local tile when they share the same position. Elements listed first appear first (leftmost for horizontal layouts).
OptionallocalRender props for the local VideoTile component. Allows custom overlay and duration formatting.
OptionallocalCustom styles for the local VideoTile component. Controls button sizing, animation, and typography.
OptionallocalDisplay name for the local user. Shown on the local video tile with "(You)" suffix.
HTML element ID for the local video element.
This ID must match the one used when calling client.connectTransports().
OptionalminMinimum tile width in pixels. Used to calculate grid columns in auto-layout mode.
OptionalmoodPosition of mood indicator on video tiles.
OptionalonCallback when an error occurs during grid rendering
OptionalonCallback when the local tile is clicked.
OptionalonCalled when a remote participant's mute-audio menu item is
clicked. Receives the participant's userId and the desired
muted state (the negation of their current isMuted.audio).
Wire this to useRemoteMute().remoteMuteAudio.
OptionalonCalled when a remote participant's mute-video menu item is
clicked. Receives the participant's userId and the desired
muted state. Wire this to useRemoteMute().remoteMuteVideo.
OptionalonCallback when a remote participant's tile is clicked.
The clicked participant's user ID
OptionalonToggle the local user's audio mute. Forwarded to LocalVideoTile.
OptionalonToggle whether the local tile is hidden. Forwarded to LocalVideoTile.
OptionalonToggle the local user's video mute. Forwarded to LocalVideoTile.
OptionalparticipantsOverride the participants array (otherwise derived from HiyveProvider context). Use this when you need full control over which participants are displayed.
Participant for the required data structure.
OptionalrenderRender props for advanced VideoGrid customization.
VideoGridRenderProps for available render functions.
OptionalresolveResolve a display name for a participant. Called with the userId and the SDK-resolved name (from userName/externalUserId). Return a custom name (e.g., a nickname) or null/undefined to use the default.
OptionalscreenIDs of participants currently sharing their screen (including the
local user when sharing). Used by the 'screenshare' built-in
layout to pick the prominent tile: the dominant speaker is
preferred when they're sharing; otherwise the first ID in this
array. When the layout is anything other than 'screenshare'
this prop is ignored.
OptionalshowShow engagement indicators on video tiles. Requires MoodAnalysisProvider to be available.
OptionalshowShow fit/fill toggle button on video tiles.
OptionalshowShow the "Hide self / Show self" item in the local tile's overflow
menu. Requires controlsLayout === 'menu' and onToggleHideSelf.
The grid's hideLocalTile prop drives the actual visibility — the
menu just reports the user's intent.
OptionalshowShow the flip/mirror button on the local video tile.
OptionalshowShow mood indicators on video tiles. When undefined, automatically enabled if MoodAnalysisProvider is available and enabled.
OptionalshowShow the "Mute / Unmute audio" item in the local tile's overflow
menu. Requires controlsLayout === 'menu' and onToggleAudio to
have an effect — same callback semantics as ControlBar.
OptionalshowShow mute status indicators (mic/camera icons).
OptionalshowShow the "Mute / Unmute audio" item in each remote participant
tile's overflow menu. Requires onMuteParticipantAudio. Intended
for room owners — the consumer decides whether to enable it
(typically isOwner && controlsLayout === 'menu').
OptionalshowShow the "Mute / Unmute video" item in each remote participant
tile's overflow menu. Requires onMuteParticipantVideo.
OptionalshowShow the "Mute / Unmute video" item in the local tile's overflow
menu. Requires controlsLayout === 'menu' and onToggleVideo.
OptionalshowShow participant names on video tiles.
OptionalshowShow room duration timer on local tile. Timer starts from when the room was created (from context).
OptionalshowShow the fullscreen/zoom button on video tiles.
OptionalstatusPosition of status indicators (mute, hand raised) on remote tiles.
OptionalstylesCustom styles for VideoGrid layout.
VideoGridStyles for available options.
OptionalsxMUI sx prop for additional styling on the container.
OptionaltileCustom colors for remote VideoTile components. Includes avatar palette, indicator colors, etc.
OptionaltileCustom icons for remote VideoTile components. Replace default Material-UI icons with custom ones.
OptionaltileCustom labels for remote VideoTile components. Use for i18n/localization of tooltip text.
OptionaltileRender order for overlay elements on remote tiles when they share the same position. Elements listed first appear first (leftmost for horizontal layouts).
OptionaltileRender props for remote VideoTile components. Allows custom avatar and overlay rendering.
OptionaltileCustom styles for remote VideoTile components. Controls spacing, sizing, and typography.
OptionaltimerPosition of timer on local tile.
Props for the VideoGrid component.
Remarks
VideoGrid is a container component that manages the layout of video tiles for a video conferencing session. Must be used inside a
<HiyveProvider>.It automatically handles:
The component uses absolute positioning to prevent video element remounting when the layout changes, ensuring smooth transitions.
Example
Basic usage inside HiyveProvider:
Example
Speaker mode with timer: