/lazytoast-tailwindcss

Lazy Toast Tailwind CSS Simple

Primary LanguageJavaScript

Lazy Toast TailwindCSS

A simple Toast component for TailwindCSS

#Development

npm install
npx tailwindcss -i ./src/tailwind.css -o ./dist/app.css --watch

#Demo

https://ilsyaa.github.io/

#Config

// config toast
const toast = new LazyToast({
    duration:3000,
    position: 'top-right',
});

// options
// duration: number
// position: string (top-right, top-left,top-center, bottom-right, bottom-left bottom-center)


// show toast
toast.toast({
    title: 'Hello World',
    msg: 'This is a toast message',
    style: 'success',
    css: ''
});

// options
// style: string (success, error, warning, info, bug)
// css: string (custom css) if css not change use !important ex !bg-red-500 !text-white

Contribution :