🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mui-sonner

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mui-sonner

[mui-sonner](https://mui-sonner.tsotne.co.uk/) is is a package that combines [sonner](https://www.npmjs.com/package/sonner) and [MUI](https://mui.com/) to achieve a simple, opinionated toast component for react.

1.0.1
latest
Source
npm
Version published
Weekly downloads
351
33.46%
Maintainers
0
Weekly downloads
 
Created
Source

mui-sonner is is a package that combines sonner and MUI to achieve a simple, opinionated toast component for react.

If you are not using MUI, you should use sonner directly.

Demo

View demo

Documentation

View the documentation

Features

  • Avoids Context: Like sonner, it doesn't use context.
  • Alerts: The toast that is actually built around using the Alert component from MUI, so it's easy to customize.
  • Styling: Leverages MUI components, meaning the toast and components inside it will use your already defined MUI theme.

Usage

npm install mui-sonner

Add to your app, preferably quite high in the tree. After that you can use toast() from anywhere in your app.

import { Toaster, toast } from "mui-sonner";

// ...

function App() {
  return (
    <div>
      <Toaster />
      <button onClick={() => toast("My first toast")}>toast please</button>
    </div>
  );
}

Keywords

mui

FAQs

Package last updated on 09 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts