1.10.15 • Published 6 months ago

react-fox-toast v1.10.15

Weekly downloads
-
License
MIT
Repository
github
Last release
6 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

6 months ago

1.10.14

7 months ago

1.10.13

7 months ago

1.10.12

7 months ago

1.10.11

7 months ago

1.10.10

7 months ago

1.10.9

7 months ago

1.10.8

7 months ago

1.10.7

7 months ago

1.10.6

7 months ago

1.10.5

7 months ago

1.10.4

7 months ago

1.10.3

7 months ago

1.10.2

7 months ago

1.10.1

7 months ago

1.10.0

7 months ago

1.9.12

7 months ago

1.9.11

7 months ago

1.9.10

7 months ago

1.9.9

7 months ago

1.9.8

7 months ago

1.9.7

7 months ago

1.9.6

7 months ago

1.9.5

7 months ago

1.9.4

7 months ago

1.9.3

7 months ago

1.9.2

7 months ago

1.9.1

7 months ago

1.9.0

7 months ago

1.8.8

7 months ago

1.8.7

7 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

8 months ago

1.6.0

8 months ago

1.5.21

8 months ago

1.5.20

8 months ago

1.5.19

8 months ago

1.5.18

8 months ago

1.5.17

8 months ago

1.5.16

8 months ago

1.5.15

8 months ago

1.5.14

8 months ago

1.5.13

8 months ago

1.5.12

8 months ago

1.5.11

8 months ago

1.5.10

8 months ago

1.5.9

8 months ago

1.5.8

8 months ago

1.5.7

8 months ago

1.5.6

8 months ago

1.5.5

8 months ago

1.5.4

8 months ago

1.5.3

8 months ago

1.5.2

8 months ago

1.5.1

8 months ago

1.5.0

8 months ago

1.4.31

8 months ago

1.4.30

8 months ago

1.4.29

8 months ago

1.4.28

8 months ago

1.4.27

8 months ago

1.4.26

8 months ago

1.4.25

8 months ago

1.4.24

8 months ago

1.4.23

8 months ago

1.4.22

8 months ago

1.4.21

8 months ago

1.4.20

8 months ago

1.4.19

8 months ago

1.4.18

8 months ago

1.4.17

8 months ago

1.4.16

8 months ago

1.4.15

8 months ago

1.4.14

8 months ago

1.4.13

8 months ago

1.4.12

8 months ago

1.4.11

8 months ago

1.4.10

8 months ago

1.4.9

8 months ago

1.4.8

8 months ago

1.4.7

8 months ago

1.4.6

8 months ago

1.4.5

8 months ago

1.4.4

8 months ago

1.4.3

8 months ago

1.4.2

8 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

9 months ago

1.2.1

9 months ago

1.2.0

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago