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

@uiness/toast

v0.1.0

Published

Toasts and notifications for React: stacked, swipeable, with promise tracking and actions. Zero dependencies.

Readme

@uiness/toast

Toasts and notifications for React. Stacked with the newest in front, expand on hover, swipe to dismiss, promise tracking, actions, six positions. Zero dependencies.

pnpm add @uiness/toast

Usage

import { Toaster, toast } from '@uiness/toast'

function App() {
  return (
    <>
      <Toaster />
      <Page />
    </>
  )
}

toast('Event created')
toast.success('Saved', { description: 'All changes are in.' })
toast.error('Could not save')
toast('Deleted', { action: { label: 'Undo', onClick: restore } })
toast.promise(save(), { loading: 'Saving…', success: 'Saved', error: 'Could not save' })

toast() options

| Option | Description | | --- | --- | | id | Reuse to update a toast in place. | | title, description | Content. | | type | default, success, error, info, warning, loading. | | icon | Replace the type icon, null hides it. | | duration | Auto dismiss in ms, Infinity to keep. Loading toasts default to Infinity. | | action, cancel | { label, onClick } buttons. Actions close the toast unless event.preventDefault() is called. | | dismissible | Swipe and close button. Default true. | | closeButton, position, important | Per toast overrides. | | render | Replace the card with your own markup, see toast.custom. | | onDismiss, onAutoClose | Callbacks. |

toast.dismiss(id) closes one, toast.dismiss() closes all.

<Toaster /> props

| Prop | Default | Description | | --- | --- | --- | | position | 'bottom-right' | Any corner or center of the top and bottom edges. | | expand | false | Keep the stack expanded instead of collapsing until hovered. | | visibleToasts | 3 | Toasts visible in the collapsed stack. | | richColors | false | Colored backgrounds per type. | | closeButton | false | Close button on every toast. | | duration | 4000 | Default auto dismiss delay. | | gap, offset | 14, 24 | Spacing in px. | | icons | | Custom icons per type. | | toastClassName, toastStyle | | Applied to every card. | | store | shared | A store from createToastStore() for isolated toasters. |

Theming

--toast-bg, --toast-color, --toast-border, --toast-shadow, --toast-radius, --toast-font,
--toast-width, --toast-action-bg, --toast-action-color,
--toast-success-bg / -color / -border, same for error, info and warning (with richColors)

Data attributes for CSS: data-uiness-toaster, data-position, data-expanded on the region; data-toast, data-type, data-index, data-front, data-removing on each card.

Accessibility

The region is labelled "Notifications". Each toast is a polite live region, or assertive with important. Timers pause while hovering and while the page is hidden.

License

MIT