BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/mcoli-ui-registry/mc-sonner

MicroClub Sonner

mcoli-ui-registry/mc-sonner
FreeComponent

A toast component for MicroClub UI

Live preview

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

Install it

npx shadcn@latest add https://mcoli-ui.microclub.info/r/mc-sonner.json

Source

registry/ui/mc-sonner.tsxmcoli-ui.microclub.info/r/mc-sonner.json
1'use client';
2
3import { Toaster as SonnerComponent, toast as rawToast } from 'sonner';
4import { CheckCircle2, AlertCircle } from 'lucide-react';
5
6type ToasterProps = React.ComponentProps<typeof SonnerComponent>;
7
8const toastIcons = {
9 success: <CheckCircle2 className="text-muted-foreground shrink-0 h-3.5 w-3.5" />,
10 warning: <AlertCircle className="text-muted-foreground shrink-0 h-3.5 w-3.5" />,
11 error: <AlertCircle className="text-muted-foreground shrink-0 h-3.5 w-3.5" />,
12};
13
14interface ToastOptions {
15 description?: string;
16 action?: {
17 label: string;
18 onClick: () => void;
19 };
20}
21
22const mcToastCustom = (
23 message: string,
24 variant?: 'success' | 'warning' | 'error',
25 options?: ToastOptions
26) => {
27 const Icon = variant ? toastIcons[variant] : null;
28
29 return rawToast(
30 <div className="w-full h-full flex flex-col items-start justify-center gap-0.5">
31 <div className="flex items-center gap-1.5 w-full max-w-66.5">
32 {Icon}
33 <span className="text-sm font-medium tracking-normal leading-5 text-card-foreground">
34 {message}
35 </span>
36 </div>
37
38 {options?.description && (
39 <p className="text-sm font-normal tracking-normal leading-5 text-muted-foreground max-w-66.5">
40 {options.description}
41 </p>
42 )}
43 </div>,
44 {
45 action: options?.action,
46 }
47 );
48};
49
50export const toast = Object.assign(
51 (message: string, options?: ToastOptions) => mcToastCustom(message, undefined, options),
52 {
53 success: (message: string, options?: ToastOptions) =>
54 mcToastCustom(message, 'success', options),
55 warning: (message: string, options?: ToastOptions) =>
56 mcToastCustom(message, 'warning', options),
57 error: (message: string, options?: ToastOptions) => mcToastCustom(message, 'error', options),
58 }
59);
60
61const McSonner = ({ ...props }: ToasterProps) => {
62 return (
63 <SonnerComponent
64 className=""
65 position="top-center"
66 toastOptions={{
67 unstyled: true,
68 classNames: {
69 toast:
70 'w-97.5 min-h-18.5 bg-background flex items-center justify-between gap-1.5 p-4 border-[1px] rounded-lg shadow-xs border-border',
71 actionButton:
72 'flex items-center justify-center bg-primary text-background text-sm py-2 px-3.5 min-w-15.5 max-w-21.5 min-h-9 rounded-[8px] shadow-xs shrink-0 cursor-pointer',
73 },
74 }}
75 {...props}
76 />
77 );
78};
79
80export default McSonner;

What it pulls in

npm packages

  • sonner
  • lucide-react

Files it writes

  • registry/ui/mc-sonner.tsx

Facts

Registry
mcoli-ui-registry
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

Docs on mcoli-ui-registry mcoli-ui.microclub.info MicroClub-USTHB/mcoli-ui on GitHub Raw registry item This item as JSON

More from mcoli-ui-registry

All 42 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
MicroClub Accordionmc-accordionmcoli-ui-registryComponentsFree2 deps
MicroClub Alertmc-alertmcoli-ui-registryComponentsFree1 dep
MicroClub Alert Dialogmc-alert-dialogmcoli-ui-registryComponentsFree1 dep
MicroClub Avatarmc-avatarmcoli-ui-registryComponentsFree1 dep
MicroClub Badgemc-badgemcoli-ui-registryComponentsFree1 dep
MicroClub Breadcrumbmc-breadcrumbmcoli-ui-registryComponentsFree2 deps
MicroClub Buttonmc-buttonmcoli-ui-registryComponentsFree2 deps
MicroClub Calendarmc-calendarmcoli-ui-registryComponentsFree3 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex