BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/9ui/sonner

sonner

9ui/sonner
FreeComponent

9ui publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by 9ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://9ui.dev/r/sonner.json

Source

ui/sonner.tsx9ui.dev/r/sonner.json
1"use client"
2
3import { useTheme } from "next-themes"
4import { Toaster as Sonner, ToasterProps } from "sonner"
5
6const Toaster = ({ ...props }: ToasterProps) => {
7 const { theme = "system" } = useTheme()
8 return (
9 <Sonner
10 theme={theme as ToasterProps["theme"]}
11 className="toaster group"
12 style={
13 {
14 "--normal-bg": "var(--color-popover)",
15 "--normal-text": "var(--color-popover-foreground)",
16 "--normal-border": "var(--color-border)",
17 "--error-bg": "var(--color-danger)",
18 "--error-text": "var(--color-danger-foreground)",
19 "--error-border": "var(--color-danger-border)",
20 "--warning-bg": "var(--color-warning)",
21 "--warning-text": "var(--color-warning-foreground)",
22 "--warning-border": "var(--color-warning-border)",
23 "--info-bg": "var(--color-info)",
24 "--info-text": "var(--color-info-foreground)",
25 "--info-border": "var(--color-info-border)",
26 "--success-bg": "var(--color-success)",
27 "--success-text": "var(--color-success-foreground)",
28 "--success-border": "var(--color-success-border)",
29 } as React.CSSProperties
30 }
31 {...props}
32 />
33 )
34}
35
36export { Toaster }

What it pulls in

npm packages

  • sonner

Other registry items

  • @9ui/button

Files it writes

  • src/components/ui/sonner.tsx

Facts

Registry
9ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on 9ui 9ui.dev borabaloglu/9ui on GitHub Raw registry item This item as JSON

More from 9ui

All 56 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordion9uiComponentsFreeno deps
alertalert9uiComponentsFreeno deps
alert-dialogalert-dialog9uiComponentsFreeno deps
aspect-ratioaspect-ratio9uiComponentsFreeno deps
autocompleteautocomplete9uiComponentsFreeno deps
avataravatar9uiComponentsFreeno deps
badgebadge9uiComponentsFreeno deps
breadcrumbsbreadcrumbs9uiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex