# SVGarden ๐ŸŒฑ > A massive, searchable bank of SVG + CSS animations with copy-ready code snippets.

Live Snippets Categories Techniques Lighthouse performance Lighthouse accessibility Visitor dependencies Astro Node License

**Production:** https://www.svgarden.dev ยท **Author:** Simon-Pierre Boucher โ€” contact@spboucher.ai Every animation is one self-contained `.html` file: paste it into a blank page and it works. No frameworks, no CDNs, no build step required by the snippets themselves โ€” and each one ships with a short "How it works" lesson. The site is static (Astro), searched client-side (lazy Fuse.js), highlighted at build time (Shiki), and customized live through CSS custom properties. ## ๐Ÿ“Š Metrics ### The bank | Metric | Value | |---|---| | ๐ŸŸฃ Snippets | **74** | | ๐Ÿ—‚ Categories | **14** | | ๐Ÿงช Distinct techniques taught | **177** | | โšก JavaScript-free snippets | **67 / 74** (90 %) | | ๐Ÿงญ Snippets with a browser-support caveat (`support`) | **13** | | ๐Ÿ“ Average snippet size | **57 lines** (max 116, hard cap 150) | | ๐Ÿงฉ Pages generated per build | **84** | ### Difficulty | | Level | Count | Share | |---|---|---|---| | ๐ŸŸข | beginner | 9 | 12 % | | ๐ŸŸฃ | intermediate | 27 | 36 % | | ๐Ÿ”ด | advanced | 38 | 51 % | ### Categories | Category | Count | Headline techniques | |---|---:|---| | ๐Ÿ”˜ `buttons` | 8 | goo filter, clipPath sweeps, `@property` hue trace, `linear()` springs, multi-stage morph | | ๐ŸŽ› `filters` | 8 | feTurbulence, feDisplacementMap, goo matrix, feMorphology, feDropShadow stacks, backdrop-filter | | ๐Ÿ–ผ `backgrounds` | 7 | mix-blend-mode aurora, SMIL topo morphs, turbulence rain refraction, seamless tiling | | ๐ŸŒ€ `loaders` | 6 | dasharray chase, counter-rotation, choreographed keyframes | | โœจ `text-fx` | 6 | mask knockout, variable-font weight waves, liquid clipPath fill, scramble decode | | ๐Ÿ“œ `scroll` | 6 | `animation-timeline: scroll()` / `view()`, `animation-range`, sticky scenes | | ๐Ÿ“ˆ `charts` | 6 | `conic-gradient()` + `@property` sweeps, live polyline updates, `--sg-i` cascades | | ๐ŸŽš `interactive` | 6 | `:checked` scenes, reversed-radio rating, `
` accordion, pseudo-3D tilt | | ๐Ÿ›ฐ `motion-path` | 5 | `offset-path`, `animateMotion rotate="auto"`, keyPoints/keyTimes pacing | | โœ๏ธ `stroke-draw` | 4 | pathLength normalization, staggered dashoffset | | ๐Ÿ–ฑ `hover` | 4 | transform-box, transition choreography | | โฒ `gauges` | 3 | dashoffset data-mapping, calc() needle angles | | ๐Ÿ”ค `text` | 3 | textPath, SMIL startOffset, glyph stroke tracing | | ๐Ÿซง `morph` | 2 | SMIL d-morphing, CSS `d:` with fallback | ### Quality gates (every build) | Gate | Status | |---|---| | `validate-snippets.mjs` (headers, frontmatter, scoping, self-containment, size) | ๐ŸŸข 74/74 | | `npm run build` warnings | ๐ŸŸข 0 | | Lighthouse performance / accessibility (home + detail) | ๐ŸŸข 100 / 100 | | Paste-test (copy output โ†’ blank .html) | ๐ŸŸข verified per batch | ## Quick start ```bash npm install npm run dev # local dev server on :4321 npm run build # validate snippets + build static site into dist/ npm run serve # serve dist/ with the production Express server (:4321, /healthz) ``` ## Adding a snippet ```bash npm run new # interactive scaffolder โ†’ snippets//.html npm run validate # the same gate the build runs ``` One file = one animation. The gallery, detail page, category pages, search index and tag filters all regenerate at build time โ€” never edit generated pages. Snippet hard rules (enforced by `scripts/validate-snippets.mjs`, which **fails the build**): - SVGarden author header at the top (attribution travels with every copy/download); - `` YAML frontmatter (title, slug, category, tags, difficulty, techniques, how_it_works, customizable, created, and optional `support`); - self-contained (no external assets), all classes prefixed `sg-`, - customizable values as `--sg-*` custom properties declared on the root element, - โ‰ค 150 lines, `js` tag iff the snippet contains a `