Skip to content

API

The following methods are available for triggering toast notifications:

  • toast(message: string)
  • toast.success(message: string)
  • toast.error(message: string)
  • toast.info(message: string)
  • toast.warning(message: string)

Example

jsx
import React from 'react';
import { toast } from 'tenedev-toast';
import { Toaster } from 'tenedev-toast';

function App() {
  return (
    <div>
      <Toaster />
      <button onClick={() => toast.success('Hello World!')}>Show Success Toast</button>
    </div>
  );
}

Released under the MIT License.