Skip to content

Toast

Design guidelines
HTML
React
Angular
Along with a description that follows the title.
<certara-toast headline="Notice title">
Along with a description that follows the title.
</certara-toast>
import { CertaraToast } from '@certara/certara-ui-react';
<CertaraToast headline="Notice title">
Along with a description that follows the title.
</CertaraToast>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-toast headline="Notice title">
Along with a description that follows the title.
</certara-toast>
HTML
React
Angular
Click the X to dismiss this toast.
Play
<certara-toast dismissible headline="Dismissible">Click the X to dismiss this toast.</certara-toast>
import { CertaraToast } from '@certara/certara-ui-react';
<CertaraToast dismissible headline="Dismissible">Click the X to dismiss this toast.</CertaraToast>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-toast dismissible headline="Dismissible">Click the X to dismiss this toast.</certara-toast>
HTML
React
Angular
<certara-toast variant="success" align-content="left" headline="Left aligned"></certara-toast>
import { CertaraToast } from '@certara/certara-ui-react';
<CertaraToast variant="success" alignContent="left" headline="Left aligned" />
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-toast variant="success" align-content="left" headline="Left aligned"></certara-toast>

alignContent

Attributealign-content
Type"center" | "left" | "right"
Default'left'
Requiredfalse
DescriptionThe content alignment inside the toast

color

Attributecolor
Type"danger" | "info" | "success" | "warning"
Defaultundefined
Requiredfalse
DescriptionSets the theme/color of the toast. Defaults to info.

dismissible

Attributedismissible
Typeboolean
Defaultfalse
Requiredfalse
DescriptionIf true, the toast can be dismissed by clicking the close button

headline

Attributeheadline
Typestring
Defaultundefined
Requiredfalse
DescriptionThe bolded first sentence of the toast

shake

Attributeshake
Typeboolean
Defaultfalse
Requiredfalse
DescriptionIf true, the toast will shake when it appears

variant

Attributevariant
Type"danger" | "info" | "success" | "warning"
Defaultundefined
Requiredfalse
DescriptionSets the theme/color of the toast. DEPRECATED. Use color instead. Will be removed in the next major version.
NameDescriptionBubbles
certaraCloseEvent emitted when the toast is closed if dismissible is truefalse

There are no public methods available for this component

NameDescription
Default toast content
toast-ctasSlot for additional call-to-action buttons or links

Toast alerts are used to provide timely information about system occurrences as well as feedback on the outcome of user actions.

Lorem ipsum dolor sit amet consectetur adipiscing elit con.
Play
  • Toast alerts may be set to auto-dismiss after a certain period of time, but should always include UI for the user to manually dismiss.
  • Float on top of the other UI elements on the page; their presence does not alter the position of any other elements.
  • Always include a drop shadow.
  • Appear on the screen with an animation.

The four variants use different icons and colors to indicate the type and urgency of the message.

  • Info: informs the user of a change or gives them advice.
  • Success: lets the user know of a successful outcome. NOTE: Toast alerts are used by default for this type of messaging. Use a banner alert only if it is persistent, delayed, or if there is an additional action.
  • Warning: lets the user know about important system information that deserves caution.
  • Danger: alerts the user of a problem that requires immediate attention.
  • Default placement is top center of the page; sliding in from the left.
  • Final placement and animation direction may be determined on a case-by-case basis.

By default, toast alerts should appear stacked over content, at the top center of the viewport.

  • Toast alerts typically do not include a title.
  • It’s best to keep their content short since they cover other UI elements on the page. (140 character max.)
  • Use sentence case and appropriate punctuation.
  • Toast alerts are dismissible with keyboard [esc].
  • For alerts with no actions, notify the user via assistance technologies without having to change focus to the toast alert.

Follow the accessibility guidelines for each component found in the alert. View guidelines

W3 guidelines for status messagesView component in Figma