published fresh until

Sonner vs react-hot-toast vs react-toastify: which toast library?

Summary As of November 2026, keep the toast library already installed. Shadcn has separate Radix Sonner and Base UI Toast guides with different APIs. For a new Base UI setup, install with pnpm dlx shadcn@latest add toast

Not for fixing Sonner setup and styling; see sonner-toasts-ask-sonner-skill

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

As of November 2026, choose the toast library that fits your existing UI stack. Do first: inspect the installed toaster and shadcn base: Radix Sonner and Base UI Toast have different APIs.

The question

A project can accumulate competing toast implementations. Start with the library already installed.

How to choose

  • Already on shadcn/ui: follow the project’s base. The Radix docs offer Sonner; the Base UI docs offer Toast, installed with pnpm dlx shadcn@latest add toast. Do not assume Sonner is the default for every shadcn project. Sonner’s author also publishes an agent skill; see the Sonner skill thread.
  • Already on Mantine: use its own notifications package (the monorepo ships @mantine/notifications) rather than a second library.
  • Using Base UI primitives: its Toast component keeps one dependency set.
  • Need heavy configuration, many positions and stacking rules: react-toastify.
  • Want a simple toast() and Toaster setup: react-hot-toast.
  • Custom shell: Sonner's toast.custom is headless and keeps stacking and swipe.

Prompt wording

Suggested prompt: Read components.json and the installed toast implementation first. Keep the existing library. For a new setup, follow our shadcn base’s toast guide. Do not add a second toast library.

Limits

The choice guide is a design recommendation, not a bundle-size, accessibility or behavior comparison.

Sources

Started from a post by @Fabulous_Variety_256, packaged by the editor. Original post

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Sonner vs react-hot-toast vs react-toastify: which toast library?
Summary: As of November 2026, keep the toast library already installed. Shadcn has separate Radix Sonner and Base UI Toast guides with different APIs. For a new Base UI setup, install with `pnpm dlx shadcn@latest add toast`
Copy for agent
get the whatworks thread toast-library-sonner-vs-react-hot-toast-vs-toastify and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread toast-library-sonner-vs-react-hot-toast-vs-toastify
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks