14 Material Design CSS Components

14 hand-coded Material Design 3 components in pure CSS — the Material You aesthetic without MUI, Material Components Web, or a 50-100kb bundle — raised buttons with ripple, filled + outlined text fields with floating labels, top app bar with scroll shrink, navigation drawer, tab bar with sliding indicator, chip row with dismiss, snackbar with action, FAB with speed dial, extended FAB, expansion panel accordion, dialog with scrim, bottom sheet, switch with thumb depth, radio + checkbox with state layer, and a segmented button group. Every interactive uses :checked + :has() state machines — no JavaScript required — with Roboto typography, indigo + amber palette, and WCAG 2.5.5 44×44px touch targets on every control. Scoped under .md-NN for no-collision pasting (never clashes with MUI class names), prefers-reduced-motion guarded on every ripple and slide, framework-agnostic (drop into React, Vue, Astro, Next, Rails ERB, or plain HTML).

14 pure CSSPublished

Related12 CSS Ripple Effects51 CSS Buttons34 CSS Floating Buttons

Material Design Buttons CSS — preview
01 / 14Pure CSS

Material Design Buttons CSS

Filled, outlined, text, elevated, tonal, and FAB buttons plus toggle groups and filter chips — all Material Design 3, zero JavaScript.

Published

Material Design Card CSS — preview
02 / 14Pure CSS

Material Design Card CSS

Elevated, outlined, tonal, horizontal, social-media, stats, and profile cards showcasing Material Design 3 shape tokens, elevation shadows, and colour roles.

Published

Material Design Navigation CSS — preview
03 / 14Pure CSS

Material Design Navigation CSS

Top app bar, navigation drawer, navigation rail, bottom navigation bar, scrollable tab bar, and breadcrumb trail — all built with CSS custom properties and zero JavaScript.

Published

Material Design Form Inputs CSS — preview
04 / 14Pure CSS

Material Design Form Inputs CSS

Filled and outlined text fields with floating labels, select menus, textarea, checkboxes, radio buttons, toggle switches, and range sliders — interactive, fully accessible, no JavaScript.

Published

Material Design Dialog Modal CSS — preview
05 / 14Pure CSS

Material Design Dialog Modal CSS

Alert dialog, full-featured share dialog, bottom sheet, and snackbar — all toggled with the CSS checkbox-hack, no JavaScript.

Published

Material Design Data Table CSS — preview
06 / 14Pure CSS

Material Design Data Table CSS

Sortable-look data table with row checkboxes, status badges, inline progress bars, avatar cells, pagination controls, and a dense display variant.

Published

Material Design Tabs CSS — preview
07 / 14Pure CSS

Material Design Tabs CSS

Primary, scrollable, icon-plus-label, and vertical tab bars — all driven by the CSS checkbox-hack with an animated active ink bar, no JavaScript.

Published

Material Design Chip CSS — preview
08 / 14Pure CSS

Material Design Chip CSS

Suggestion, filter (checkbox-interactive), choice (radio-interactive), input with avatar, tonal, filled, outlined, status, elevated, and segmented chip variants — all Material Design 3.

Published

Material Design Stepper CSS — preview
09 / 14Pure CSS

Material Design Stepper CSS

Horizontal step indicator with done/active/error states, vertical accordion stepper, and a linear checkout stepper — built entirely with CSS counter and radio-hack.

Published

Material Design Tooltip CSS — preview
10 / 14Pure CSS

Material Design Tooltip CSS

Plain and rich tooltips in four directions, linear progress (determinate and indeterminate), circular progress, notification badges, and page dot navigation — all pure CSS.

Published

Material Design Expansion Panel CSS — preview
11 / 14Pure CSS

Material Design Expansion Panel CSS

Standard accordion, icon-leading accordion with inline forms, and FAQ-style fully-rounded panels — interactive via the CSS checkbox-hack, zero JavaScript.

Published

Material Design List CSS — preview
12 / 14Pure CSS

Material Design List CSS

Single-line, two-line with avatars, three-line with thumbnails, icon lists with subheaders and dividers, checkbox lists, and action-button rows — complete Material Design 3 list system.

Published

Material Design Color Palette CSS — preview
13 / 14Pure CSS

Material Design Color Palette CSS

Interactive five-theme Material Design 3 colour switcher — purple, teal, red, green, pink — with live colour role grid, tonal surfaces, and a live UI preview panel, all driven by CSS custom properties and radio inputs.

Published

Material Design App Shell Layout CSS — preview
14 / 14Pure CSS

Material Design App Shell Layout CSS

Full responsive app shell with sticky top app bar, persistent navigation drawer, breadcrumb toolbar, three-column stats grid, activity feed list, and a floating action button — production-ready layout, no JavaScript.

Published

FAQ

Frequently asked questions

What is Material Design and why use it for a web project?
Material Design is Google's open-source design system, introduced in 2014 and currently on its third major version (Material Design 3, also marketed as "Material You"). It defines a visual language — elevated surfaces with shadows, the indigo + amber palette, Roboto typography, 4dp/8dp spacing rhythm, the FAB pattern, the ripple touch feedback — alongside specific component behaviours (how a chip removes itself, how a tab's underline transitions, how an expansion panel rotates its chevron). Why use it on the web: (1) Familiar to billions of users — every Android phone uses Material, so visitors recognise the patterns instinctively. (2) Accessibility baked in — Material's components ship WCAG-AA contrast ratios, 48dp tap targets, focus indicators by default. (3) Comprehensive — Material defines components for almost every UI need, from FABs to data tables to navigation drawers. (4) Cross-platform consistency — if your product also has a mobile app, using Material on the web gives users a unified experience.
Should I use Material UI (MUI) or build Material Design with vanilla CSS?
MUI is excellent if you're ALREADY on React + want every Material component + theme system + ~150 components + 95kb gzipped bundle. If you're NOT on React+MUI (Astro, Vue, Svelte, Rails ERB, plain HTML, WordPress, vanilla JS) — installing MUI just to get the Material aesthetic adds 95kb to your bundle for components you may never use. Or worse: trying to use MUI with Vue / Svelte means rewriting it because MUI is React-only. This collection's 14 components ship the canonical Material Design 3 look — elevated buttons with ripple, rounded corners, Roboto typography, the indigo + amber palette — as 100% pure CSS. Zero JavaScript, zero libraries, framework-neutral. Cost comparison: MUI ~95kb React+MUI bundle. Material Components Web (MDC) ~50kb framework-neutral but still requires JS imports per component. Material Design Lite (MDL) deprecated since 2017. Tailwind UI's Material-inspired components $300+. This collection: 0 bytes of JavaScript, the CSS itself is ~20-50kb per demo (only the demos you use). MIT-licensed, modify-and-resell allowed.
How do I implement the Material Design ripple effect without any JavaScript?
Demo 01 (Material Design Buttons CSS) ships the canonical pure-CSS ripple. Most online tutorials show the JS-driven ripple where a <span> is spawned at the click coordinate — that requires JavaScript and you have to recalculate positions on every click. This demo's pure-CSS approach: a ::after pseudo-element with position: absolute; inset: 0; background: radial-gradient(...) center / 0 0 no-repeat. On :hover and :focus-visible, the background-size animates from 0 0 to 200% 200% over 0.4s with ease-out — creating a ripple that radiates from the button center. On :active a separate keyframe runs a faster, more contained ripple for the press feedback. Tradeoff vs JS ripple: the ripple always originates from the BUTTON center, not the click coordinate. For ~95% of UI use cases (CTAs, primary actions, navigation buttons) this is indistinguishable from a JS ripple and saves you the entire JS implementation. The 5% case where ripple-at-cursor matters (interactive canvases, design tools): use the JS approach Demo 16 in CSS Floating Buttons.
How do I implement Material Design's floating label form input pattern?
Demo 04 (Material Design Form Inputs CSS) ships the floating-label pattern that every Material form uses — the placeholder text starts inside the input at full font-size, then animates upward and shrinks to a small label above the input when the field receives focus or has content. Pure-CSS implementation: <label> sits absolutely positioned over the <input>'s placeholder area. The :placeholder-shown pseudo-class targets inputs that still show their placeholder (i.e., empty + not focused). When the input is :focus OR NOT :placeholder-shown (has content), the label translates up and scales down via transitions. The selector chain: .md-04__field input:focus + label, .md-04__field input:not(:placeholder-shown) + label { transform: translateY(-22px) scale(0.78); color: var(--md-primary); }. Three details most online tutorials get wrong: (1) Use placeholder=" " (single space) on the input, not empty — Chrome treats an empty placeholder as no placeholder and breaks the selector. (2) Animate transform not top/font-size — transform is GPU-accelerated and won't trigger layout reflow. (3) Set transform-origin: left center so the label scales from its left edge, matching Material's spec.
How do I build a Material Design dialog / modal in pure CSS?
Demo 05 (Material Design Dialog Modal CSS) ships the pure-CSS dialog using the modern native <dialog> element. The pattern: <dialog id="md-05-dialog"> contains the dialog content; an open-trigger button has a <label for="md-05-open"> + hidden checkbox; CSS shows the dialog when #md-05-open:checked ~ * #md-05-dialog matches. The modern alternative (which Demo 05 also illustrates as a snippet): <dialog> opened by modal.showModal() automatically gets focus trap, Esc-to-close, scroll lock, and backdrop — but requires one line of JS. Why the checkbox-hack version exists alongside: zero JS, works on every browser since 2016, useful for marketing pages or static landing pages where adding a JS click handler feels like overkill. Three production gotchas: (a) Focus trap — the pure-CSS dialog doesn't trap focus (Tab can leave the dialog). For accessibility-critical UIs, use the native <dialog> + JS instead. (b) Scroll lock — body still scrolls behind the open dialog unless you add html:has(#md-05-open:checked) body { overflow: hidden } (requires :has() — Chrome 105+, Safari 15.4+, Firefox 121+). (c) Backdrop click to close — works via <label for="md-05-open"> on the backdrop element.
What's the difference between Material Design 2 and Material Design 3 (Material You)?
Material Design 2 (2018-2022) was the dominant style for most of Google's web/Android products. Material Design 3 (2022-present), branded as Material You, brought four significant changes: (1) Dynamic color theming — Android pulls a color palette from the user's wallpaper and applies it across the system. On the web, this translates to CSS custom-property-driven theme tokens you can swap at runtime. (2) Rounder shapes — MD3 increased corner radii across most components. Buttons went from 4px to 8-20px depending on size; cards from 4px to 12px; FABs from circle/round-square to fully rounded. (3) Bigger touch targets — minimum tap target increased from 40dp to 48dp (now WCAG 2.5.5 AAA-compliant). (4) Updated typography — Roboto stays as default, but MD3 expanded the type scale and added Display / Headline / Title / Label tiers with clear hierarchy. This collection's 14 components implement MD3 aesthetics: 8-20px corner radii, 48px button heights, the new color token system (--md-primary, --md-on-primary, --md-surface, etc.), and the larger Roboto-based type scale. Use this collection if you want the 2026-current Material look. For MD2 styles (sharper corners, smaller buttons), the Material UI v4 docs or older MDL templates are closer fits.
How do I build the Material Design app shell layout (drawer + top app bar)?
Demo 14 (Material Design App Shell Layout CSS) ships the canonical Material app-shell pattern that every Google Workspace product (Docs, Sheets, Drive) uses. The layout: (1) Top app bar with hamburger icon (left), product title, search field (middle), action icons (right) — fixed at top, ~64px tall. (2) Collapsible navigation drawer (left side, 256px wide when open). Toggled by clicking the hamburger via a checkbox-hack: :checked on the hidden toggle slides the drawer in via transform: translateX(-256px) → translateX(0). (3) Main content area to the right of the drawer, with a backdrop overlay on mobile when the drawer is open. (4) A bottom navigation bar on mobile breakpoints (below 768px) — the drawer becomes a modal overlay rather than always-visible. Three production-grade details: (a) Use CSS Grid for the shell: grid-template-columns: auto 1fr on desktop, 1fr on mobile. (b) Persist drawer state via localStorage if you wire one line of JS — visitors who close the drawer want it stay closed across page navigations. (c) Trap focus when the drawer is modal on mobile — Tab order should cycle within the drawer until Esc closes it. ~60 lines of CSS, 0 lines of JS.
Is Material Design suitable for non-Google products? Won't my site look like Google?
Two-part answer. (1) Yes, Material Design works for non-Google products — millions of non-Google sites use it, and visitors don't think "this looks like Google" because the visual language has become a generic "modern app" aesthetic, not specifically Google-branded. (2) The way to differentiate is to swap the color tokens. Material Design provides the visual GRAMMAR (elevation shadows, corner radii, type scale, spacing rhythm); your brand provides the VOCABULARY (your specific colors, your fonts, your imagery). Demo 13 (Material Design Color Palette CSS) shows all 500 Material shades — pick a primary + secondary that match your brand instead of Google's indigo + amber, override the --md-primary, --md-secondary, --md-surface custom properties at the demo root, and the Material grammar carries your brand's identity. Substituting Roboto with your brand font (or with Inter, IBM Plex Sans, Geist) also differentiates the look. Most successful Material-derived products do exactly this — Slack's web app, Notion's settings panel, Linear's editor all use Material patterns with brand-specific color + typography substitutions.
Is Material Design accessible? What about screen readers and keyboard navigation?
Material Design ships accessibility-aware components by default — that's one of the main reasons to use it. The 14 demos in this collection respect: (1) WCAG-AA contrast. Every color token pair (--md-on-primary on --md-primary, --md-on-surface on --md-surface) clears 4.5:1 contrast at small text and 3:1 at large text. The demo 13 color palette shows all swatches with their contrast indicators. (2) 48×48px minimum tap targets. WCAG 2.5.5 AAA-compliant. Button heights, list item heights, tab heights all default to 48px. (3) Visible focus indicators. Every interactive component has a :focus-visible ring (typically outline: 2px solid var(--md-primary); outline-offset: 2px) that survives Material's ripple animation. (4) Semantic HTML. Real <button> / <input> / <dialog> / <nav> elements, not divs styled as buttons. Screen reader announcements work automatically. (5) aria-current, aria-expanded, aria-selected, aria-controls on interactive components (tabs, expansion panels, navigation links) so screen readers announce the current state. (6) prefers-reduced-motion media query on every demo — vestibular-sensitive visitors don't see ripples, slide-in panels, or other continuous motion.
Which Material Design component should I use for my project?
Quick decision guide for all 14 demos. Primary CTAs / form submit buttons: Demo 01 (Material Design Buttons CSS) — elevated, filled, and outlined variants with the canonical Material ripple. Product / blog / pricing card layouts: Demo 02 (Material Design Card CSS) — elevated content cards with proper shadow tiers. App navigation header: Demo 03 (Material Design Navigation CSS) — top app bar with hamburger, search, actions. Form inputs (signup, contact, profile): Demo 04 (Material Design Form Inputs CSS) — floating-label pattern. Confirmation / alert dialogs: Demo 05 (Material Design Dialog Modal CSS) — checkbox-hack + native <dialog> dual implementation. Tabular data (orders, users, transactions): Demo 06 (Material Design Data Table CSS) — proper alignment, hover states, sortable column headers. Tabbed content panels: Demo 07 (Material Design Tabs CSS) — ripple-driven underline transitions. Filter / tag UI: Demo 08 (Material Design Chip CSS) — removable chips with leading icons. Multi-step form flows: Demo 09 (Material Design Stepper CSS) — vertical step indicator. Hover help / contextual info: Demo 10 (Material Design Tooltip CSS) — four directional variants. FAQ / collapsible content: Demo 11 (Material Design Expansion Panel CSS) — Material's accordion. Profile lists / contact lists / settings menus: Demo 12 (Material Design List CSS) — two-line list with avatars. Design system documentation page: Demo 13 (Material Design Color Palette CSS) — full 500-shade palette with theme switcher. Full-app skeleton: Demo 14 (Material Design App Shell Layout CSS) — drawer + top bar + content. All 14 are 100% pure CSS, MIT-licensed, framework-neutral.

Related collections

9 CSS 3D Designs preview

9 CSS 3D Designs

9 hand-coded CSS 3D scenes built with real transforms, perspective, and preserve-3d — iridescent flip cards, a midnight coverflow carousel, kinetic tilt pricing cards, a page-turn flipbook, a Bauhaus drag-cube navigator, a modular synth control panel, a luxury hover-flip product showcase, a 5×5 spinning cube matrix, and a 60-orb DNA double helix. No WebGL, no libraries.

22 CSS Brutalism preview

22 CSS Brutalism

22 hand-coded brutalist and neubrutalist CSS designs covering the full spectrum of the aesthetic — from the anti-design brutalism of 2014-2018 (raw system fonts, zero border radius, monochrome density, visible structure) through to the neubrutalism of 2021-present (bright pastel fills, thick black borders, hard offset shadows with zero blur, rounded blocks). The neubrutalist half ships SaaS pricing cards with sticker badges, a pastel admin dashboard, signup forms, rotated feature cards, an offset-shadow navbar, a playful button set, a native dialog modal, a testimonial wall, blog cards, chunky toggles, a landing hero, an image gallery, stats panels and a rounded footer. The brutalist half covers product grids, raw form controls, a monochrome data dashboard, a portfolio index, indie SaaS pricing, Windows 95 desktop chrome, editorial long-read and a streetwear catalog. Every design is scoped under a .brt-NN prefix for no-collision pasting, guards prefers-reduced-motion, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.

22 CSS Dark Mode UI preview

22 CSS Dark Mode UI

22 hand-coded CSS dark-mode UI patterns — prefers-color-scheme root strategy, data-theme attribute override, color-mix token system, light-dark() function, sidebar navigation, dashboard card grid, modal dialog, focus-ring contrast audit, three-state switcher, code editor surface, OLED true black, layered slate, aurora dim and more.

Search CodeFronts

Loading…