{
  "id": "counting-stats-band",
  "kind": "element",
  "title": "Counting stats band",
  "summary": "A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.",
  "url": "https://enrichr.dev/elements/counting-stats-band.html",
  "section": "band",
  "techniques": [
    "stagger",
    "reveal",
    "text-animation"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "clean",
    "technical"
  ],
  "intents": [
    "animated stats counter section",
    "count up numbers on scroll",
    "statistics band with counters",
    "number counter animation",
    "stats grid with animated underline"
  ],
  "status": "tested",
  "params": [
    {
      "key": "eyebrow",
      "label": "Status line",
      "type": "text",
      "value": "Status: Shipping"
    },
    {
      "key": "title",
      "label": "Heading",
      "type": "text",
      "value": "Small files, big motion"
    },
    {
      "key": "s1Tag",
      "label": "Stat 1 tag",
      "type": "text",
      "value": "01 / Frame rate"
    },
    {
      "key": "s1Number",
      "label": "Stat 1 number (like 60, $50k or 2+)",
      "type": "text",
      "value": "60"
    },
    {
      "key": "s1Unit",
      "label": "Stat 1 unit",
      "type": "text",
      "value": "fps"
    },
    {
      "key": "s1Label",
      "label": "Stat 1 label",
      "type": "text",
      "value": "The frame rate every animation here is tuned to hold"
    },
    {
      "key": "s2Tag",
      "label": "Stat 2 tag",
      "type": "text",
      "value": "02 / Files"
    },
    {
      "key": "s2Number",
      "label": "Stat 2 number",
      "type": "text",
      "value": "3"
    },
    {
      "key": "s2Unit",
      "label": "Stat 2 unit",
      "type": "text",
      "value": "files"
    },
    {
      "key": "s2Label",
      "label": "Stat 2 label",
      "type": "text",
      "value": "Markup, styles and a script. Nothing else to install"
    },
    {
      "key": "s3Tag",
      "label": "Stat 3 tag",
      "type": "text",
      "value": "03 / Vanilla"
    },
    {
      "key": "s3Number",
      "label": "Stat 3 number",
      "type": "text",
      "value": "100"
    },
    {
      "key": "s3Unit",
      "label": "Stat 3 unit",
      "type": "text",
      "value": "%"
    },
    {
      "key": "s3Label",
      "label": "Stat 3 label",
      "type": "text",
      "value": "Plain JavaScript that drops into React, Next.js or a static page"
    },
    {
      "key": "speed",
      "label": "Speed",
      "type": "range",
      "min": 0.25,
      "max": 3,
      "step": 0.05,
      "value": 1
    },
    {
      "key": "background",
      "label": "Background",
      "type": "color",
      "value": "#fbf8f1"
    },
    {
      "key": "panel",
      "label": "Stat panels",
      "type": "color",
      "value": "#ffffff"
    },
    {
      "key": "text",
      "label": "Text",
      "type": "color",
      "value": "#0c1e18"
    },
    {
      "key": "accent",
      "label": "Accent (units, rules, dot)",
      "type": "color",
      "value": "#126e45"
    }
  ],
  "license": "Free to use in personal and client projects during the preview. Final licence terms will be published here before any paid tier starts; ask before reselling the code as a collection.",
  "contract": "function mount(root, opts) -> { update(partialOpts), destroy() }; root must contain the element markup",
  "exports": {
    "claude": "Add the \"Counting stats band\" element to this project.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSteps:\n1. Look at the project first to see its framework and where components, styles and static files live. Follow its conventions.\n2. Fetch https://enrichr.dev/elements/counting-stats-band.json if you can read URLs (fields: source.markup, source.css, source.js, params); otherwise use the source at the end of this message.\n3. Add the files, mount it where I tell you (default: the top of the home page), and pass the settings below as the opts.\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n5. Run the dev server and check it. with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "chatgpt": "I want the \"Counting stats band\" element on my website. Below is its complete source. Please:\n1. Build one self-contained index.html that I can open locally to see it working (put the CSS in a <style> tag and the JavaScript in a <script> tag, with the markup in the body).\n2. Then explain, step by step, which parts go where in my own site, and how to mount it. My stack is: [tell me yours, or say \"plain HTML\"].\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "cursor": "Add the \"Counting stats band\" element to this codebase.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nUse Composer / agent mode. First search the repo for how components, styles and scripts are organised, then add the files in the matching places, mount it on the page I name, and run the app to confirm it works. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nOptional: save this as .cursor/rules/enrichr-counting-stats-band.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Counting stats band element\nalwaysApply: false\n---\nmount(root, opts) expects the element markup inside root and returns { update, destroy }. Always call destroy() on unmount and never edit the ef- class names.",
    "v0": "Create a Next.js (App Router) client component for the \"Counting stats band\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- counting-stats-band.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nUse this component as the wrapper (adjust the import paths):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./counting-stats-band\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function CountingStatsBand(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRender it on the home page so I can see it. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "lovable": "Add the \"Counting stats band\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- counting-stats-band.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nWrapper component (src/components/CountingStatsBand.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./counting-stats-band\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function CountingStatsBand(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRemove the \"use client\" line if it is not needed. Show it on the home page. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "bolt": "Create a small Vite project (vanilla JavaScript, no framework unless I already have one) that shows the \"Counting stats band\" element.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, then a script tag), style.css (the CSS below), counting-stats-band.js (the JavaScript below) and main.js that sets the container's innerHTML to the markup and calls mount(container, opts) with the settings below. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "replit": "Create a new HTML, CSS and JavaScript Repl that shows the \"Counting stats band\" element. No packages, no server code.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, link style.css, load counting-stats-band.js and then main.js), style.css (the CSS below), counting-stats-band.js (the JavaScript below), main.js (sets the container's innerHTML to the markup, then calls mount(container, opts) with the settings below). Press Run to preview. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "figma": "Designer handoff notes for the \"Counting stats band\" element (Enrichr Library). Figma cannot run this JavaScript inside a design file, so use it as a motion reference and hand the code to a developer.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nWhat it does: When a fifth of the band is in view, one timeline starts. The status line fades in over half a second, the heading fades and rises 16px on a quartic ease-out, each stat's tag fades in 0.15 seconds after the last, then each label does the same. The numbers count from zero to their targets over 1.8 seconds on a quartic in-out curve (GSAP's power3.inOut), 0.15 seconds apart, and a rule draws across under each one over 1.4 seconds. The status dot sends out a ring every 1.4 seconds that grows to 6px while it fades. A number like $50k keeps the $ small in the accent colour, counts the 50 and keeps the k at full size, so prices, percentages and plus signs all work.\nAccessibility: With prefers-reduced-motion the finished band shows at once: no fades, no counting and no pulsing ring. Each stat has its full value as screen reader text, and the counting digits are hidden from assistive technology so nobody hears numbers ticking. The stats are a real list. Nothing needs keyboard input.\n\nTunable settings:\n- Status line: text, default Status: Shipping\n- Heading: text, default Small files, big motion\n- Stat 1 tag: text, default 01 / Frame rate\n- Stat 1 number (like 60, $50k or 2+): text, default 60\n- Stat 1 unit: text, default fps\n- Stat 1 label: text, default The frame rate every animation here is tuned to hold\n- Stat 2 tag: text, default 02 / Files\n- Stat 2 number: text, default 3\n- Stat 2 unit: text, default files\n- Stat 2 label: text, default Markup, styles and a script. Nothing else to install\n- Stat 3 tag: text, default 03 / Vanilla\n- Stat 3 number: text, default 100\n- Stat 3 unit: text, default %\n- Stat 3 label: text, default Plain JavaScript that drops into React, Next.js or a static page\n- Speed: range 0.25 to 3, step 0.05, default 1\n- Background: color, default #fbf8f1\n- Stat panels: color, default #ffffff\n- Text: color, default #0c1e18\n- Accent (units, rules, dot): color, default #126e45\n\nCurrent settings:\n{{SETTINGS}}\n\nFor the developer: Element contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nIn Figma:\n- Draw the resting state as a frame and the end state as a second frame; link them with Smart Animate to show the motion in a prototype.\n- Put the settings above in the frame's notes or Dev Mode annotations so the developer matches them.\n- Link https://enrichr.dev/elements/counting-stats-band.html in the handoff: the live demo and the copy-ready code are there. Developers can paste the prompts for Claude, Cursor or v0 from the Export menu.\nNothing is copied from another designer's file; this is original code from Enrichr.",
    "framer": "Add the \"Counting stats band\" element to Framer as a code component. Framer code components are React, so wrap the vanilla code like this. Check it in the Framer editor, as Framer's component API can change.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. In Framer: Assets > Code > New component. Name it CountingStatsBand.\n2. Paste the JavaScript below into a separate code file named counting-stats-band.js in the same project, with  export { mount };  and  export const markup = \"<the markup string>\";  added. Put the CSS into the component as a <style> tag.\n3. Component:\n```tsx\nimport { addPropertyControls, ControlType } from \"framer\"\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./counting-stats-band\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function CountingStatsBand(props: any) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n\naddPropertyControls(CountingStatsBand, {\n  eyebrow: { type: ControlType.String, title: \"Status line\", defaultValue: \"Status: Shipping\" },\n  title: { type: ControlType.String, title: \"Heading\", defaultValue: \"Small files, big motion\" },\n  s1Tag: { type: ControlType.String, title: \"Stat 1 tag\", defaultValue: \"01 / Frame rate\" },\n  s1Number: { type: ControlType.String, title: \"Stat 1 number (like 60, $50k or 2+)\", defaultValue: \"60\" },\n  s1Unit: { type: ControlType.String, title: \"Stat 1 unit\", defaultValue: \"fps\" },\n  s1Label: { type: ControlType.String, title: \"Stat 1 label\", defaultValue: \"The frame rate every animation here is tuned to hold\" },\n  s2Tag: { type: ControlType.String, title: \"Stat 2 tag\", defaultValue: \"02 / Files\" },\n  s2Number: { type: ControlType.String, title: \"Stat 2 number\", defaultValue: \"3\" },\n  s2Unit: { type: ControlType.String, title: \"Stat 2 unit\", defaultValue: \"files\" },\n  s2Label: { type: ControlType.String, title: \"Stat 2 label\", defaultValue: \"Markup, styles and a script. Nothing else to install\" },\n  s3Tag: { type: ControlType.String, title: \"Stat 3 tag\", defaultValue: \"03 / Vanilla\" },\n  s3Number: { type: ControlType.String, title: \"Stat 3 number\", defaultValue: \"100\" },\n  s3Unit: { type: ControlType.String, title: \"Stat 3 unit\", defaultValue: \"%\" },\n  s3Label: { type: ControlType.String, title: \"Stat 3 label\", defaultValue: \"Plain JavaScript that drops into React, Next.js or a static page\" },\n  speed: { type: ControlType.Number, title: \"Speed\", min: 0.25, max: 3, step: 0.05, defaultValue: 1 },\n  background: { type: ControlType.Color, title: \"Background\", defaultValue: \"#fbf8f1\" },\n  panel: { type: ControlType.Color, title: \"Stat panels\", defaultValue: \"#ffffff\" },\n  text: { type: ControlType.Color, title: \"Text\", defaultValue: \"#0c1e18\" },\n  accent: { type: ControlType.Color, title: \"Accent (units, rules, dot)\", defaultValue: \"#126e45\" },\n})\n```\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "webflow": "Add the \"Counting stats band\" element to a Webflow site with an Embed element. Test it on the published or preview site: scripts in embeds may not run inside the Designer canvas.\n\nThis is the \"Counting stats band\" element from the Enrichr Library: A stats band whose numbers count up from zero, rules draw under them and labels fade in one after another when it comes into view.\nPage: https://enrichr.dev/elements/counting-stats-band.html\nMachine-readable spec: https://enrichr.dev/elements/counting-stats-band.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. Add an Embed element where it should appear. Paste a <style> block with the CSS, one container <div id=\"enrichr-counting-stats-band\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-counting-stats-band\"), { ...your settings... });\n   (set the container's innerHTML to the markup first, as in the contract).\n2. Embed elements have a size limit (check Webflow's current number). If the code is longer, host the JS and CSS as files and link them from Custom code in the page settings, then keep only the container and the mount call in the Embed.\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}"
  },
  "exportTools": [
    "claude",
    "chatgpt",
    "cursor",
    "v0",
    "lovable",
    "bolt",
    "replit",
    "figma",
    "framer",
    "webflow"
  ],
  "accessibility": "With prefers-reduced-motion the finished band shows at once: no fades, no counting and no pulsing ring. Each stat has its full value as screen reader text, and the counting digits are hidden from assistive technology so nobody hears numbers ticking. The stats are a real list. Nothing needs keyboard input.",
  "performance": "Per frame the timeline sets a few opacities, transforms and widths and changes a number's text only when the rounded value changes. After the intro only the small dot ring updates, and the loop stops while the band is off screen or the tab is hidden.",
  "dependencies": [],
  "codepen": "https://codepen.io/Enrichr-Dev/pen/VYpqBEQ",
  "source": {
    "markup": "<div class=\"ef-csb\">\n  <div class=\"ef-csb__grid\" aria-hidden=\"true\"></div>\n  <div class=\"ef-csb__inner\">\n    <div class=\"ef-csb__eyebrow\"><span class=\"ef-csb__dot\" aria-hidden=\"true\"></span><span class=\"ef-csb__et\">Status: Shipping</span></div>\n    <h2 class=\"ef-csb__title\">Small files, big motion</h2>\n    <ul class=\"ef-csb__stats\"></ul>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-csb { --ef-csb-bg: #fbf8f1; --ef-csb-panel: #ffffff; --ef-csb-text: #0c1e18; --ef-csb-acc: #126e45; --ef-csb-line: color-mix(in srgb, var(--ef-csb-text) 13%, var(--ef-csb-bg)); --ef-csb-dim: color-mix(in srgb, var(--ef-csb-text) 62%, var(--ef-csb-bg)); position: relative; width: 100%; box-sizing: border-box; min-height: 24rem; padding: 5rem 1.5rem 6rem; overflow: hidden; border-radius: 1rem; background: var(--ef-csb-bg); color: var(--ef-csb-text); font-family: 'Parkinsans', 'Space Grotesk', sans-serif; container-type: inline-size; }\n.ef-csb *, .ef-csb *::before, .ef-csb *::after { box-sizing: border-box; }\n.ef-csb .ef-csb__grid { position: absolute; inset: 0; background-image: linear-gradient(var(--ef-csb-line) 1px, transparent 1px), linear-gradient(90deg, var(--ef-csb-line) 1px, transparent 1px); background-size: 64px 64px; opacity: 0.55; -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%); pointer-events: none; }\n.ef-csb .ef-csb__inner { position: relative; max-width: 1080px; margin: 0 auto; }\n.ef-csb .ef-csb__eyebrow { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1.25rem; font-family: 'Fira Code', ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ef-csb-acc); opacity: 0; }\n.ef-csb .ef-csb__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ef-csb-acc); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ef-csb-acc) 60%, transparent); }\n.ef-csb .ef-csb__title { margin: 0 0 3.5rem; padding: 0; max-width: 14ch; color: inherit; font-family: inherit; font-weight: 800; font-size: clamp(2.1rem, 5cqw, 3.6rem); line-height: 1.02; letter-spacing: -0.02em; text-transform: none; opacity: 0; }\n.ef-csb .ef-csb__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ef-csb-line); border-left: 1px solid var(--ef-csb-line); }\n.ef-csb .ef-csb__stat { position: relative; margin: 0; padding: 2.4rem 1.8rem 2.2rem; list-style: none; opacity: 1; border-right: 1px solid var(--ef-csb-line); border-bottom: 1px solid var(--ef-csb-line); background: var(--ef-csb-panel); }\n.ef-csb .ef-csb__idx { margin: 0 0 1.6rem; font-family: 'Fira Code', ui-monospace, monospace; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ef-csb-dim); opacity: 0; }\n.ef-csb .ef-csb__num { display: flex; align-items: baseline; gap: 0.15em; margin: 0; font-family: 'Fira Code', ui-monospace, monospace; font-weight: 700; font-size: clamp(2.4rem, 4.4cqw, 3.4rem); line-height: 1; white-space: nowrap; color: var(--ef-csb-text); }\n.ef-csb .ef-csb__unit { font-size: 0.42em; font-weight: 600; color: var(--ef-csb-acc); }\n.ef-csb .ef-csb__pre { margin-right: -0.05em; }\n.ef-csb .ef-csb__line { width: 0%; height: 2px; margin: 1.1rem 0 1.3rem; background: var(--ef-csb-acc); }\n.ef-csb .ef-csb__label { max-width: 26ch; margin: 0; padding: 0; font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 0.95rem; line-height: 1.45; color: var(--ef-csb-dim); opacity: 0; }\n.ef-csb .ef-csb__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }\n@container (max-width: 712px) { .ef-csb .ef-csb__stats { grid-template-columns: 1fr; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Counting stats band: a status line with a pulsing dot, a heading and three stat cells. When the band first comes into\n// view, one timeline plays: the status line fades in, the heading fades up 16px, each cell's tag and then its label fade\n// in 0.15 s apart, the numbers count up from zero over 1.8 s on a quartic in-out curve (GSAP power3.inOut) and a rule\n// under each number draws across on a cubic out curve. The dot's ring swells and fades every 1.4 s, for as long as the\n// band is on screen. Numbers keep any prefix (like $) small and any suffix (like k or +) at full size.\n// Reduced motion shows the finished band at once, with no counting and no pulse. Paused off screen and in hidden tabs.\n// mount(root, { eyebrow, title, s1Tag, s1Number, s1Unit, s1Label, s2..., s3..., speed, background, panel, text, accent })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var box = root.querySelector(\".ef-csb\");\n  var eyebrow = root.querySelector(\".ef-csb__eyebrow\");\n  var eyeText = root.querySelector(\".ef-csb__et\");\n  var dot = root.querySelector(\".ef-csb__dot\");\n  var title = root.querySelector(\".ef-csb__title\");\n  var list = root.querySelector(\".ef-csb__stats\");\n  var opts = {}, stats = [], sig = \"\", raf = 0, io = null, visible = false, started = false, destroyed = false, clock = 0, last = 0, acc = [18, 110, 69];\n  var END = 2.5; // the last tween (third count) ends at 0.4 + 0.3 + 1.8 s\n\n  // GSAP's eases: power1 = quad, power2 = cubic, power3 = quartic\n  function out2(p) { return 1 - (1 - p) * (1 - p); }\n  function out3(p) { return 1 - Math.pow(1 - p, 3); }\n  function out4(p) { return 1 - Math.pow(1 - p, 4); }\n  function inOut4(p) { return p < 0.5 ? Math.pow(p * 2, 4) / 2 : 1 - Math.pow((1 - p) * 2, 4) / 2; }\n  function prog(t, start, dur) { var p = (t - start) / dur; return p <= 0 ? 0 : p >= 1 ? 1 : p; }\n  function num(v, d) { v = Number(v); return isFinite(v) ? v : d; }\n  function hex(h) { var m = /^#?([0-9a-f]{6})$/i.exec(h || \"\"); var v = parseInt(m ? m[1] : \"126e45\", 16); return [v >> 16, (v >> 8) & 255, v & 255]; }\n\n  // \"$50k\" -> small \"$\", count to 50, then \"k\" at full size\n  function parse(s) {\n    var m = /^([^0-9.\\-]*)(-?\\d*\\.?\\d+)(.*)$/.exec(String(s).trim());\n    if (!m) return { pre: \"\", target: 0, dec: 0, suf: String(s), fixed: true };\n    return { pre: m[1].trim(), target: parseFloat(m[2]), dec: (m[2].split(\".\")[1] || \"\").length, suf: m[3] };\n  }\n  function el(tag, cls, text) { var e = document.createElement(tag); e.className = cls; if (text != null) e.textContent = text; return e; }\n  function build() {\n    list.textContent = \"\"; stats = [];\n    for (var i = 1; i <= 3; i++) {\n      var n = parse(opts[\"s\" + i + \"Number\"]), unit = String(opts[\"s\" + i + \"Unit\"] || \"\");\n      var li = el(\"li\", \"ef-csb__stat\");\n      var idx = li.appendChild(el(\"div\", \"ef-csb__idx\", opts[\"s\" + i + \"Tag\"]));\n      var row = li.appendChild(el(\"div\", \"ef-csb__num\")); row.setAttribute(\"aria-hidden\", \"true\");\n      if (n.pre) row.appendChild(el(\"span\", \"ef-csb__unit ef-csb__pre\", n.pre));\n      var count = row.appendChild(el(\"span\", \"ef-csb__count\", n.fixed ? n.suf : \"0\" + n.suf));\n      if (unit) row.appendChild(el(\"span\", \"ef-csb__unit\", unit));\n      li.appendChild(el(\"span\", \"ef-csb__sr\", String(opts[\"s\" + i + \"Number\"]) + (unit ? \" \" + unit : \"\")));\n      var line = li.appendChild(el(\"div\", \"ef-csb__line\"));\n      var label = li.appendChild(el(\"p\", \"ef-csb__label\", opts[\"s\" + i + \"Label\"]));\n      list.appendChild(li);\n      stats.push({ n: n, idx: idx, count: count, line: line, label: label, shown: \"\" });\n    }\n  }\n  function fmt(n, v) { return (n.dec ? v.toFixed(n.dec) : String(Math.round(v))) + n.suf; }\n\n  // the whole band at time t (seconds since it first came into view)\n  function render(t) {\n    eyebrow.style.opacity = out3(prog(t, 0, 0.5));\n    var e = out4(prog(t, 0.3, 0.7));\n    title.style.opacity = e; title.style.transform = \"translateY(\" + (16 * (1 - e)).toFixed(2) + \"px)\";\n    for (var i = 0; i < stats.length; i++) {\n      var s = stats[i];\n      s.idx.style.opacity = out3(prog(t, 0.7 + 0.15 * i, 0.4));\n      s.label.style.opacity = out3(prog(t, 1.2 + 0.15 * i, 0.5));\n      s.line.style.width = (100 * out3(prog(t, 0.5 + 0.15 * i, 1.4))).toFixed(2) + \"%\";\n      if (!s.n.fixed) {\n        var txt = fmt(s.n, s.n.target * inOut4(prog(t, 0.4 + 0.15 * i, 1.8)));\n        if (txt !== s.shown) { s.count.textContent = txt; s.shown = txt; }\n      }\n    }\n    // the dot's ring: spread 0 -> 6px while it fades from 60% to clear, quad out, every 1.4 s\n    if (reduce) { dot.style.boxShadow = \"none\"; return; }\n    var q = out2((t % 1.4) / 1.4);\n    dot.style.boxShadow = \"0 0 0 \" + (6 * q).toFixed(2) + \"px rgba(\" + acc[0] + \",\" + acc[1] + \",\" + acc[2] + \",\" + (0.6 * (1 - q)).toFixed(3) + \")\";\n  }\n  function loop(now) {\n    raf = requestAnimationFrame(loop);\n    var dt = (now - last) / 1000; last = now;\n    if (dt > 0.5 || dt < 0) dt = 0.033; // like GSAP's lag smoothing after a long stall\n    if (!visible || document.hidden) return;\n    clock += dt * opts.speed;\n    render(clock);\n  }\n  function start() {\n    if (started || destroyed) return;\n    started = true;\n    if (reduce) { render(END); return; }\n    last = performance.now(); raf = requestAnimationFrame(loop);\n  }\n\n  function update(partial) {\n    opts = Object.assign({\n      eyebrow: \"Status: Shipping\", title: \"Small files, big motion\",\n      s1Tag: \"01 / Frame rate\", s1Number: \"60\", s1Unit: \"fps\", s1Label: \"The frame rate every animation here is tuned to hold\",\n      s2Tag: \"02 / Files\", s2Number: \"3\", s2Unit: \"files\", s2Label: \"Markup, styles and a script. Nothing else to install\",\n      s3Tag: \"03 / Vanilla\", s3Number: \"100\", s3Unit: \"%\", s3Label: \"Plain JavaScript that drops into React, Next.js or a static page\",\n      speed: 1, background: \"#fbf8f1\", panel: \"#ffffff\", text: \"#0c1e18\", accent: \"#126e45\"\n    }, opts, partial || {});\n    opts.speed = Math.max(0.05, num(opts.speed, 1));\n    eyeText.textContent = opts.eyebrow;\n    title.textContent = opts.title;\n    var nsig = [1, 2, 3].map(function (i) { return [opts[\"s\" + i + \"Tag\"], opts[\"s\" + i + \"Number\"], opts[\"s\" + i + \"Unit\"], opts[\"s\" + i + \"Label\"]].join(\"\\u0001\"); }).join(\"\\u0002\");\n    if (nsig !== sig) { sig = nsig; build(); }\n    box.style.setProperty(\"--ef-csb-bg\", opts.background);\n    box.style.setProperty(\"--ef-csb-panel\", opts.panel);\n    box.style.setProperty(\"--ef-csb-text\", opts.text);\n    box.style.setProperty(\"--ef-csb-acc\", opts.accent);\n    acc = hex(opts.accent);\n    render(started ? (reduce ? END : clock) : 0);\n  }\n\n  update(o);\n  if (reduce || !(\"IntersectionObserver\" in window)) { visible = true; start(); }\n  else {\n    // start once a fifth of the band, or 160px of it, is on screen (a tall band inside a small preview never reaches a fifth)\n    io = new IntersectionObserver(function (en) { var e = en[0]; visible = e.isIntersecting; if (visible && (e.intersectionRatio >= 0.2 || e.intersectionRect.height >= 160)) start(); }, { threshold: [0, 0.05, 0.1, 0.2] });\n    io.observe(box);\n  }\n  return {\n    update: update,\n    destroy: function () { destroyed = true; cancelAnimationFrame(raf); if (io) io.disconnect(); }\n  };\n}"
  }
}