{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "sonner",
"title": "Sonner",
"description": "Toast notification component",
"dependencies": [
"sonner",
"next-themes"
],
"files": [
{
"path": "registry/ui/sonner.tsx",
"content": "\"use client\"\n\nimport { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\"\nimport { Loader2Icon } from \"lucide-react\"\n\n// USWDS-style filled circle icons (black background, white symbol)\nconst InfoIcon = () => (\n \n)\n\nconst WarningIcon = () => (\n \n)\n\nconst ErrorIcon = () => (\n \n)\n\nconst SuccessIcon = () => (\n \n)\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = \"system\" } = useTheme()\n\n return (\n ,\n info: ,\n warning: ,\n error: ,\n loading: ,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--popover-foreground)\",\n \"--normal-border\": \"var(--border)\",\n } as React.CSSProperties\n }\n toastOptions={{\n unstyled: true,\n classNames: {\n toast: \"flex items-center gap-3 w-full min-w-[360px] px-4 py-3 text-treasury-ink border-l-8 border-treasury-base-light bg-treasury-base-lightest shadow-sm\",\n title: \"text-base font-normal\",\n description: \"text-base text-treasury-ink\",\n actionButton: \"bg-treasury-primary text-white px-3 py-1.5 text-sm font-medium hover:bg-treasury-primary-dark\",\n cancelButton: \"bg-treasury-base-light text-treasury-ink px-3 py-1.5 text-sm font-medium hover:bg-treasury-base\",\n closeButton: \"text-treasury-base-dark hover:text-treasury-ink\",\n success: \"!border-l-treasury-secondary !bg-treasury-secondary-lightest\",\n error: \"!border-l-treasury-warning !bg-treasury-warning-lightest\",\n warning: \"!border-l-treasury-accent !bg-treasury-accent-lightest\",\n info: \"!border-l-treasury-primary-light !bg-treasury-primary-lightest\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n",
"type": "registry:ui"
}
],
"type": "registry:ui"
}