Dismissible announcement bar
An announcement bar at the top of the page with a link and a button to close it.
- Tailwind
- React
- CSS
- WordPress
Description
The close button has an explicit accessible name and a 44-pixel hit area. After closing, focus moves to the main content so keyboard users are not lost. The React version exposes an onDismiss callback to remember the choice.
Code
Loading the code…
The code of this component in
Reviews
No reviews yet.
In the same spirit

A banner that warns visitors when they lose the network and announces when it is back, using browser events, with no request.
- Tailwind
- React
- CSS
- WordPress

A bell with an unread badge that opens a notification panel: icons by type, read and unread items told apart, and a "Mark all as read" button.
- Tailwind
- React
- CSS
- WordPress

Toast notifications
Coming soonShort notifications that appear at the bottom of the screen after an action, then disappear.
- Tailwind
- React
- CSS
- WordPress

The four classic interface messages: information, success, warning and error.
- Tailwind
- React
- CSS
- WordPress