Skip to main content

SuccessDialog

BasicFeedback<co-success-dialog>

SuccessDialog confirms a major completed task with a green check, an "... Successfully" title and an Okay button.

import { SuccessDialog } from 'health-components';

Examples​

With Next Step​

Storybook

Patient Added​

Storybook

Open From Button​

Storybook

Usage​

<SuccessDialog title="Electronic Claim Submitted Successfully" onOkay={close}>The 277CA usually arrives within 24 hours.</SuccessDialog>

When to use​

  • End of a multi-step flow: claim submitted, patient added, ERA posted, check-in complete.

When not to use​

  • Small saves: Toast.

Variants and states​

VariantWhat it is
defaultTitle, body, Okay.
with next stepA secondary button such as "Add Another Patient".

Accessibility​

  • alertdialog; Okay gets focus.
  • The check is white on success (an icon, 3:1 rule).

Do and don't​

  • Do: Body says what happens next: "Availity will return a 277CA within 24 hours."
  • Don't: Use it for errors.

Props​

PropTypeDefaultDescription
title *string—"... Successfully" title, such as "Electronic Claim Submitted Successfully". Required.
childrenReactNodenoneBody: what happens next
okayLabelstring"Okay"Okay button label
onOkay() => voidnoneOkay handler
secondarystringnoneSecondary button label, such as "Add Another Patient"
onSecondary() => voidnoneSecondary button handler
openbooleantrueWhether the dialog is shown
onClose() => void`onOkay`Called on Escape
inlinebooleanfalseRender in place for docs

Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-success-dialog>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.

Angular template
<co-success-dialog title="…" okay-label="…" [defaultValue]="defaultValue" (co-okay)="onOkay($event.detail)">…</co-success-dialog>
KindNameDescription
attributetitle"... Successfully" title, such as "Electronic Claim Submitted Successfully". Required.
attributeokay-label / okayLabelOkay button label; default "Okay"
attributesecondarySecondary button label, such as "Add Another Patient"; default none
attributeopenWhether the dialog is shown; default true
attributeinlineRender in place for docs; default false
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-okayOkay handler; default none (React: onOkay)
eventco-secondarySecondary button handler; default none (React: onSecondary)
eventco-closeCalled on Escape; default `onOkay` (React: onClose)
slot(default)Body: what happens next; default none