Click to run the sequence
Progress Button
Intermediate
A button that animates a fill on click using a checkbox and transform: scaleX(), a state machine built entirely in CSS.
They use :has() and container queries. Update your browser, or on an iPhone update iOS to 16.4 or later.
Feedback is how an interface says what just happened, or what is happening right now. Spinners, progress bars, toast notifications, alert banners, skeleton placeholders, and confirmation states all belong here, and none of them need JavaScript to move.
Most run on animation rather than stored state: a keyframe starts on load, on hover, or the moment a checkbox flips. The ones that have to be dismissed use :target or a checkbox, so the dismissal sticks. Several of these pages are candid about the limit involved, since a progress bar with no script is choreography rather than measurement.
No examples match these filters yet. Turn on another level or pick another category.
Click to run the sequence
Intermediate
A button that animates a fill on click using a checkbox and transform: scaleX(), a state machine built entirely in CSS.
Four gradients, one sweep
Beginner
A moving gradient shimmer across text using background-clip: text and CSS keyframes.
Four directions off one trigger
Intermediate
Tooltips pointing top, right, bottom, and left using ::before and ::after pseudo-elements.
Four severities and a dismiss
Beginner
A base class plus one modifier per severity: each tints the background, colors the border, and sets the text color. The last banner is dismissible using a checkbox.
Three toasts, driven by the URL hash
Your browser can't run this demo
It needs :has(), which this browser doesn't support yet, so you're seeing a plainer version. It works in Chrome 105+, Edge 105+, Firefox 121+ and Safari 15.4+.
Needs :has()
Intermediate
A slide-in notification using :target to trigger and a CSS animation to auto-dismiss, with a picker for six placement options.
Two stages, one checkbox
Intermediate
A two-stage destructive action button that uses a checkbox to reveal the confirm step.
Ten seconds, on a loop
Seconds
Advanced
A visual countdown using @property integers, CSS counters, and steps() animation.
Four spinners, one technique
Beginner
Four spinner variants (ring, dots, bars, and orbit) built entirely with CSS animations.
Counting up to a target
Advanced
Numbers that count up using @property, CSS counters, and animations.
Placeholders with a moving highlight
Your browser can't run this demo
It needs :has(), which this browser doesn't support yet. It works in Chrome 105+, Edge 105+, Firefox 121+ and Safari 15.4+.
Needs :has()
Intermediate
An animated placeholder loading state built from CSS keyframes and a moving gradient, with no JavaScript.
Five bars, one element type
Intermediate
Animated progress bars built from the native <progress> element and CSS, with no JavaScript.
Hover a word to see its tip
Hover over this word or this one to see tooltips.
Beginner
Tooltips on hover built from CSS pseudo-elements and a data-tip attribute, with no JavaScript.
A toggle that repaints a panel
Intermediate
A theme switcher built from a checkbox, CSS custom properties and no JavaScript at all.