Skip to content

Alert

Show design guidelines

HTML React Angular
Along with a description that follows the title.
<certara-alert headline="Notice title">
Along with a description that follows the title.
</certara-alert>
import { CertaraAlert } from '@certara/certara-ui-react';
<CertaraAlert headline="Notice title">
Along with a description that follows the title.
</CertaraAlert>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-alert headline="Notice title">
Along with a description that follows the title.
</certara-alert>
HTML React Angular

Dismissible alerts have a close button

MDX may have transformed content. Use example prop instead on ComponentPreview.
<certara-alert dismissible="true">
<p>Dismissible alerts have a close button</p>
</certara-alert>
import { CertaraAlert } from '@certara/certara-ui-react';
<CertaraAlert dismissible={true}>
<p>Dismissible alerts have a close button</p>
</CertaraAlert>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-alert dismissible="true">
<p>Dismissible alerts have a close button</p>
</certara-alert>
HTML React Angular
<certara-alert variant="success" align-content="center" headline="Saved!"></certara-alert>
import { CertaraAlert } from '@certara/certara-ui-react';
<CertaraAlert variant="success" align-content="center" headline="Saved!" />
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-alert variant="success" align-content="center" headline="Saved!"></certara-alert>

alignContent

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

dismissible

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

headline

Attributeheadline
Typestring
Defaultundefined
Requiredfalse
DescriptionThe bolded first sentence of the alert

shake

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

toast

Attributetoast
Typeboolean
Defaultfalse
Requiredfalse
DescriptionInternal prop. If true, the alert will be displayed as a toast, fades and animates in, then typically disappears after a few seconds or is present until the user dismisses it. Preferable to use the certara-toast component instead

variant

Attributevariant
Type"danger" | "info" | "success" | "warning"
Default'info'
Requiredfalse
Descriptionsets the theme/color of the alert
NameDescriptionBubbles
certaraCloseEvent emitted when the alert is closed if dismissible is truetrue

There are no public methods available for this component

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