UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

shadcn/ui/Sonner

Feedback & loaders
1 of 2
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

2 versions·2 librariesCompare all toasts →

  • shadcn/ui
  • 8bitcn

Sonner

npx shadcn@latest add https://ui.shadcn.com/r/styles/new-york-v4/sonner.json
Open in v0 Docs Repo
Library
shadcn/ui
License
MIT
Stack
React · Tailwind CSS · radix
Packages
cnnext-themesradix-uisonner
Also adds
button
Size
41 lines
Demo
From shadcn/ui

Code

registry/new-york-v4/ui/sonner.tsx

"use client"

import {
  CircleCheckIcon,
  InfoIcon,
  Loader2Icon,
  OctagonXIcon,
  TriangleAlertIcon,
} from "lucide-react"
import { useTheme } from "next-themes"
import { Toaster as Sonner, type ToasterProps } from "sonner"

const Toaster = ({ ...props }: ToasterProps) => {
  const { theme = "system" } = useTheme()

  return (
    <Sonner
      theme={theme as ToasterProps["theme"]}
      className="toaster group"
      icons={{
        success: <CircleCheckIcon className="size-4" />,
        info: <InfoIcon className="size-4" />,
        warning: <TriangleAlertIcon className="size-4" />,
        error: <OctagonXIcon className="size-4" />,
        loading: <Loader2Icon className="size-4 animate-spin" />,
      }}
      style={
        {
          "--normal-bg": "var(--popover)",
          "--normal-text": "var(--popover-foreground)",
          "--normal-border": "var(--border)",
          "--border-radius": "var(--radius)",
        } as React.CSSProperties
      }
      {...props}
    />
  )
}

export { Toaster }

More like this

Accordion

SmoothUI·Data display

Sidebar

shadcn/ui·Navigation

Ai Message

SmoothUI·Backgrounds

Ai Reasoning

SmoothUI·Media & 3D

Dot Pattern

Magic UI·Backgrounds

Dropdown Menu

shadcn/ui·Overlays

Sheet

shadcn/ui·Overlays

Skeleton

shadcn/ui·Feedback & loaders

Progress

shadcn/ui·Feedback & loaders

Marking Menu

Kokonut UI·Overlays

Alert dialog

HextaUI·Inputs & forms

Scroll Index

Kokonut UI·Text effects

Bubble Menu

React Bits·BackgroundsMIT+

Input Otp

shadcn/ui·Inputs & forms

Slider

shadcn/ui·Inputs & forms