Components
DialogBordered
src/lib/components/ui/dialog-bordered.svelte
Purpose
Wraps ui/dialog to add a colored top strip (2px tall) above the dialog body.
The strip color signals the dialog's semantic intent (primary, info, warning,
success, destructive, neutral). Use it anywhere you want a dialog that
visually communicates its category at a glance — confirmation prompts,
error detail viewers, success notices.
Origin
Custom — thin wrapper around the in-repo ui/dialog (shadcn-svelte™
extended). Adds the colored header strip and forwards open/children.
Usage
Default (primary)
Code
Destructive confirmation
Code
Warning without close button
Code
Props
Full prop table: see API reference — dialog-bordered.
Key props:
open(boolean, bindable) — controls dialog visibility.color("primary" | "info" | "warning" | "success" | "destructive" | "neutral", default"primary") — top strip color.warninganddestructiveuse an animated gradient pan.showCloseButton(boolean, defaulttrue) — forwarded toDialog.Content.class— extra classes forDialog.Content.children(Snippet, required) — dialog body.
Next steps
Last modified on