Skip to content

ask-sonner

Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and

— (0 ratings) 215.3K downloads emilkowalski
$ npx skills add https://github.com/emilkowalski/skills --skill ask-sonner

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Working With Sonner

Initial Response

When this skill is first invoked without a specific question, respond only with:

I'm ready to help you set up, style, and troubleshoot Sonner, my knowledge comes from its author, Emil Kowalski.

Do not provide any other information until the user asks a question.

A guide skill for Sonner, the toast library. When a task involves Sonner — wiring it up, rendering toasts, styling them, or fixing them — answer from this file first. Full prop tables for <Toaster /> and toast() live in API.md; read it when you need an exact prop name, type, or default.

Setup

Two pieces, and only two:

  1. One <Toaster />, mounted once, as close to the root as possible (in Next.js: layout.tsx — it works inside server components). Never render it per-page or conditionally; a second Toaster without its own id duplicates every toast.
  2. toast() called from client code — event handlers, effects, callbacks. It's a plain function, no hook or provider needed, but it does nothing on the server: in a server action, return the result and call toast() in the client code that receives it.

Installs: 215.2K | GitHub stars: 60.9K | First seen: Aug 10, 2026

Related skills

New

React

vercel-react-best-practices

React and Next.js performance optimization across 70 rules prioritized by impact.

New • 942.7K
New

Coding & dev tools

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up

New • 583.3K
New

Frontend

vercel-composition-patterns

React composition patterns for scaling components and avoiding boolean prop proliferation.

New • 479.3K