Gathering detailed insights and metrics for react-notistack
Gathering detailed insights and metrics for react-notistack
Gathering detailed insights and metrics for react-notistack
Gathering detailed insights and metrics for react-notistack
notistack
Highly customizable notification snackbars (toasts) that can be stacked on top of each other
notistack-mod
Notistack with ability to modify active snackbars.
@durrtagnan/notistack
Fork of highly customizable notification snackbars (toasts) that can be stacked on top of each other
notistack-v2-maintained
Highly customizable notification snackbars (toasts) that can be stacked on top of each other
npm install react-notistack
Typescript
Module System
Node Version
NPM Version
Updated react version
Updated on May 25, 2022
Fixed icons array issue.
Updated on Apr 18, 2021
Updated responsive behaviour and added custom icons.
Updated on Apr 18, 2021
Fixed stack related issue.
Updated on Apr 17, 2021
v1.2.0
Updated on Apr 17, 2021
v1.1.2
Updated on Apr 17, 2021
JavaScript (69.82%)
SCSS (28.6%)
HTML (1.58%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1 Stars
24 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Oct 09, 2023
Latest Version
1.3.0
Package Id
react-notistack@1.3.0
Unpacked Size
227.46 kB
Size
62.06 kB
File Count
21
NPM Version
8.9.0
Node Version
16.13.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A minimal beautiful standalone Toast/Snackbar for your react web application.
Use your preferred package manager:
npm install react-notistack
yarn add react-notistack
1: Wrap your app inside a SnackbarProvider
component: (see docs for a full list of available props)
Note: If you're using material-ui ThemeProvider
, make sure SnackbarProvider
is a child of it.
1import { SnackbarProvider } from 'react-notistack'; 2 3<SnackbarProvider maxSnack={3}> 4 <App /> 5</SnackbarProvider> 6
2: Export any component that needs to send notification using withSnackbar
. By doing this, you'll have access to methods enqueueSnackbar
and closeSnackbar
, where the former can be used to send snackbars.
1import { withSnackbar } from 'react-notistack'; 2 3class MyComponent extends Component { 4 handleNetworkRequest = () => { 5 fetchSomeData() 6 .then(() => this.props.enqueueSnackbar('Successfully fetched the data.')) 7 .catch(() => this.props.enqueueSnackbar('Failed fetching data.')); 8 }; 9 10 render(){ 11 //... 12 }; 13 14}; 15 16export default withSnackbar(MyComponent);
2 (alternative): You can use useSnackbar
hook in your functional components as well.
1import { useSnackbar } from 'react-notistack'; 2 3const MyButton = () => { 4 const { enqueueSnackbar, closeSnackbar } = useSnackbar(); 5 6 const handleClick = () => { 7 enqueueSnackbar('I love hooks'); 8 }; 9 10 return ( 11 <Button onClick={handleClick}>Show snackbar</Button> 12 ); 13}
Demo here
Will be added soon.
This snackbar idea is comes from Notistack by Hossein Dehnokhalaji which is depend on material-ui.
And the design of snackbar/toastr catched from bootstrap.
Open an issue and your problem will be solved.
Saiful Alam - https://msar.me
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
78 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More