Contextual feedback messages for typical user actions with flexible alert messages.

Basic Alerts

Primary! This is a primary alert — check it out!
Secondary! This is a secondary alert — check it out!
Success! This is a success alert — your operation completed successfully.
Danger! This is a danger alert — something went wrong!
Warning! This is a warning alert — please review before proceeding.
Info! This is an info alert — here's some useful information.
Light! This is a light alert — subtle but important.
Dark! This is a dark alert — for high contrast messaging.

Alerts with Icons

Success! Your changes have been saved successfully.
Error! Unable to process your request. Please try again.
!
Warning! Your session will expire in 5 minutes.
Information! New features are now available in your account.

Dismissible Alerts

Well done! You successfully read this important alert message.
Oh snap! Change a few things and try submitting again.
Warning! Better check yourself, you're not looking too good.
Heads up! This alert needs your attention, but it's not super important.

Alerts with Additional Content

Always use pa-alert__heading for a separate title element; default sits at the alert's body font-size, add --lg for the punchier presentation. Pair with pa-alert__list for an in-alert <ul>, and a plain <hr> for a subtle divider that picks up an alert-tinted top border automatically.

Success!

Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.


Whenever you need to, be sure to use margin utilities to keep things nice and tidy.

Storage running low

Your account is approaching the quota limit. The next sync will fail unless you free space:

  • Archive old projects you don't actively edit
  • Empty your trash folder
  • Upgrade to a larger plan

Heading size: default vs. --lg

Same markup either way — always pa-alert__heading. Default size sits at the alert's body font-size for compact status banners ("Validation failed", "Saved", "Connection lost"). Add pa-alert__heading--lg when the alert needs deliberate attention (blocking errors, system updates, quota warnings).

Default (pa-alert__heading)

With --lg

Alerts with custom actions

Wrap action buttons in pa-alert__actions. The element renders a thin divider above with symmetric padding — same separator pattern as pa-toast__actions, so action-bearing alerts and custom-action toasts feel visually consistent.

Sizes

Three sizes — pa-alert--sm, default, and pa-alert--lg. Both padding and font-size step at each size; themes can retune via the $alert-padding-{sm,lg}-{v,h} and $alert-font-size-{sm,lg} SCSS variables.

Small — pa-alert--sm

Default

Large — pa-alert--lg

Outline Alerts

Primary Outline! This is a primary outline alert.
Success Outline! This is a success outline alert.
Danger Outline! This is a danger outline alert.
Warning Outline! This is a warning outline alert.
Info Outline! This is an info outline alert.

Theme Color Alerts

Color 1! Theme color slot 1 alert.
Color 2! Theme color slot 2 alert.
Color 3! Theme color slot 3 alert.
Color 4! Theme color slot 4 alert.
Color 5! Theme color slot 5 alert.
Color 6! Theme color slot 6 alert.
Color 7! Theme color slot 7 alert.
Color 8! Theme color slot 8 alert.
Color 9! Theme color slot 9 alert.

Theme Color Outline Alerts

Color 1 Outline! Theme color slot 1 outline alert.
Color 2 Outline! Theme color slot 2 outline alert.
Color 3 Outline! Theme color slot 3 outline alert.
Color 4 Outline! Theme color slot 4 outline alert.
Color 5 Outline! Theme color slot 5 outline alert.
Color 6 Outline! Theme color slot 6 outline alert.
Color 7 Outline! Theme color slot 7 outline alert.
Color 8 Outline! Theme color slot 8 outline alert.
Color 9 Outline! Theme color slot 9 outline alert.

Icon + multi-line content

When you pair an pa-alert__icon with a multi-line pa-alert__content (heading + body + actions), add pa-alert--multiline so the icon stays at the top with the heading instead of vertically centring against the whole stack. Side by side below — the left example uses the modifier; the right one shows what happens without it.

With --multiline

Without (default centring)

Status strip layout

Real-world example — small, icon-prefixed alerts arranged in a row above a section. pa-alert--sm keeps each pill compact so multiple states fit on one line at desktop widths.

Saved
! Pending
× Failed

CSS Classes Reference

Base & Variants

  • pa-alert - Base alert container
  • pa-alert--primary - Primary/accent color
  • pa-alert--secondary - Secondary/muted color
  • pa-alert--success - Success (green)
  • pa-alert--danger - Danger/error (red)
  • pa-alert--warning - Warning (yellow/orange)
  • pa-alert--info - Information (blue)
  • pa-alert--light - Light background
  • pa-alert--dark - Dark background

Outline Variants

  • pa-alert--outline-primary - Primary outline (no background)
  • pa-alert--outline-success - Success outline
  • pa-alert--outline-danger - Danger outline
  • pa-alert--outline-warning - Warning outline
  • pa-alert--outline-info - Info outline

Theme Color Variants (1-9)

  • pa-alert--color-{1-9} - Filled theme color slot
  • pa-alert--outline-color-{1-9} - Outline theme color slot

Sizes & Modifiers

  • pa-alert--sm — Small: 0.5rem / 1rem padding, font-size-xs (12px)
  • (default) — Default: 0.75rem / 1.25rem padding, font-size-sm (14px)
  • pa-alert--lg — Large: 1rem / 1.5rem padding, font-size-base (16px)
  • pa-alert--dismissible — Adds inline-end padding so the absolutely-positioned close button doesn't overlap text
  • pa-alert--multiline — Opts out of the default align-items: center so an icon next to multi-line pa-alert__content stays top-aligned with the heading instead of centring against the content stack

V steps 0.5 → 0.75 → 1rem; H steps 1 → 1.25 → 1.5rem — clean 0.25rem increments. Themes can retune the scale via the $alert-padding-{v,h}, $alert-padding-{sm,lg}-{v,h} and $alert-font-size-{sm,lg} SCSS variables in variables/_components.scss (all !default).

Sub-elements

  • pa-alert__icon — Leading icon (flex-shrink: 0, font-size-base)
  • pa-alert__content — Content wrapper (flex: 1; min-width: 0) — use it when there's an icon AND structured content (heading, paragraph, list, actions); drop it when the alert has no icon
  • pa-alert__heading — Alert heading/title (h4); defaults to body font-size + semibold
  • pa-alert__heading--lg — Heading bumped to font-size-lg for the punchy, deliberate-read presentation
  • pa-alert__list<ul> inside the alert; spacing to siblings handled by the alert's flex gap
  • pa-alert__actions — Action buttons row, sits below a thin divider with symmetric padding (same separator pattern as pa-toast__actions); always renders on its own row at the bottom
  • pa-alert__close — Close/dismiss button (absolutely positioned, inline-end — RTL-aware)

Layout note: the alert is display: flex; flex-wrap: wrap with gap: $spacing-sm. Structural children (__heading, __list, __actions, top-level <p>, <hr>) get flex-basis: 100% so they take their own row; inline siblings (__icon, __content, bare text + <strong>) stay on the flex row.

Type / for commands, : to search a category, or just start typing

Settings

Body text size. All elements scale proportionally.
👤

John Doe

Administrator
  • 📊 Dashboard
  • 📝 Forms
  • 📋 Tables
  • 📊 Data Grid