BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Quantumblack Design System Registry/sonner
This component no longer exists. It was in Quantumblack Design System Registry’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-08 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Sonner

quantumblack-design-system-registry/sonner
RemovedComponent

A toast notification component.

Install it

npx shadcn@latest add http://designsystem.quantumblack.com/r/sonner.json

Source

src/components/ui/sonner.tsxdesignsystem.quantumblack.com/r/sonner.json
1'use client';
2
3import React, { memo, useEffect, useState } from 'react';
4import {
5 type ExternalToast,
6 Toaster as Sonner,
7 type ToastT,
8 type ToasterProps,
9 toast as sonnerToast,
10} from 'sonner';
11
12import { Button } from '@/components/ui/button';
13import { Icon } from '@/components/ui/icon';
14import { IconShell } from '@/components/ui/icon-shell';
15import { cn } from '@/lib/utils';
16
17type ToastType = NonNullable<ToastT['type']>;
18
19export interface ToastOptions extends Omit<ExternalToast, 'action' | 'cancel'> {
20 readonly action?: React.ReactNode;
21 readonly cancel?: React.ReactNode;
22 readonly testId?: string;
23}
24
25interface ToastProps {
26 readonly id: string | number;
27 readonly message: string;
28 readonly type: ToastType;
29 readonly options?: ToastOptions;
30}
31
32const toastTypeConfig = {
33 success: {
34 borderClass: 'border-l-stroke-status-success',
35 iconClass: 'text-status-success',
36 iconName: 'check_circle',
37 },
38 error: {
39 borderClass: 'border-l-stroke-status-error',
40 iconClass: 'text-status-error',
41 iconName: 'cancel',
42 },
43 warning: {
44 borderClass: 'border-l-stroke-status-warning',
45 iconClass: 'text-status-warning',
46 iconName: 'error',
47 },
48 info: {
49 borderClass: 'border-l-stroke-status-focus',
50 iconClass: 'text-status-information',
51 iconName: 'info',
52 },
53 default: {
54 borderClass: 'border-l-stroke-primary',
55 iconClass: 'text-fg-secondary',
56 iconName: 'playlist_add_check',
57 },
58} as const;
59
60type ToastConfigKey = keyof typeof toastTypeConfig;
61
62const getToastConfig = (type: ToastType) => {
63 if (type in toastTypeConfig) {
64 return toastTypeConfig[type as ToastConfigKey];
65 }
66
67 return toastTypeConfig.info;
68};
69
70const getDefaultIcon = (config: ReturnType<typeof getToastConfig>) => (
71 <IconShell type="custom" className={config.iconClass}>
72 <Icon icon={config.iconName} />
73 </IconShell>
74);
75
76function getCancelComponent(
77 cancel: ToastOptions['cancel'],
78 id: string | number,
79): React.ReactNode {
80 if (cancel === null) {
81 return null;
82 }
83
84 if (cancel !== undefined) {
85 return cancel;
86 }
87
88 return (
89 <Button
90 variant="ghost"
91 size="icon-xxs"
92 onClick={() => sonnerToast.dismiss(id)}
93 aria-label="Close toast">
94 <IconShell type="neutral" hoverable size="sm">
95 <Icon icon="close" />
96 </IconShell>
97 </Button>
98 );
99}
100
101const Toast = memo(function Toast({ id, message, type, options }: ToastProps) {
102 const { action, cancel, className, icon, testId } = options || {};
103
104// … truncated

What it pulls in

npm packages

  • sonner
  • next-themes

Other registry items

  • /r/theme.json
  • /r/button.json
  • /r/utils.json
  • /r/icon.json
  • /r/icon-shell.json

Files it writes

  • src/components/ui/sonner.tsx

Facts

Registry
Quantumblack Design System Registry
Type
registry:ui
Access
Free
Files written
1
Licence
NOASSERTION
In the index
at or before 2026-08-03
Last confirmed
11 days ago

Go to the source

designsystem.quantumblack.com mckinsey/quantumblack-design-system on GitHub Raw registry item This item as JSON

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