PrimeBrickPrimeBrick
  • Docs
  • Contact
  • MIT License
  • Documentation
  • MCP Server
  • API Catalog
  • Services
  • Libraries
PrimeBrickPrimeBrick

© 2026 PrimeBrick. MIT License. v3.11.2

github
Backend
Frontend
    Developer Guide
      OverviewGetting startedUI stackApp shell & sidebarAuthentication & sessionsSystem settingsUI componentsUI patternsIcon ConventionsInput AnatomyField Hints & TooltipsButton Style StandardsEntity metadatai18n — Translations on the FrontendThe AI Tool Loop (caller-driven)Error HandlingComposables (use* hooks)
      Components
        Entity list tableComboSelectDynamicIconColorSelectorColorPickerAvatarPreviewEventCardCommandPaletteAppShellAppSidebarAppTopbarAppPageLayoutAppPageScaffoldAppPageBreadcrumbAppServerBannerBrowserClientInfoLangSelectThemeToggleSidebarAppLauncherSidebarHealthBadgeSidebarOrgSwitcherSidebarProfileMenuSidebarVersionBadgeButtonButton (async)FormPageLayoutFormLabelWithPriorityHelpPasswordChecklistChoiceboxDateWheelPickerEventToastLoadingBarMetadataLoadingJsonTableViewerNumberTickerStatCardToolbarDialogBorderedEntity Confirm DialogsSheet panelRFCErrorDialogLoginFormPasskeyButtonPasskeyEnrollmentAuthMethodsPromptDialogSessionExpiredDialogInputSliderSliderFieldSwitchFieldSelectableFieldsetBadgeValuesEditorTooltipFormPrimeFieldSmartRegexInput
      API Reference
Microservices
powered by Zudoku
Components

DialogBordered

src/lib/components/ui/dialog-bordered.svelte

Purpose

Wraps ui/dialog to give the dialog a semantic severity color: either a colored top strip (default) or a full gradient border (tone="soft"). Use it anywhere a dialog must communicate its category at a glance — confirmations, error viewers, destructive actions, warnings.

Entity delete/restore confirmations must NOT use DialogBordered directly. Use the standard entity dialogs instead — they derive title and body copy from translation keys by convention. See Entity confirm dialogs.

Origin

Custom — thin wrapper around the in-repo ui/dialog (shadcn-svelte™ extended). Adds the severity accent and forwards open/children plus any bits-ui Dialog.Content props.

Usage

Default (primary top strip)

Code
<script lang="ts"> import DialogBordered from "$lib/components/ui/dialog-bordered.svelte"; let open = $state(false); </script> <DialogBordered bind:open> <h2 class="text-lg font-semibold">Confirm action</h2> <p class="text-sm text-muted-foreground">Are you sure?</p> </DialogBordered>

Destructive (animated gradient strip)

Code
<DialogBordered bind:open severity="destructive" showCloseButton={false}> <h2 class="text-lg font-semibold">Delete cache entry</h2> <p class="text-sm text-muted-foreground">This action cannot be undone.</p> </DialogBordered>

Soft tone (full gradient border, no top strip)

Code
<DialogBordered bind:open severity="primary" tone="soft"> <p>Content framed by a full gradient border.</p> </DialogBordered>

Props

PropTypeDefaultDescription
openboolean (bindable)—Dialog visibility
severity'primary' | 'info' | 'success' | 'warning' | 'destructive' | 'neutral''primary'Accent color. warning/destructive animate the gradient.
tone'' | 'soft''''' = colored top strip; 'soft' = full-around gradient border.
showCloseButtonbooleantrueForwarded to Dialog.Content
classstring''Extra classes on Dialog.Content
childrenSnippetrequiredDialog body
...restProps——Pass-through of bits-ui Dialog.Content props (escapeKeydownBehavior, onInteractOutside, …) for persistent dialogs

Severity → accent map

severityAccent
primarysky-400 → indigo-400 gradient strip
infosky-400 → blue-600 gradient strip
successemerald-400 → emerald-600 gradient strip
warninganimated yellow gradient strip
destructiveanimated rose→red gradient strip
neutralsolid neutral-500 strip

When to use which dialog

CaseComponent
Delete/restore an entity record (single or bulk)DeleteDialog / RestoreDialog / BulkDeleteDialog / BulkRestoreDialog — never DialogBordered directly
Destructive action on a non-entity thing (cache files, credentials, sessions)DialogBordered severity="destructive" with a custom title
Non-destructive confirm / notice / detail viewerDialogBordered with the matching severity
Generic content dialog with no semantic intentplain ui/dialog

Next steps

  • Entity confirm dialogs
  • RFCErrorDialog
  • Component catalog
Last modified on October 28, 2026
ToolbarEntity Confirm Dialogs
On this page
  • Purpose
  • Origin
  • Usage
    • Default (primary top strip)
    • Destructive (animated gradient strip)
    • Soft tone (full gradient border, no top strip)
  • Props
  • Severity → accent map
  • When to use which dialog
  • Next steps