Skip to content

shadcn.io is an independent project built on shadcn/ui

Simple Success Message Alert Dialog for Svelte

A success dialog titled Success, saying the changes were saved, with a single Continue button. Nothing was saved.

UI library: Ark UI

The title is Success. The text says the changes have been saved. Continue is the only button. Nothing in the demo was saved.

Use it when a silent update would leave people unsure. A small save is less interrupting as a Toast. In Svelte, Ark UI does not know whether a save worked.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Alert Dialog anatomy: content, title, description, cancel, action

Usage

<AlertDialog><AlertDialogTrigger>{#snippet asChild(props)}<Button {...props()}>Complete Action</Button>{/snippet}</AlertDialogTrigger><AlertDialogContent><AlertDialogHeader><AlertDialogTitle>Success!</AlertDialogTitle><AlertDialogDescription>Your changes have been saved successfully.</AlertDialogDescription></AlertDialogHeader><AlertDialogFooter><AlertDialogClose>{#snippet asChild(props)}<AlertDialogAction {...props()}>Continue</AlertDialogAction>{/snippet}</AlertDialogClose></AlertDialogFooter></AlertDialogContent></AlertDialog>

FAQ

Success dialog or toast?

A dialog for significant completions people should acknowledge, like a payment or an account created. A toast for routine ones, like a saved setting.

What should the title say?

Something short and plain: Success!, Saved!, Done!. The description says what actually happened.

What goes in the description?

What completed, in past tense and plain words: Your changes have been saved successfully.

When should it appear?

Right after the action completes, never before. For async work, show a loading state first and the dialog once the server confirms.

What should the button say?

Continue when there's a next step, Done when the task ends, Got it for a standalone notice.

Does Continue close the dialog?

Yes.

API Reference

Alert Dialog

Sets props. The rest is on the Alert Dialog page.

Button

Sets props. The rest is on the Button page.