CSS Patterns — Zero JavaScript Needed
30 working interaction/motion patterns — sliders, modals, scroll effects, form feedback — built with plain CSS instead of a JS framework or Bootstrap's JS bundle. Every demo below is the real code, live in an iframe, not a recording or a screenshot.
Buy now — €49In the video series
Pure CSS picture slider
Three radio inputs, one :checked ~ selector per slide. No JavaScript, no framework, no slider library.
Dark mode toggle zero JS
One checkbox, one :checked ~ selector flipping CSS custom properties. The 8 lines of JS below it are only there to remember your choice after reload.
Parallax scroll effect
Background layer moves slower than the foreground on scroll — pure CSS transform trick, no scroll-event JS.
3D flip card
Hover flips the card on its Y-axis via transform: rotateY() and backface-visibility — no JS class-toggling.
Scroll-snap gallery
scroll-snap-type locks each swipe to the next slide — no carousel library, no JS.
Modal window zero JS
The :target selector opens a modal from a URL fragment — a link, an anchor, no addEventListener.
Cross-page View Transitions
The View Transitions API animates a shared element across two real page loads — click through, watch the headline morph between pages.
More CSS-only patterns
Anchor-positioned tooltip
CSS Anchor Positioning pins a popover tooltip directly to its trigger button — zero JS position math.
Checkbox accordion
A checkbox-driven accordion using grid-template-rows: 0fr → 1fr — animates to the real content height, never a guessed fixed value.
Native exclusive accordion
Native <details name="..."> — same name on multiple panels makes the browser close the others automatically, no JS, no checkbox hack at all.
Custom-styled native select
A native <select> with fully custom-styled options and icons in Chrome/Edge/Opera — falls back to the plain native picker in Firefox/Safari, still fully functional, no JS fallback needed.
Auto-growing form fields
field-sizing: content makes inputs and textareas grow with what you type — no JS measuring scrollHeight.
Real-time form validation feedback
:user-invalid/:user-valid only react after a real, trusted interaction — no red border flashing on page load like plain :invalid does.
Native dialog modal
The native <dialog> element transitions in and out of display:none via transition-behavior: allow-discrete + @starting-style.
Container-query card
The exact same card component reflows based on its own container's width, not the viewport — one component, no duplicate markup for narrow vs. wide placements.
Recolor one SVG three ways
A single black SVG icon, embedded three times, recolored purely via CSS filter — no three separate icon files.
Animated gradient border
A typed @property lets the browser interpolate a rotating gradient angle smoothly on hover — an untyped custom property would just jump.
Inline conditional CSS with if()
A single if(media(...): ...; else: ...) line replaces two full @media blocks for the same one property.
Custom CSS functions
A custom @function computes lighter/darker button colors at runtime in the browser — no SASS build-step dependency for something this simple.
Scroll-driven reveal animations
animation-timeline: view() fades/slides elements in as they scroll into view — no Intersection Observer JS.
Scroll progress bar
A bar at the top fills with page scroll progress via animation-timeline: scroll() — no scroll-event JS.
Scroll shadows
Edge shadows on a horizontally-scrolling row appear only while there's actually more content to scroll to — pure CSS background-attachment trick.
Sticky header, shadow only when stuck
@container scroll-state(stuck: top) reports when a sticky header is actually pinned to the edge — used to need an IntersectionObserver hack in JS, now pure CSS.
SVG wave parallax header
Layered SVG wave shapes moving at slightly different speeds create a parallax header effect — no JS, no background images.
Hover-reveal icon rail
An icon rail that reveals its label on hover (mouse) or tap (touch) — one hover-target CSS pattern covers both input types.
Staggered list fade-in
sibling-index() computes each item's animation delay automatically — no nth-child(1..n) copy-paste, no JS setting a counter variable.
Toast notification
A toast fades and slides in via @starting-style — no "add class on mount" JS pattern.
Fill-on-hover button
A single transform declaration sweeps a fill color across the button on hover — no background-position tricks, no JS.
Applying the right pattern automatically across a whole project — and keeping all 30 (and growing) current — is what the skill does:
- All 30 CSS interaction/motion patterns shown on this page — plus new ones as they're added
- Applied automatically inside Claude Code whenever a component would otherwise reach for a JS framework or Bootstrap's JS bundle
- Maintained browser-support notes (caniuse.com percentages, checked and dated) and accessibility house rules baked in
- Updates via email
CSS Patterns Series
30 patterns. Zero-JS by default.
New videos keep landing on TikTok and YouTube — this page already has every pattern live, videos or not.
Follow on TikTokFollow on YouTube