1.10.15 • Published 7 months ago

react-fox-toast v1.10.15

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

🌏 Website  |  📚 Documentation  |  🗄️ Github

React Fox Toast - Flexible Toast Notifications for React and Next.js

react-fox-toast is a lightweight and customizable toast/notification component for React and Next.js. It supports various customization options and integrates seamlessly with libraries like TailwindCSS.

NOTE: Works only on the client side. For SSR frameworks like Next.js, include 'use client'; at the top of your component.

Features

  • Customizable: Adjust position, duration, content, icons, and more.
  • Promise Support: Display success/error messages based on promise results.
  • Custom Content: Render components inside toasts.
  • Global Toast Container: Manage toasts globally.
  • TailwindCSS Support: Easy styling with TailwindCSS.
  • Pause on Hover: Auto-dismiss timer pauses on hover.
  • Expandable Toasts: Click to reveal more content.
  • Global Theme Support: Apply consistent styling across toasts.
  • Lightweight: Minimal performance impact.
  • Smooth Transitions: Includes expand, slide-in, and slide-out animations.

Installation

npm install react-fox-toast
# or
yarn add react-fox-toast
# or
pnpm add react-fox-toast

Usage

1. Add ToastContainer

Wrap your root component with ToastContainer to enable toasts.

'use client'; // Add if using Next.js
import { ToastContainer } from "react-fox-toast";

function App() {
  return (
    <div>
      <ToastContainer />
    </div>
  );
}

export default App;

2. Use the toast Hook

Call toast functions like toast.success() in your components.

'use client'; // Add if using Next.js
import { toast } from "react-fox-toast";

function MyComponent() {
  const showToast = () => {
    toast.success("Success! The action was completed.");
  };

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

Learn More

License

MIT License

For questions or feedback, open an issue or contribute on GitHub!

1.10.15

7 months ago

1.10.14

7 months ago

1.10.13

8 months ago

1.10.12

8 months ago

1.10.11

8 months ago

1.10.10

8 months ago

1.10.9

8 months ago

1.10.8

8 months ago

1.10.7

8 months ago

1.10.6

8 months ago

1.10.5

8 months ago

1.10.4

8 months ago

1.10.3

8 months ago

1.10.2

8 months ago

1.10.1

8 months ago

1.10.0

8 months ago

1.9.12

8 months ago

1.9.11

8 months ago

1.9.10

8 months ago

1.9.9

8 months ago

1.9.8

8 months ago

1.9.7

8 months ago

1.9.6

8 months ago

1.9.5

8 months ago

1.9.4

8 months ago

1.9.3

8 months ago

1.9.2

8 months ago

1.9.1

8 months ago

1.9.0

8 months ago

1.8.8

8 months ago

1.8.7

8 months ago

1.8.6

8 months ago

1.8.5

8 months ago

1.8.4

8 months ago

1.8.3

8 months ago

1.8.2

8 months ago

1.8.1

8 months ago

1.8.0

8 months ago

1.7.9

8 months ago

1.7.8

8 months ago

1.7.7

8 months ago

1.7.6

8 months ago

1.7.5

8 months ago

1.7.4

8 months ago

1.7.3

8 months ago

1.7.2

8 months ago

1.7.1

8 months ago

1.7.0

8 months ago

1.6.7

8 months ago

1.6.6

8 months ago

1.6.5

8 months ago

1.6.4

8 months ago

1.6.3

8 months ago

1.6.2

8 months ago

1.6.1

9 months ago

1.6.0

9 months ago

1.5.21

9 months ago

1.5.20

9 months ago

1.5.19

9 months ago

1.5.18

9 months ago

1.5.17

9 months ago

1.5.16

9 months ago

1.5.15

9 months ago

1.5.14

9 months ago

1.5.13

9 months ago

1.5.12

9 months ago

1.5.11

9 months ago

1.5.10

9 months ago

1.5.9

9 months ago

1.5.8

9 months ago

1.5.7

9 months ago

1.5.6

9 months ago

1.5.5

9 months ago

1.5.4

9 months ago

1.5.3

9 months ago

1.5.2

9 months ago

1.5.1

9 months ago

1.5.0

9 months ago

1.4.31

9 months ago

1.4.30

9 months ago

1.4.29

9 months ago

1.4.28

9 months ago

1.4.27

9 months ago

1.4.26

9 months ago

1.4.25

9 months ago

1.4.24

9 months ago

1.4.23

9 months ago

1.4.22

9 months ago

1.4.21

9 months ago

1.4.20

9 months ago

1.4.19

9 months ago

1.4.18

9 months ago

1.4.17

9 months ago

1.4.16

9 months ago

1.4.15

9 months ago

1.4.14

9 months ago

1.4.13

9 months ago

1.4.12

9 months ago

1.4.11

9 months ago

1.4.10

9 months ago

1.4.9

9 months ago

1.4.8

9 months ago

1.4.7

9 months ago

1.4.6

9 months ago

1.4.5

9 months ago

1.4.4

9 months ago

1.4.3

9 months ago

1.4.2

9 months ago

1.4.1

9 months ago

1.4.0

9 months ago

1.3.2

9 months ago

1.3.1

9 months ago

1.3.0

9 months ago

1.2.4

9 months ago

1.2.3

9 months ago

1.2.2

10 months ago

1.2.1

10 months ago

1.2.0

10 months ago

1.1.7

10 months ago

1.1.6

10 months ago

1.1.5

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago