Creative makki toast.
Easy to use, customizable & compatible with dark mode.
Build by Daniel Jimenez
- Easy to use
- Customizable
- Dark mode
- Lightweight
- Accessible
npm install makki-toast@latest
Add the makki toast and it will take care of render the alerts.
import { Toast } from 'makki-toast'
const toast = new Toast()
const handleToast = () => {
toast.info('Simple text', false)
}
const toast = new Toast()
const handleToast = () => {
toast.success('Simple text', false)
}
const toast = new Toast()
const handleToast = () => {
toast.warning('Simple text', false)
}
const toast = new Toast()
const handleToast = () => {
toast.danger('Simple text', false)
}
import { Toast } from 'makki-toast'
const App = () => {
const toast = new Toast()
const handleToast = () => {
toast.show({
autoClose: 5000,
darkMode: false,
message: 'Simple text',
position: 'top-right'
})
}
return (
<div>
<button onClick={handleToast}>Show Makki Toast</button>
</div>
)
}
Find the full documentation on official documentation