3.0.2 • Published 3 months ago

notistack v3.0.2

Weekly downloads
242,002
License
MIT
Repository
github
Last release
3 months ago

Notistack: Display notifications with call of a function.

npm version npm downloads package license

Table of Contents

Getting Started

Use your preferred package manager:

npm install notistack
yarn add notistack

Version guide

VersionNotes
v3.x.xLatest stable release. Standalone (i.e. not dependent on material-ui)
<= v2.0.8Requires Material-UI v5 as peer dependency. npm install notistack@2.0.8
<= 1.0.10Requires Material-UI <= v4 as peer dependency. npm install notistack@latest-mui-v4

How to use

Instantiate a SnackbarProvider component and start showing snackbars: (see docs for a full list of available props)

import { SnackbarProvider, enqueueSnackbar } from 'notistack';

const App = () => {
  return (
    <div>
      <SnackbarProvider />
      <button onClick={() => enqueueSnackbar('That was easy!')}>Show snackbar</button>
    </div>
  );
};

Alternatively, You can use useSnackbar hook to display Snackbars. Just remember to wrap your app inside of a SnackbarProvider to have access to the hook context:

import { SnackbarProvider, useSnackbar } from 'notistack';

// wrap your app
<SnackbarProvider>
  <App />
  <MyButton />
</SnackbarProvider>

const MyButton = () => {
  const { enqueueSnackbar, closeSnackbar } = useSnackbar();
  return <Button onClick={() => enqueueSnackbar('I love hooks')}>Show snackbar</Button>;
};

Online demo

Visit the documentation website to see all the examples. Or play with a minimal working example: codesandbox

Contribution

Open an issue and your problem will be solved.

Author - Contact

Hossein Dehnokhalaji

@appcraft/core@borderfreefinancial/dev-revo-consumer-lite-testing1-local@borderfreefinancial/dev-revo-consumer-lite-testing1@flyteorg/console@flyteoss/consoleproem-ui-developreact-ts-webpacksebrae-react-scriptsdesign-frameworkrafaelgcs-dropzone-reactevents-manager-viewnodegen-utilscleomar-react-easyminsilo-react-client@flmc/lite-renderer@apraamcos/apra-amcos-uistorybook-addons-playwrightdelivered4allstaffpad-ui-librarypanel-maluko-test@vanroey/vra-site-provisioning-admin-dashboard-sp-fxmypdx-ui2scandinavia@joseirrazabal/linksvigoworks.componentsapra-amcos-uimeetschedulerabc-institutenuxo_front_updateobss-react@pdasolutions/webcybex-game-addonkushkiconnectvttemp-connect-ui-acceltest-connect-bundlerreact-material-ui-file-manager@jibadano/backoffice-componentscsr-iam-app-libgally-admin-componentssimple-api-docts-basicevolve-foresite-components-ui@infinitebrahmanuniverse/nolb-notiflowiseai-ui@compassdigital/compassdigital.components.distilr@raphaelcamar/my-financial-storybook@textea/yodas@everything-registry/sub-chunk-2334cloud-air-componentscaseark-uidesign-library-testmintt-components-test@ascendware/mxgoni-functionsskb-componentsmeeting-component-library@yona-network/wallet-adapter-example@yona-network/wallet-adapter-material-ui-starteractionsync-uitalentorg-profile-editortbc-common-snackbartcp-core-utilitiestask-manager-newtemppppppppptest-chat-newwith-firebase-authenticationwebapp-joostlywfacewyzetalk-assessment-frontendwyzetalk-cms-users-fetedddfgdsst-uitelegram-reactstorybook-addon-playwrighttestttbuildbabeltestttbuildbabelfinaltestttbuildbabelfinal2testtbredcrumtestconnectfinalfinaltestconnectttttttttestconnectv1test_realityservices-ui-componentstest-ui-testsvoalle-uivoluptatemsedvs-design-systemvite-page-buildervivify-ideas-react-scriptsvarshini-crudvases-ui@dotgiscorp/webcomponents@discuzz/discuzz@cmckenna/ed-component-library@creatable/capa-components@crayond_dev/user-management-test@craftercms/studio-ui@customd/admin-dashboard@collectionscms/collections@cwrc/leafwriter@connexta/atlas@doopage/react-ui-kit
3.0.2

3 months ago

3.0.0-alpha.13

2 years ago

3.0.0-alpha.12

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

3.0.0-alpha.9

3 years ago

3.0.0-alpha.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.8

3 years ago

3.0.0-alpha.10

3 years ago

3.0.0-alpha.11

3 years ago

3.0.0-alpha.7

3 years ago

3.0.0-alpha.6

3 years ago

3.0.0-alpha.3

3 years ago

3.0.0-alpha.5

3 years ago

3.0.0-alpha.4

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

3.0.0-alpha.1

3 years ago

3.0.0-alpha.2

3 years ago

2.0.2

4 years ago

1.0.6-next.3

4 years ago

1.0.6-next.2

4 years ago

2.0.1-alpha.5

4 years ago

1.0.10

4 years ago

1.0.6-next.1

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6-next.0

4 years ago

2.0.1-alpha.0

4 years ago

2.0.1-alpha.1

4 years ago

2.0.1-alpha.2

4 years ago

2.0.1-alpha.3

4 years ago

2.0.1-alpha.4

4 years ago

1.0.6

4 years ago

1.0.6-alpha.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.4-alpha.0

4 years ago

1.0.3

4 years ago

1.0.3-alpha.0

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.9.17

5 years ago

0.9.15

5 years ago

0.9.16

5 years ago

0.9.14

5 years ago

0.9.13

5 years ago

0.9.12

5 years ago

0.9.11

5 years ago

0.9.10

5 years ago

0.9.9

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.6

5 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago

0.8.9

6 years ago

0.8.8

6 years ago

0.8.7

6 years ago

0.8.6

6 years ago

0.8.5

6 years ago

0.8.4

6 years ago

0.8.3

6 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.0

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.1.1

7 years ago