Alert 04
A decision alert that pairs the facts of a billing problem with a clear primary and secondary action.
Requirements
HTML, CSS, JavaScript
Dependencies
None
Usage
Copy index.html, styles.css and script.js into your project.
Typography: Inter, with a system sans-serif fallback.
About Alert 04
Alert 04 is an alert component in the Alert Components collection, available in HTML + CSS + JavaScript and React + TypeScript + Tailwind CSS. Last updated September 14, 2026.
- alert
- action
What the code includes
HTML + CSS + JavaScript
3 files: index.html, styles.css, script.js
- Behavior is handled in script.js.
- ARIA in the markup: role region; aria-labelledby, aria-live, aria-atomic.
- HTML elements used: section, dl, button, svg.
- Includes a prefers-reduced-motion rule for its animation.
- Responsive CSS breakpoints at 640px.
React + TypeScript + Tailwind CSS
3 files: Alert04.jsx, Alert04.types.ts, Alert04.tailwind.css
- Configurable through 12 props: eyebrow, title, facts, grace, primaryLabel, onPrimary, retryLabel, onRetry, link, successTitle and 2 more.
- Uses React hooks: useId, useLayoutEffect, useRef, useState.
- ARIA in the markup: role region; aria-labelledby, aria-disabled, aria-describedby, aria-live, aria-atomic.
- HTML elements used: dl, button, svg.
- Includes a prefers-reduced-motion rule for its animation.