Skip to main content

Next.js Example

Use @raytolfas/toastify in a Next.js project.

Code

import { toast } from '@raytolfas/toastify';
import '@raytolfas/toastify/toastify.css';

export default function Page() {
const showToast = () => {
toast({
message: 'Welcome to Raytolfas!',
type: 'success',
duration: 3000,
position: 'top-right',
theme: 'light',
});
};

return (
<button onClick={showToast}>
Show Toast
</button>
);
}

Features

  • Shows a toast with a progress bar.
  • Pauses on hover.
  • Closes on click.

See API Reference.