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
mui-message
Send messages (snackBar messages) as convenient as using antd when use MUI(@mui/material), without using hooks or creating Snackbar components frequently.
npm install react-notistack
Typescript
Module System
Node Version
NPM Version
62.9
Supply Chain
91
Quality
75.5
Maintenance
100
Vulnerability
100
License
Updated react version
Published on 25 May 2022
Fixed icons array issue.
Published on 18 Apr 2021
Updated responsive behaviour and added custom icons.
Published on 18 Apr 2021
Fixed stack related issue.
Published on 17 Apr 2021
v1.2.0
Published on 17 Apr 2021
v1.1.2
Published on 17 Apr 2021
JavaScript (69.82%)
SCSS (28.6%)
HTML (1.58%)
Total Downloads
6,641
Last Day
1
Last Week
21
Last Month
98
Last Year
1,785
1 Stars
24 Commits
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
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
-88.9%
1
Compared to previous day
Last week
-38.2%
21
Compared to previous week
Last month
16.7%
98
Compared to previous month
Last year
-35.4%
1,785
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
no SAST tool detected
Details
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
71 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
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