481 standalone CSS + JS snippets for frontend design. Vanilla. Zero build step. Zero dependencies. Copy-paste and ship.
A massive snippet vault — heroes, navbars, buttons, modals, charts, gradients, shaders, AI-native UI, infinite canvases, fire effects, voronoi shaders, holographic foil, kinetic typography… and 450+ more. Every file is a single .css or .js you can drop into any project without setup.
If you want a specific UI piece — chances are it's already here. If it isn't, add it.
- Why this exists
- Quick start
- Examples
- What's inside
- Folder structure
- Conventions
- Finding a snippet
- For AI agents
- Contributing
- License
Every snippet library in 2026 is either:
- Framework-locked (React-only, Vue-only) — you can't paste it into a Stripe Checkout success page or a static HTML demo
- Tailwind-tied — requires config, build step, JIT
- Sprawling but shallow — 100 buttons, 10 modals, nothing else
- Or a hidden Figma file that doesn't help your code
frontendmaxxing is the opposite:
- 100% vanilla CSS + JS (with one optional Three.js CDN for
3d/) - Drop a file, link it, use it — no installs
- Works with React, Vue, Svelte, htmx, Astro, Eleventy, or raw HTML
- Deep coverage: 30+ button styles, 10+ hero layouts, 12 WebGL shaders, 60+ gradient presets, AI-native chat components, infinite canvas with minimap, Sentry-style stack traces, Warp-style terminal blocks…
Made for the era of vibe-coded UIs. Whether you're prompting an AI to build a landing page or building one yourself, this is the parts bin.
git clone https://github.com/sirdath/frontendmaxxing.gitIn your HTML:
<link rel="stylesheet" href="frontendmaxxing/effects/gradients-pack.css">
<link rel="stylesheet" href="frontendmaxxing/components/cards.css">
<script src="frontendmaxxing/utils/dom.js"></script>
<script src="frontendmaxxing/components/cards.js"></script>That's it. Open the file in a browser. Done.
Browse INDEX.md, grep for what you want, copy the file's contents into your project. Each file is self-contained.
Open demo/index.html in any browser (no server needed). Every snippet is registered with a live preview.
<link rel="stylesheet" href="ai/streaming-text.css">
<script src="ai/streaming-text.js"></script>
<div class="strm strm-bubble" data-stream-id="m1"></div>
<script>
StreamingText.append('m1', 'Hello, ');
StreamingText.append('m1', 'world!');
StreamingText.done('m1');
// Or pipe an SSE/fetch stream directly:
fetch('/api/chat').then(r => StreamingText.fromStream('m1', r.body, { parser: 'sse' }));
</script><link rel="stylesheet" href="backgrounds/aurora-bg.css">
<link rel="stylesheet" href="effects/gradient-text.css">
<section class="aurorabg aurorabg-cosmic" style="min-height: 100vh;">
<h1 class="gtxt gtxt-h1 gtxt-apple">Build the future</h1>
</section>import 'ai/tool-call-card.css';
const card = ToolCallCard.create(container, {
tool: 'search_web',
args: { query: 'paris' },
state: 'running'
});
card.setState('success');
card.setResult({ hits: ['result 1', 'result 2'] });<link rel="stylesheet" href="components/infinite-canvas.css">
<script src="components/infinite-canvas.js"></script>
<div class="icv icv-blueprint" data-icv style="height: 100vh;">
<div class="icv-grid"></div>
<div class="icv-world">
<div class="icv-node" style="left:200px;top:120px;">Drag me</div>
</div>
</div>
<script>
InfiniteCanvas.init('.icv');
</script><link rel="stylesheet" href="effects/image-gradient.css">
<link rel="stylesheet" href="effects/logo-glow.css">
<!-- Fill a PNG logo with a gradient -->
<div class="imggrad imggrad-aurora imggrad-lg" style="--src: url('logo.png');"></div>
<!-- Or wrap a halo glow around it -->
<img class="logoglow logoglow-cosmic logoglow-pulse" src="logo.svg">|
🎨 Visual & motion
|
🤖 AI-native UI (Phase 14–15)
|
|
📐 Editor & pro-tool primitives
|
🧱 Standard UI
|
3d/ Three.js scenes (requires THREE via CDN)
ai/ AI-native UI primitives
animations/ Keyframes, springs, stagger, AOS, anime-recipes
backgrounds/ Aurora, mesh, orbs, world map, sky, particles
blocks/ Buttons, loaders, toasts, tooltips, badges, inputs, sliders
borders/ Animated/gradient borders
components/ Full components: heroes, navbars, cards, modals, kanban…
data-viz/ Charts, sparklines, count-up, stat tiles
effects/ Gradients, glitch, parallax, cursors, holo, fire/smoke, …
feedback/ Confetti, sparkles, success/error states, achievements
interactions/ Sortable, swipe, pinch-zoom, gravity, elastic-line
layout/ Grids, masonry, container queries, sticky, aspect ratios
media/ Image compare, video, audio waveform, lightbox, clip trim
micro/ Tiny micro-interactions
responsive/ Breakpoints, dark mode, mobile patterns
scroll/ Pin, scrub, snap, horizontal-pin
shaders/ WebGL fullscreen-quad shaders
svg/ SVG animations, gradient defs
transitions/ Page transitions (fade/curtain/morph + View Transitions API)
typography/ Fluid type, variable fonts, gradient numbers
utils/ easing, lerp, dom, perf, smooth-scroll, palette generator
demo/ Interactive showcase of every snippet
Every file follows the same pattern. No build step. No imports. No global pollution outside one explicit export.
/* ============================================
MODULE NAME — One-sentence description
============================================
Usage:
ModuleName.init('.selector', { opt: val });
============================================ */
(function (root) {
'use strict';
var defaults = { /* … */ };
function init(target, opts) { /* … */ }
var ModuleName = { init: init };
if (typeof module !== 'undefined' && module.exports) module.exports = ModuleName;
else root.ModuleName = ModuleName;
})(typeof window !== 'undefined' ? window : this);Works in browsers (window.ModuleName) and Node (require('./module.js')).
/* ============================================
SNIPPET NAME — Description
============================================
Usage: <div class="snippet-name">...</div>
Variants: .snippet-name-variant
============================================ */
.snippet-name {
--snippet-var: value; /* every tunable as a CSS custom property */
}All themeable values are exposed as --vars so you can re-skin without editing CSS.
- Files: kebab-case (
gradient-text.css) - JS globals: PascalCase (
GradientBuilder) - CSS classes: kebab-case with short prefix (
.tcc,.tcc-head,.tcc-success) - CSS vars: --prefix-var (
--tcc-bg)
Full conventions live in AGENTS.md.
Open demo/index.html in your browser. Every snippet has a live preview.
# Find anything related to "card 3d hover tilt parallax"
grep -i "tilt" INDEX.md
# Find brand recreations
grep -i "instagram\|stripe\|vercel" INDEX.mdEach INDEX.md entry is 2 lines: filename + tags + a one-line description. Synonyms are baked into the tags so you can search for the vibe.
- Anything with gradients →
gradients.skill.md(decision tree + code patterns) - What folder does X live in? → top of
AGENTS.md
This repo is designed to work seamlessly when an AI agent (Claude, Cursor, Cody, etc.) is pointed at the folder.
- Entry point:
AGENTS.mdexplains everything an agent needs to know — purpose, conventions, folder layout, JS/CSS templates, how to add new snippets. - Lookup:
INDEX.mdis grep-friendly with synonym-rich tags. - Domain expertise:
gradients.skill.mdis a structured skill reference for the gradient subsystem (32+ files). - Verification: every claim in the docs is verified — 481 files on disk, 481 tagged entries in INDEX, no orphans, no broken pointers, all globals match exports.
Drop the folder into a Cursor or Claude Code project and the agent can reference any of the 481 snippets via grep, follow the exact conventions when adding new ones, and stay in sync with the index.
Contributions welcome! See CONTRIBUTING.md for the short version, or AGENTS.md for the full conventions.
TL;DR:
- Add a file matching the JS/CSS template
- Add a 2-line tagged entry to
INDEX.md - Register a live preview in
demo/index.html - Open a PR
Most-wanted patterns (open to PRs):
- More brand gradient recreations (TikTok, Pinterest, WhatsApp, Reddit, Slack, Adobe CC apps…)
- More 3D scenes (scrolling tunnel, holographic card 3D, fluid surface, glitch portal)
- AI patterns we haven't covered (artifact split with build logs, conversation tree)
- Pro-tool UIs (spreadsheet grid with formula bar, integration card grid, segmented metric tile)
- More distinctive text effects (kinetic poster typography, scroll-driven weight)
Patterns are inspired by (and reimplemented in vanilla CSS/JS from) the open-source work of: Magic UI · Aceternity UI · Cult UI · Origin UI · Skiper UI · Motion Primitives · Fancy Components · daisyUI · Mantine · HeroUI · Codrops · The Book of Shaders · lygia · Inigo Quilez · Patricio Gonzalez Vivo · Stripe · Vercel · Linear · Apple · Anthropic · Tympanus · Akella · Pavel Dobryakov · Bruno Simon · Three.js Journey — and many more.
Every file's header credits its inspiration. No code is copied verbatim; patterns are re-implemented in vanilla CSS/JS to be framework-agnostic and dependency-free.
MIT — see LICENSE. Use it for anything (commercial, personal, modified, redistributed).
Built for the era of vibe-coded UIs. Made by people who keep finding themselves rebuilding the same things.