Skip to content
Kitbay
Skill

ask-sonner

MITUpdated on Nov 9, 202655,996GitHub stars

A skill from Emil Kowalski's collection, written by the author of Sonner, for working with that React toast notification library.

What the skill teaches

A skill from Emil Kowalski's collection, written by the author of Sonner, for working with that React toast notification library. It covers mounting a single Toaster near the app root, including in Next.js layouts, calling toast from client code and returning results from server actions for the client to show. A table maps common needs to the right call, from plain and typed toasts to loading, promise-based, action and custom toasts, with recipes for updating, persisting or dismissing toasts. Styling moves from defaults through inline styles and classes to fully custom toasts. A troubleshooting table covers missing or doubled toasts, Tailwind classes, modals, dark mode and mobile offsets. A bundled API file gives exact props.

Capabilities

  • Set up Sonner toasts in a React or Next.js app
  • Pick the right toast call for a need
  • Style or fully customise toasts
  • Fix toasts that are missing, doubled or hidden