AtroUIAtroUI
  • Getting Started
  • Installation
  • MCP server
  • Coming from…
  • Collections
  • Registry
  • Theming
  • Host APIs
  • Brand kit
  • Identity kit
  • Landing kit
  • Launch workflow
  • For agents
  • Glossary
  • Compare
  • Alternatives hub
  • vs Aceternity UI
  • vs Magic UI
  • Aceternity alternative
  • Magic UI alternative
  • Tailwind Plus alternative
  • Changelog
  • Blog
  • Updates
  • ButtonCLI
  • DialogCLI
  • Alert DialogCLI
  • MenuCLI
  • Context MenuCLI
  • Navigation MenuCLI
  • MenubarCLI
  • PopoverCLI
  • TooltipCLI
  • Preview CardCLI
  • Scroll AreaCLI
  • SeparatorCLI
  • FieldCLI
  • Number FieldCLI
  • OTP FieldCLI
  • FormCLI
  • FieldsetCLI
  • InputCLI
  • TextareaCLI
  • CheckboxCLI
  • Checkbox GroupCLI
  • RadioCLI
  • SwitchCLI
  • ToggleCLI
  • Toggle GroupCLI
  • ToolbarCLI
  • AccordionCLI
  • CollapsibleCLI
  • ComboboxCLI
  • AutocompleteCLI
  • DrawerCLI
  • TabsCLI
  • ToastCLI
  • ProgressCLI
  • SliderCLI
  • MeterCLI
  • AvatarCLI
  • CardCLI
  • Form SelectCLI
  • Motion PlaygroundCLI
  • BreadcrumbsCLI
  • ProseCLI
  • Founder AvatarCLI
  • Theme ToggleCLI
  • Adaptive Theme SwitchCLI
  • Theme ProviderCLI
  • LogoCLI
  • TimelineCLI
  • Fade InCLI
  • StaggerCLI
  • Line RevealCLI
  • Word Reveal ScrollCLI
  • Text MorphCLI
  • Copy ButtonCLI
  • Label RollCLI
  • MagneticCLI
  • TiltCLI
  • SpotlightCLI
  • Animate NumberCLI
  • Transition PanelCLI
  • Scroll ProgressCLI
  • ASCII
  • DonutCLI
  • RainCLI
  • WaveCLI
  • SparkCLI
  • BarCLI
  • BootCLI
  • WordmarkCLI
  • DecodeCLI
  • Site HeaderCLI
  • Site FooterCLI
  • Bold FooterCLI
  • HeroCLI
  • PrincipleCLI
  • WorkCLI
  • CraftsCLI
  • LabCLI
  • WhoCLI
  • PricingCLI
  • Feature GridCLI
  • Logo CloudCLI
  • FAQCLI
  • Contextual CTACLI
  • Exit IntentCLI
  • Calendly EmbedCLI
  • Waitlist FormHost API
  • Newsletter FormHost API
  • JournalCLI
  • Social ShareCLI
  • ResourcesCLI
  • AR PortfolioCLI
  • Made With EmbedCLI
  • Hero ParallaxCLI
  • Hero LampCLI
  • Logo MarqueeCLI
  • Testimonials StackCLI
  • Feature BentoCLI
  • CTA BandCLI
  • Pricing TiersCLI
  • FAQ AccordionCLI
  • Stats BandCLI
  • Integration BeamCLI
  • Showcase CarouselCLI
  • Auth SplitCLI
  • SaaS StarterCLI
  • Landing KitCLI
  • OG ExamplesCLI
  • OG Live PreviewCLI
  • OG WorkspaceHost API
  • Thumbnail PreviewCLI
  • Thumbnail WorkspaceHost API
  • Project PlannerCLI
  • Scope ChatHost API
  • Launch WorkflowCLI
  • Live DashboardCLI
  • Analytics ProviderCLI
AtroUI·Home·Components·Blog·GitHub·Changelog

Primitive · CLI

Toast

Edge toast stack with opacity+y enter/exit on Base UI Toast.

Preview

$npx shadcn@latest add @atroui/toast

Try · Fire a toast · watch the stack

Stack is empty

Installation

Agent blurb — install command + no npm UI rule. For agents

$npx shadcn@latest add @atroui/toast

Source lands in your repo. Installation · Registry

Usage

Wrap the app (or stage) in ToastProvider, mount Toaster once, then call useToastManager().add. Stack offset stays on CSS vars so enter travel does not fight the pile.
tsx
import {
  ToastProvider,
  Toaster,
  useToastManager,
} from "@/components/ui/toast"
import { Button } from "@/components/ui/button"

function Notify() {
  const toast = useToastManager()
  return (
    <Button
      onClick={() =>
        toast.add({ title: "Saved", description: "Draft published." })
      }
    >
      Show toast
    </Button>
  )
}

<ToastProvider>
  <Notify />
  <Toaster />
</ToastProvider>
Related
  • Button
  • Dialog
  • Alert Dialog
  • Menu

Toast

PreviousTabsNextProgress
import {
  ToastProvider,
  Toaster,
  useToastManager,
} from "@/components/ui/toast"
import { Button } from "@/components/ui/button"

function Notify() {
  const toast = useToastManager()
  return (
    <Button
      onClick={() =>
        toast.add({ title: "Saved", description: "Draft published." })
      }
    >
      Show toast
    </Button>
  )
}

<ToastProvider>
  <Notify />
  <Toaster />
</ToastProvider>