JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q85372F
  • License AGPL-3.0-only

A customizable snackbar component for displaying brief messages to users, with state management and animation utilities.

Package Exports

  • @nexim/snackbar

Readme

@nexim/snackbar

This package provides a customizable snackbar component for displaying brief messages to users. It includes utilities for managing the snackbar's state and animations.

NPM Version npm bundle size Build & Lint & Test NPM Downloads NPM License

Overview

Snackbar component. It includes utilities for managing the snackbar's state and animations.

Installation

Install the package using npm or yarn:

npm install @nexim/snackbar

# Or using yarn
yarn add @nexim/snackbar

API

snackbarSignal

To display a snackbar, emit the snackbarSignal with the desired options:

import {snackbarSignal} from '@nexim/snackbar';

snackbarSignal.notify({
  content: 'This is a snackbar message',
  // The following properties are optional.
  action: {
    label: 'Undo',
    signalId: 'undo-handler',
  },
  duration: '5s',
  addCloseButton: true,
});