7 CSS Design

Every collection tagged “css design” — each one a set of hand-coded demos with copy-paste code and a live preview.

Build UI like this from scratch: Flexbox, Grid, animations & responsive CSS

ZTM · The CSS Bootcamp · 30‑day money-back guarantee · Affiliate link

10% off at checkout with code
Check ZTM Course

15 CSS Aspect Ratio Demos

15 hand-coded CSS aspect-ratio demos for video embeds, product galleries, IAB ad slots, native dialogs, and CLS-safe placeholders: 16:9 iframe YouTube embed with click-to-load facade + up-next rail, 21:9 full-screen hero video with min-height/max-height:100svh guardrails + Ken Burns drift, 1:1 Instagram-style square grid with 2×2 feature tile, 4:3 magazine card image cover, 9:16 vertical stories rail (TikTok/Reels/Shorts pattern) with scroll-snap + segment bars, 4:5 apparel product image gallery with radio-driven state + 1:1 thumbnails, 1:1 zoom thumbnail carousel with pointer-tracked --zx/--zy magnifier, prevent-layout-shift placeholder with live PerformanceObserver CLS meter (before/after side-by-side lab), dynamic content fallback with three policies (bend/strict/auto) via :has() toggle, IAB ad banner slots (728×90 leaderboard, 300×250 medium rectangle, 300×600 half-page, 320×50 mobile) with skeletons + container-query mobile swap, responsive modal dialog sized min(92vw, 88svh×16/9, 1080px) with @starting-style animation, responsive OpenStreetMap iframe wrapper with 16:9 → 1:1 container-query narrow swap, media query orientation live HUD + resize:both container-ratio playground, object-fit logo cloud with contain/cover/fill switcher via :has(), and side-by-side padding-top hack (height:0 + padding-top:56.25%) → modern aspect-ratio migration comparison with live ratio picker. 11 truly Pure CSS + 4 with a tiny optional vanilla JS snippet (facade swap, pointer magnifier, CLS meter, native dialog). Every demo is scoped under a unique .car-NN prefix so it drops into any project without CSS collisions, ships prefers-reduced-motion guards, and is framework-agnostic (works as-is in React, Vue, Svelte, Astro, Next.js, Remix, or plain HTML).

11 Pure CSS4 Light JSPublished

17 CSS Dashboard Layouts

17 hand-coded CSS dashboard layouts for SaaS admin panels, analytics consoles, e-commerce merchant dashboards and AI copilot apps. Covers CSS Grid bento boards, collapsible icon-rail sidebars, auto-fit KPI card grids, split-pane master-detail views, fixed-header independent scroll panels, grid-template-areas shells, off-canvas mobile drawers, container-query responsive cards, dark mode CSS variable tokens, multi-level nested navigation, sticky-header data tables, masonry column packing, full-screen 100vh consoles and top-nav tab bars.

14 Pure CSS3 Light JSPublished

18 CSS Gradient UI

18 hand-coded CSS gradient UI demos covering the full design-system surface where tier-1 SaaS, Web3, AI, and premium fintech products reach for gradients in 2026: 6-variant gradient button hover lab (shift/sweep/ring/glow/ghost/hue), gradient feature cards with hover lift + shared --tint token, three gradient border techniques compared side-by-side (double-background layering / mask-composite ring / conic-gradient orbit with @property --angle), gradient badges + release-dashboard status pills (PRO/BETA/NEW), gradient search bar + command palette + form inputs with animated underlines, gradient progress bars + barber-pole stripes + conic-gradient loading rings, animated mesh / aurora background with 4 radial blobs + grain overlay, glassmorphism sign-in card over gradient with backdrop-filter, full-page animated linear gradient pan, hero banner with gradient overlay + Patagonia photo, neon / dark-mode glow cards with flickering OPEN sign, gradient text clipping type specimen (aurora/flow/conic numeral), gradient text hover-reveal editorial menu, gradient link underline animation with 4 styles, metallic / gold / chrome / rose-gold gradient text with panning shine (awards invitation aesthetic), radial spotlight cursor-tracking AI console cards (delegated pointermove + rAF throttling), conic-gradient avatar border rings (Instagram story / live / segment / seen / group presence states), and gradient scroll mask fade for horizontal chip rails + vertical changelog. 16 truly Pure CSS + 2 with a tiny optional vanilla JS snippet (progress ticker + cursor coord writer). Every gradient UI is scoped under a unique .cgu-NN prefix so it drops into any project without CSS collisions, ships prefers-reduced-motion guards, and is framework-agnostic (works as-is in React, Vue, Svelte, Astro, Next.js, Remix, or plain HTML).

16 Pure CSS2 Light JSPublished

28 CSS Hamburger Menus

28 hand-coded CSS hamburger menus covering the exact patterns SaaS builders, e-commerce teams, mobile-app designers, and marketing sites actually ship: clip-path circle expand, ARIA-audited keyboard-navigable, animated 3-line to X icon morphs, off-canvas drawers with dimmed backdrops, pure CSS checkbox-hack (zero JavaScript), integrated search + social drawers, glassmorphism backdrop-blur overlays, push-canvas content shifts, full-screen mobile takeovers, slide-out sidebars, responsive navbar toggles with media queries, minimalist floating buttons, Tailwind CSS component recipes, Bootstrap 5 navbar toggler setups, WCAG 2.2 AA dialogs with focus trap + Escape, grid-template-rows slide-down dropdowns, mobile bottom nav bars with floating FAB, multi-level accordion nested menus with <details>, flexbox right-aligned patterns, radial ripple expansions, sticky shrinking icons on scroll, neumorphic soft-UI toggles, brutalist bordered icons, and 3D flip canvas transforms. 11 truly Pure CSS + 17 with a tiny optional vanilla JS snippet + 1 Tailwind + 1 Bootstrap 5 wiring. Every menu is scoped under a unique .chm-NN prefix so it drops into any project without CSS collisions, ships prefers-reduced-motion guards on every animation, and is framework-agnostic (works as-is in React, Vue, Svelte, Astro, Next.js, Remix, or plain HTML).

11 Pure CSS16 Light JS1 Tailwind + JS8 newPublished Updated on

12 CSS Masonry Layouts

12 hand-coded CSS masonry layouts covering the three canonical engines (multi-column columns: walls, CSS Grid row-span lattices, CSS Grid dense auto-flow packing, flex column-wrap boards) plus the W3C native masonry spec with layered @supports fallbacks. Every real-world masonry use case: Pinterest-style image walls, <dialog>-element lightbox galleries, responsive photo grids with grid-row spans preserving reading order, blog card walls with column-span editor's-pick spans, e-commerce product listings with dense packing + feature tiles, flex column-wrap horizontally-scrolling social feeds, art-directed portfolio showcases with :has() spotlight, testimonial walls with mask-image fade + scroll-driven reveal, mixed-ratio video thumbnail galleries, quantized dashboard widget grids on 108px lattices, IntersectionObserver-append infinite scroll walls with aria-live, and the modern @supports (grid-template-rows:masonry) / display:masonry cascade with live badge showing engine status. 10 truly Pure CSS + 2 with a tiny optional vanilla JS snippet (lightbox dialog + infinite-scroll append). Every wall is scoped under a unique .msn-NN prefix so it drops into any project without CSS collisions, ships prefers-reduced-motion guards, and is framework-agnostic (works as-is in React, Vue, Svelte, Astro, Next.js, Remix, or plain HTML).

10 Pure CSS2 Light JSPublished

16 CSS Portfolio Layouts

16 hand-coded CSS portfolio layouts covering the exact patterns freelance developers, UX/UI designers, product designers, illustrators, photographers and agency teams actually ship for their own portfolio sites: responsive CSS-Grid galleries with fr tracks and auto-fit minmax, Apple-style bento grids, no-JS native masonry walls, sticky-sidebar flexbox splits, hover-overlay project grids with staggered scrims, scroll-snap horizontal showcases, 50/50 split-screen heroes with :has() accent recoloring, dark-mode CSS-variable token systems, single-page developer portfolios with anchor navigation and scroll-timeline progress rails, UX case-study articles with 1fr/62ch/1fr content grids, ultra-minimalist graphic-design indexes with clip-path thumb reveals, freelancer layouts with testimonials plus 3-tier pricing, beginner-friendly auto-fit card grids, 3D card-flip project tiles, full-screen 100svh hero openers with view()-timeline parallax and sticky header+sidebar app-shell templates. 14 truly Pure CSS + 2 with a tiny optional vanilla JS snippet. Every portfolio is scoped under a unique .cpl-NN prefix so it drops into any project without CSS collisions, ships prefers-reduced-motion guards on every animation, and is framework-agnostic (works as-is in React, Vue, Svelte, Astro, Next.js, Remix, or plain HTML).

14 Pure CSS2 Light JSPublished

17 CSS Sticky Elements

17 hand-coded CSS position:sticky demos covering every real-world sticky use case: sticky header on scroll, sticky header that changes background when scrolled (via scroll-state() container queries), sticky shrinking navbar with animation-timeline: scroll(), stacked sticky header + secondary tabs with :has(:target) scrollspy, sticky sidebar inside flexbox with align-self:flex-start, sticky Table of Contents with IntersectionObserver scrollspy + scroll-driven progress bar, iOS-contacts sticky section headers with alphabet rail, sticky chapter card stack with view() timeline entrances, sticky table header inside scrollable div, sticky first column + header with correct z-index corner cell (Airtable/Retool/Metabase pattern), mobile sticky add-to-cart bottom bar with safe-area-inset, sticky floating promo banner with :has(:checked) dismiss, sticky checkout order summary sidebar, sticky footer to bottom of short pages via grid auto/1fr/auto, sticky social share rail (desktop-left / mobile-bottom via container query), a debug lab showing why sticky breaks when an ancestor has overflow:hidden (vs overflow:clip), and a stuck-state detection sensor using both scroll-state(stuck: top) AND IntersectionObserver sentinel fallback. 15 truly Pure CSS + 2 with a tiny optional vanilla JS snippet. Every sticky is scoped under a unique .cst-NN prefix so it drops into any project without CSS collisions, ships prefers-reduced-motion guards, and is framework-agnostic (works as-is in React, Vue, Svelte, Astro, Next.js, Remix, or plain HTML).

15 Pure CSS2 Light JSPublished

Search CodeFronts

Loading…