Toast

Toast component with pre-built positioning, different icons, themes and support for
light and dark mode.

Title

Message Body

Installation
npx @ayushmxxn/serenity-ui@latest add toast
Usage
import React from 'react'
import Toast from './components/ui/Toast'

function Page() {
  return (
    <div>
      <Toast
          position='top-right'
          variant='default'
          mode='light'
          timer={10}
          loader={10000}
          icon='success'
          title='Title'
          body='Message Body'
        />
    </div>
  )
}

export default Page;

Props

Prop NameTypeDescription
titlestringTitle of Notification
bodystringMessage body of Notification
iconstringsuccess / error / warning / info
varientstringdefault / colored
positionstringtop-right / top-left / bottom-right / bottom-left
timernumberHow much time the notification should be displayed
modestringSpecifies the color scheme. Possible values are light or dark.
Built byAyushmaan Singh. The source code is available onGithub