AhaSlides Design
v0.52.0React · Vue · Lit

Components · Feedback

Alert

An inline, contextual feedback banner — info, success, warning, error, or branding — in regular/small sizes, with an optional full-width banner mode and a trailing action.

Examples

Type
Size
Banner
Icon
Types · info · success · warning · error · branding · small · banner · action
Your poll closes in 5 minutes. Slide saved. You have used 9 of 10 slides on the Free plan. Upload failed — the file is over 20 MB. Turn a prompt into a full deck. Compact confirmation, no icon. Scheduled maintenance tonight 22:00–23:00 UTC.

API

PropTypeDefaultNotes
typeinfo | success | warning | error | brandinginfoTone + status icon + surface/border tokens
headingstringOptional bold title above the message
sizeregular | smallregularCompact padding + type scale
bannerbooleanfalseFull-width, square-cornered edge-to-edge page notice
closablebooleanfalseShows a dismiss control (✕ chrome)
hide-iconbooleanfalseSuppresses the leading status icon (the showIcon toggle)
slot="action"slotTrailing action — a button or link
closeCustomEventComposed event when the banner is dismissed

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-alert';   // registers <aha-alert>

Agent feed for this component (absolute, fetchable anywhere): alert.agent.json · alert.md · alert.llms.txt

When to use

When to use
  • Alert — a persistent, inline message tied to a region of the page (a form warning, a page-level notice)
  • Toast — a brief, transient confirmation of an action that then disappears
  • Notification — a richer, stacking message with a title + description, often from a background event
Keep the message to one or two lines; lead with what happened, then what to do. Reserve error for real failures — over-using red trains people to ignore it.
Surfaces
editor dashboard settings audience

Spec

Box flex row, gap 10 · padding 10 14 · radius 8 · 1px tonal border · Text Plus Jakarta 14/1.5; heading SemiBold 600 · Info bg #F4F8FF, border #BFD2FF, icon #9BB3E9 · Success bg #D8FAEF, border #16C49A, icon/text #13A181 · Warning bg #FFF5F0, border #FF7747, icon/text #E65B29 · Error bg #FFF1F0, border #F5222D, icon/text #F5222D · Branding bg-accent #F9F5FF, border-focus #D3B4FF, icon/text color-primary #6A1EBB · Small padding 6 10 · gap 8 · 13px text · 16px glyph · Banner full-width, square (radius 0), border on the bottom edge only · Action trailing slot="action" for a button/link · Icon status glyph via <aha-icon> (system-info / system-check-circle / system-warning-circle / system-x-circle / system-sparkle)