Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rt-notify

glebcha16MIT3.0.0TypeScript support: included

simple yet powerful notifications for React

react, notification, toast, rt-notify

readme

rt-notify

npm version

React notifications made simple, yet powerful

All dynamic styling propeties made with css variables and fallback to default properties.
const notification = { 
  type: 'waiting', 
  content: 'Waiting Notification New', 
  width: '700px', 
  onClose: () => console.log('CLOSED WAITING NOTIFICATION') 
}

type Animation = 'fade' | 'bounce' | 'zoom'
type Status = 'waiting' | 'success' | 'error'
type Placement = 'top' | 'bottom' | 'left' | 'right'

interface NotificationProps {
  id?: string | number
  type?: Status
  content: React.ReactNode
  width?: string
  timeout?: number | null
  onClose?: (event?: React.MouseEventHandler<HTMLElement>) => void
}

interface NotificationsProps {
  notifications: Array<NotificationProps>
  animation?: Animation
  placement?: Placement
  defaultTimeout?: number
  animationTimeout?: number
  duplicatePlaceholder?: React.ReactElement | null
}