This component no longer exists. It was in Pure UI’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-10 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.
Toast
pure-ui/toastRemovedComponent
A customizable toast component
Install it
npx shadcn@latest add https://raw.githubusercontent.com/MusKRI/pure-ui/main/public/r/toast.jsonSource
1"use client";23import * as React from "react";4import { Toast } from "@base-ui/react/toast";56import { cn } from "@/lib/classes";7import { buttonVariants } from "@/registry/pure-ui/ui/button";8import { Spinner } from "@/registry/pure-ui/ui/spinner";910const toastManager = Toast.createToastManager();1112type ToastPosition =13 | "top-left"14 | "top-center"15 | "top-right"16 | "bottom-left"17 | "bottom-center"18 | "bottom-right";1920type ToastRadius = "none" | "sm" | "md" | "lg" | "full";2122interface CustomToastData {23 radius?: ToastRadius;24}2526function getRadiusClass(radius?: ToastRadius): string {27 switch (radius) {28 case "none":29 return "rounded-none";30 case "sm":31 return "rounded-sm";32 case "md":33 return "rounded-md";34 case "lg":35 return "rounded-lg";36 case "full":37 return "rounded-full px-5.5!";38 default:39 return "rounded-none"; // default radius40 }41}4243interface ToastProviderProps extends Toast.Provider.Props {44 position?: ToastPosition;45}4647function ToastProvider({48 children,49 position = "bottom-right",50 ...props51}: ToastProviderProps) {52 return (53 <Toast.Provider toastManager={toastManager} {...props}>54 {children}55 <ToastList position={position} />56 </Toast.Provider>57 );58}5960function ToastList({61 position = "bottom-right",62}: {63 position?: ToastPosition;64}) {65 const { toasts } = Toast.useToastManager();66 const isTop = position.startsWith("top");6768 return (69 <Toast.Portal data-slot="toast-portal">70 <Toast.Viewport71 data-slot="toast-viewport"72 data-position={position}73 className={cn(74 "fixed z-100 mx-auto max-w-90 [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)] w-[calc(100%-var(--toast-inset)*2)]",75 // Vertical positioning76 "data-[position*=top]:top-(--toast-inset)",77 "data-[position*=bottom]:bottom-(--toast-inset)",78 // Horizontal positioning79 "data-[position*=left]:left-(--toast-inset)",80 "data-[position*=right]:right-(--toast-inset)",81 "data-[position*=center]:left-1/2 data-[position*=center]:-translate-x-1/2"82 )}83 >84 {toasts.map((toast) => {85 console.log("toast type", toast.type);8687 return (88 <Toast.Root89 data-slot="toast-root"90 key={toast.id}91 toast={toast}92// … truncated
What it pulls in
npm packages
Other registry items
