npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

notique

v1.1.1

Published

The sub-2kb, framework-agnostic, toast notification library.

Readme

Features

  • ~1.91kb gzipped — microscopic footprint, lighter than your CSS reset.
  • Zero dependencies — pure TypeScript, no frameworks required.
  • 4 built-in types — success, error, info, warning.
  • 6 positions — top/bottom × left/right/center.
  • Global config — set defaults once, override per toast.
  • Smart overloads — pass a string, two strings, or a full object.
  • Progress bar — animated countdown (optional).
  • Accessiblerole="alert" and aria-live out of the box.
  • XSS Secure — text injection is sanitized by default.
  • Custom colors & icons — full control when you need it.

Installation

npm install notique
# or
pnpm add notique
# or
yarn add notique

Quick Start

import { notique } from 'notique';

notique.success('Payment processed successfully');
notique.error('Something went wrong');
notique.info('New update available');
notique.warning('Low battery');

Usage

Notique supports multiple call signatures. Use whichever fits your context.

1. String only

notique.success('Profile saved');

2. String + options

notique.warning('Low battery', { position: 'bottom-center', duration: 2000 });

3. String + description

notique.info('New update available', 'Version 2.4.0 is ready to install');

4. String + description + options

notique.success('Upload complete', '15 files uploaded successfully', {
  position: 'top-left',
  dismiss: false
});

5. Options object

notique.error({
  message: 'Network error',
  description: 'Could not connect to the server.',
  position: 'bottom-right',
  duration: 6000
});

Global Config

Set defaults once at your app's entry point. Per-toast options will always override the global config.

import { notique } from 'notique';

notique.config({
  position: 'top-center',
  duration: 4000,
  showProgress: false
});

Custom Theming

Notique automatically injects dynamic type classes (.notique-success, .notique-error, etc.) onto the toast container, making global CSS overrides effortless.

For example, to create a completely custom brutalist/dark theme:

/* 1. Reset default borders and shadows */
.notique {
  box-shadow: none;
  border-radius: 0;
}

/* 2. Theme specific types */
.notique-error {
  background-color: #1a1a1a !important; /* Overrides inline background */
  border: 1px solid #ef4444;
}

.notique-success {
  background-color: #1a1a1a !important;
  border: 1px solid #10b981;
}

Note: Because Notique applies a default background color via an inline style (style="background: #...") to ensure it works without external CSS, you must use !important when overriding the background-color.


API Reference

Methods

| Method | Description | |--------|-------------| | notique.success(...) | Green toast with check icon | | notique.error(...) | Red toast with error icon | | notique.info(...) | Blue toast with info icon | | notique.warning(...) | Yellow toast with alert icon | | notique.custom(...) | Custom toast (uses info style as base) | | notique.config(options) | Set global defaults |

Options

| Property | Type | Default | Description | |--------|------|---------|-------------| | message | string | — | Required. Toast title | | description | string | — | Optional subtitle | | type | 'success' \| 'error' \| 'info' \| 'warning' | inferred | Toast type | | position | 'top-right' \| 'top-left' \| 'bottom-right' \| 'bottom-left' \| 'top-center' \| 'bottom-center' | 'bottom-right' | Screen position | | duration | number | 3000 | Duration in ms | | dismiss | boolean | true | Click to dismiss | | showProgress | boolean | true | Show progress bar animation | | icon | string \| false | built-in SVG | Custom icon HTML or false to hide | | color | string | type default | Background color (hex, rgb, gradients) | | textColor | string | #fff | Text color | | className | string | — | Additional CSS utility classes (e.g., Tailwind) |


Framework Examples

Notique works natively with any framework.

Vanilla JS / TS

import { notique } from 'notique';
notique.success('Done!');

React / Next.js

import { notique } from 'notique';

export function SaveButton() {
  const handleSave = async () => {
    await save();
    notique.success('Saved!');
  };
  return <button onClick={handleSave}>Save</button>;
}

Angular

import { notique } from 'notique';
import { Injectable } from '@angular/core';

@Injectable({ providedIn: 'root' })
export class NotificationService {
  success(msg: string) { notique.success(msg); }
  error(msg: string)   { notique.error(msg); }
}

Vue / Nuxt

<script setup>
import { notique } from 'notique';

const handleSubmit = async () => {
  await submit();
  notique.success('Form submitted');
}
</script>

License

MIT © Andrés Rengifo