Skip to main content

Add a Custom Button to the Control Bar

Dyte's UI kit provides a convenient solution for customizing the UI of your Dyte meetings including control bar. The control bar is an essential component of any meeting platform, allowing users to access various meeting controls such as audio and video settings, screen sharing, recording, and more. Using Dyte's UI kit you can customize the control bar, for example, add a hand-raise button, rename a button, and so on.

This guide will take you through the process of adding a hand-raise button to the control bar of your meeting.


Step 1: Create a meeting interface

Meeting setup consists of two files App.jsx and App.css.


To create App.jsx, you need to:

  • Import the necessary dependencies and styles
  • Set up the meeting using the useEffect hook
  • Render the meeting components
import React, { useEffect, useState } from 'react';
import { useDyteClient, DyteProvider } from '@dytesdk/react-web-core';
import {
} from '@dytesdk/react-ui-kit'
import './App.css';

useEffect(() => {
authToken: '<auth-token>',
defaults: {
audio: false,
video: true,
}, []);

if (!client) return (<div>Loading Dyte Meeting...</div>);

return (
<div className="dyte-meeting">
<DyteProvider value={client}>
<DyteParticipantsAudio meeting={client} />
config: {
notifications: ['chat', 'participant_joined', 'participant_left'],
notification_sounds: ['chat', 'participant_joined', 'participant_left'],
participant_joined_sound_notification_limit: 10,
participant_chat_message_sound_notification_limit: 10,
<DyteHeader meeting={client} />
<div className="grid-container">
<DyteGrid meeting={client} style={{ height: '100%' }} />
<div class="controlbar">
<DyteMicToggle meeting={client} />
<DyteCameraToggle meeting={client} />
<DyteSettingsToggle meeting={client} />

export default App;


Here is an example of how your App.css file could be structured:

html {
height: 100vh;
width: 100vw;
margin: 0;

.grid-container {
display: flex;
flex-direction: row;
flex-grow: 1;

.controlbar {
height: fit-content;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;

.dyte-meeting {
display: flex;
height: 100vh;
width: 100vw;
background: black;
flex-direction: column;

.active-button {
color: red;

Step 2: Add a custom button (raise hand) in the control bar

Once you've created your Dyte meeting, import the DyteControlbarButton and create a state to manage the UI.

const [handRaised, setHandRaised] = useState(false);
label="Raise Hand"
className={handRaised ? 'active-button' : ''}

Step 3: Implement the raiseHand function

When a user clicks the control bar button, you can use the broadcast API exposed by web core to send a message to all peers in the meeting. This can be achieved by calling the broadcastMessage method, which requires two parameters: a type and a payload.

In the payload, include the peer's ID and display name.

const raiseHand = async () => {
await client.participants.broadcastMessage('hand-raise', {

Step 4: Listen for the broadcasted message

When the event is fired a notification is sent to the user using the sendNotification method exposed by @dytesdk/react-ui-kit.

useEffect(() => {
if (!client) return;
client.participants.on('broadcastedMessage', ({ payload }) => {
const notificationObj = {
id: new Date().getTime().toString(),
message: `Hand Raised by ${}`,
duration: 3000,
sendNotification(notificationObj, 'message');

return () => {
}, [client]);