About this set
Twelve alerts in three weights, each in the four statuses every interface needs: info, success, warning and danger. Soft alerts are tinted cards with an icon, a bold title, a sentence with an optional link and a dismiss button, for messages that explain something, such as a declined card or a storage limit. Accent bar alerts are white one-line cards with a 4px status stripe, for compact notices that should not pull focus, such as a read-only window or an expiring API key. Solid alerts are filled with the status colour for the one message on a page that must not be missed. Every alert reads its colours from a small set of custom properties, so a new status is one line of CSS. The status is never carried by colour alone: soft alerts have a title that names it, and the one-line and solid alerts start with visually hidden text such as Warning or Error. Only the declined card uses role=”alert”, because only that one is urgent. Dismissing is a short delegated script that removes the alert and moves focus to the next alert’s button so keyboard users keep their place. The Bootstrap version uses .alert, .alert-link and the Alert plugin.
What’s included
- Four statuses in three weights: soft, accent bar and solid
- Colours set by five custom properties per status
- Status named in text, not only by colour or icon
- Dismiss moves focus to the next alert instead of the top of the page
- Bootstrap .alert restyled through its --bs-alert-* variables
Accessibility
Each dismiss button is named after its alert, for example Dismiss: Card declined, and shows a 2px outline on keyboard focus. Icons are hidden from assistive technology and the status is given in text, with visually hidden prefixes on the one-line and solid alerts. Only the urgent declined-card alert has role="alert". The dismiss fade and hover transitions switch off under prefers-reduced-motion.
Customise it
In plain CSS change --al-bg, --al-line, --al-icon, --al-title and --al-ink on each .al-* status class, and --al-solid for the filled style. In Bootstrap set the --bs-alert-* variables on .alert-info, .alert-success, .alert-warning and .alert-danger; in Tailwind edit the hex values in the bg-, border- and text- utilities.






