BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shipbase/ui/toast

toast

shipbase-ui/toast
FreeComponent

shipbase/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/toast.json

Source

./src/components/ui/toast.tsxraw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/toast.json
1"use client"
2
3import * as React from "react"
4
5import {
6 Toast as ToastPrimitive,
7 Toaster as ToasterPrimitive,
8 createToaster,
9} from "@ark-ui/react/toast"
10import { type VariantProps, cva } from "class-variance-authority"
11import { X } from "lucide-react"
12
13import { cn } from "@/lib/utils"
14
15const toastVariants = cva(
16 "group z-[--z-index] flex h-[--height] w-full scale-[--scale] items-center justify-between space-x-4 rounded-md border bg-background p-6 pr-8 opacity-[--opacity] shadow-lg transition-all will-change-[translate,opacity,scale] [translate:var(--x)_var(--y)_0] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
17 {
18 variants: {
19 variant: {
20 default: "border bg-background text-foreground",
21 destructive:
22 "destructive group border-destructive bg-destructive text-destructive-foreground",
23 },
24 },
25 defaultVariants: {
26 variant: "default",
27 },
28 }
29)
30
31const Toaster = React.forwardRef<
32 React.ElementRef<typeof ToasterPrimitive>,
33 React.ComponentPropsWithoutRef<typeof ToasterPrimitive>
34>(({ ...props }, ref) => (
35 <ToasterPrimitive
36 ref={ref}
37 className="max-h-screen w-[calc(100%-var(--gap)*4)] flex-col-reverse p-4 sm:flex-col md:max-w-[420px]"
38 {...props}
39 />
40))
41Toaster.displayName = "Toaster"
42
43const Toast = React.forwardRef<
44 React.ElementRef<typeof ToastPrimitive.Root>,
45 ToastPrimitive.RootProps & VariantProps<typeof toastVariants>
46>(({ className, variant, ...props }, ref) => (
47 <ToastPrimitive.Root
48 ref={ref}
49 className={cn(toastVariants({ variant }), className)}
50 {...props}
51 />
52))
53Toast.displayName = "Toast"
54
55const ToastTitle = React.forwardRef<
56 React.ElementRef<typeof ToastPrimitive.Title>,
57 ToastPrimitive.TitleProps
58>(({ className, ...props }, ref) => (
59 <ToastPrimitive.Title
60 ref={ref}
61 className={cn("font-semibold text-sm", className)}
62 {...props}
63 />
64))
65ToastTitle.displayName = "ToastTitle"
66
67const ToastDescription = React.forwardRef<
68 React.ElementRef<typeof ToastPrimitive.Description>,
69 ToastPrimitive.DescriptionProps
70>(({ className, ...props }, ref) => (
71 <ToastPrimitive.Description
72 ref={ref}
73 className={cn("text-sm opacity-90", className)}
74 {...props}
75 />
76))
77ToastDescription.displayName = "ToastDescription"
78
79const ToastActionTrigger = React.forwardRef<
80// … truncated

What it pulls in

npm packages

  • @ark-ui/react
  • class-variance-authority
  • lucide-react

Files it writes

  • ./src/components/ui/toast.tsx

Facts

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

Go to the source

ui.shipbase.xyz shipbase/ui on GitHub Raw registry item This item as JSON

More from shipbase/ui

All 32 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshipbase/uiComponentsFree2 deps
avataravatarshipbase/uiComponentsFree1 dep
badgebadgeshipbase/uiComponentsFree2 deps
buttonbuttonshipbase/uiComponentsFree2 deps
cardcardshipbase/uiComponentsFree1 dep
checkboxcheckboxshipbase/uiComponentsFree2 deps
collapsiblecollapsibleshipbase/uiComponentsFree1 dep
comboboxcomboboxshipbase/uiComponentsFree2 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