Skip to main content

DyteNotification

A component which shows a notification.

You need to remove the element after you receive the dyteNotificationDismiss event.

<DyteNotification
notification={{
id: 'your-id',
message: 'Vaibhav says hi!',
image: 'https://github.com/vaibhavshn.png',
button: {
text: 'Say Hi back',
variant: 'ghost',
onClick: () => alert('Hey'),
},
}}
onDyteNotificationDismiss={(e) => {
e.target.remove();
}}
/>

Props

notification

required

Message

iconPack

Icon pack

Default
defaultIconPack

size

Size

Type
"lg" | "md" | "sm" | "xl"

t

Language

Default
useLanguage()