{
  "id": "double-ticker-band",
  "kind": "element",
  "title": "Double ticker band",
  "summary": "Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.",
  "url": "https://enrichr.dev/elements/double-ticker-band.html",
  "section": "band",
  "techniques": [
    "text-animation"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "bold",
    "energetic"
  ],
  "intents": [
    "double marquee text band",
    "two row scrolling ticker",
    "infinite scrolling words banner",
    "opposite direction marquee rows",
    "repeating slogan ticker strip"
  ],
  "status": "tested",
  "params": [
    {
      "key": "top",
      "label": "Top line",
      "type": "text",
      "value": "Capture it"
    },
    {
      "key": "bottom",
      "label": "Bottom line",
      "type": "text",
      "value": "Rebuild it"
    },
    {
      "key": "separator",
      "label": "Separator",
      "type": "text",
      "value": "•"
    },
    {
      "key": "topSpeed",
      "label": "Top loop (s per 8 repeats, higher is slower)",
      "type": "range",
      "min": 4,
      "max": 60,
      "step": 1,
      "value": 30
    },
    {
      "key": "bottomSpeed",
      "label": "Bottom loop (s per 8 repeats)",
      "type": "range",
      "min": 4,
      "max": 60,
      "step": 1,
      "value": 14
    },
    {
      "key": "topDirection",
      "label": "Top direction",
      "type": "select",
      "options": [
        [
          "left",
          "Left"
        ],
        [
          "right",
          "Right"
        ]
      ],
      "value": "left"
    },
    {
      "key": "bottomDirection",
      "label": "Bottom direction",
      "type": "select",
      "options": [
        [
          "left",
          "Left"
        ],
        [
          "right",
          "Right"
        ]
      ],
      "value": "left"
    },
    {
      "key": "size",
      "label": "Text size (rem)",
      "type": "range",
      "min": 0.8,
      "max": 3,
      "step": 0.1,
      "value": 1.2
    },
    {
      "key": "gap",
      "label": "Gap (px)",
      "type": "range",
      "min": 0,
      "max": 160,
      "step": 4,
      "value": 60
    },
    {
      "key": "fade",
      "label": "Edge fade (px)",
      "type": "range",
      "min": 0,
      "max": 200,
      "step": 5,
      "value": 0
    },
    {
      "key": "topBg",
      "label": "Top band",
      "type": "color",
      "value": "#0c1e18"
    },
    {
      "key": "topInk",
      "label": "Top text",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "bottomBg",
      "label": "Bottom band",
      "type": "color",
      "value": "#fbf8f1"
    },
    {
      "key": "bottomInk",
      "label": "Bottom text",
      "type": "color",
      "value": "#0c1e18"
    },
    {
      "key": "background",
      "label": "Background",
      "type": "color",
      "value": "#fbf8f1"
    }
  ],
  "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 \"Double ticker band\" element to this project.\n\nThis is the \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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/double-ticker-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 \"Double ticker 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 \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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 \"Double ticker band\" element to this codebase.\n\nThis is the \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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-double-ticker-band.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Double ticker 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 \"Double ticker band\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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- double-ticker-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 \"./double-ticker-band\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function DoubleTickerBand(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 \"Double ticker band\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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- double-ticker-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/DoubleTickerBand.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./double-ticker-band\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function DoubleTickerBand(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 \"Double ticker band\" element.\n\nThis is the \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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), double-ticker-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 \"Double ticker band\" element. No packages, no server code.\n\nThis is the \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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 double-ticker-band.js and then main.js), style.css (the CSS below), double-ticker-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 \"Double ticker 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 \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-band.json\n\nWhat it does: Each band holds one short line with its separator, repeated eight times as a set, and the set is doubled. The track slides from 0 to minus 50 percent of its own width on a linear loop, which moves it by exactly one set, so the start and end frames are identical and the join never shows. As in the original, the top band takes 30 seconds per set and the bottom band 14, so the two lines drift past each other at different speeds. If one set is narrower than the element, more sets are added to each half and the loop time is multiplied by the same number, so the words keep the same pace on any screen. Each loop is a Web Animation, so it runs on the compositor, and a live change of speed or direction keeps the band where it is instead of jumping. The edge fade is an optional CSS mask on each band.\nAccessibility: Each line is read once from a visually hidden paragraph; the moving copies are hidden from screen readers. The pair of bands can take keyboard focus, and both loops stop while it has focus, with a visible focus ring. With prefers-reduced-motion the words stay still.\n\nTunable settings:\n- Top line: text, default Capture it\n- Bottom line: text, default Rebuild it\n- Separator: text, default •\n- Top loop (s per 8 repeats, higher is slower): range 4 to 60, step 1, default 30\n- Bottom loop (s per 8 repeats): range 4 to 60, step 1, default 14\n- Top direction: select (Left / Right), default left\n- Bottom direction: select (Left / Right), default left\n- Text size (rem): range 0.8 to 3, step 0.1, default 1.2\n- Gap (px): range 0 to 160, step 4, default 60\n- Edge fade (px): range 0 to 200, step 5, default 0\n- Top band: color, default #0c1e18\n- Top text: color, default #e6ff55\n- Bottom band: color, default #fbf8f1\n- Bottom text: color, default #0c1e18\n- Background: color, default #fbf8f1\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/double-ticker-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 \"Double ticker 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 \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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 DoubleTickerBand.\n2. Paste the JavaScript below into a separate code file named double-ticker-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 \"./double-ticker-band\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function DoubleTickerBand(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(DoubleTickerBand, {\n  top: { type: ControlType.String, title: \"Top line\", defaultValue: \"Capture it\" },\n  bottom: { type: ControlType.String, title: \"Bottom line\", defaultValue: \"Rebuild it\" },\n  separator: { type: ControlType.String, title: \"Separator\", defaultValue: \"•\" },\n  topSpeed: { type: ControlType.Number, title: \"Top loop\", min: 4, max: 60, step: 1, defaultValue: 30 },\n  bottomSpeed: { type: ControlType.Number, title: \"Bottom loop\", min: 4, max: 60, step: 1, defaultValue: 14 },\n  topDirection: { type: ControlType.Enum, title: \"Top direction\", options: [\"left\",\"right\"], optionTitles: [\"Left\",\"Right\"], defaultValue: \"left\" },\n  bottomDirection: { type: ControlType.Enum, title: \"Bottom direction\", options: [\"left\",\"right\"], optionTitles: [\"Left\",\"Right\"], defaultValue: \"left\" },\n  size: { type: ControlType.Number, title: \"Text size\", min: 0.8, max: 3, step: 0.1, defaultValue: 1.2 },\n  gap: { type: ControlType.Number, title: \"Gap\", min: 0, max: 160, step: 4, defaultValue: 60 },\n  fade: { type: ControlType.Number, title: \"Edge fade\", min: 0, max: 200, step: 5, defaultValue: 0 },\n  topBg: { type: ControlType.Color, title: \"Top band\", defaultValue: \"#0c1e18\" },\n  topInk: { type: ControlType.Color, title: \"Top text\", defaultValue: \"#e6ff55\" },\n  bottomBg: { type: ControlType.Color, title: \"Bottom band\", defaultValue: \"#fbf8f1\" },\n  bottomInk: { type: ControlType.Color, title: \"Bottom text\", defaultValue: \"#0c1e18\" },\n  background: { type: ControlType.Color, title: \"Background\", defaultValue: \"#fbf8f1\" },\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 \"Double ticker 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 \"Double ticker band\" element from the Enrichr Library: Two stacked bands of repeated words that slide past on their own endless loops, at different speeds and in either direction.\nPage: https://enrichr.dev/elements/double-ticker-band.html\nMachine-readable spec: https://enrichr.dev/elements/double-ticker-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-double-ticker-band\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-double-ticker-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": "Each line is read once from a visually hidden paragraph; the moving copies are hidden from screen readers. The pair of bands can take keyboard focus, and both loops stop while it has focus, with a visible focus ring. With prefers-reduced-motion the words stay still.",
  "performance": "Only transform animates, as a Web Animation on the compositor, so there is no JavaScript per frame and no layout work. Text is measured once, again after web fonts load, and again only when the width changes by more than 24 pixels. Both loops pause off screen through IntersectionObserver and in hidden tabs.",
  "dependencies": [],
  "codepen": "https://codepen.io/Enrichr-Dev/pen/RNpEBeJ",
  "source": {
    "markup": "<div class=\"ef-dtk\">\n  <div class=\"ef-dtk__rows\" tabindex=\"0\" role=\"group\" aria-label=\"Two scrolling lines of text. Focus here to pause them.\">\n    <div class=\"ef-dtk__row ef-dtk__row--a\"><p class=\"ef-dtk__sr\"></p><div class=\"ef-dtk__track\" aria-hidden=\"true\"></div></div>\n    <div class=\"ef-dtk__row ef-dtk__row--b\"><p class=\"ef-dtk__sr\"></p><div class=\"ef-dtk__track\" aria-hidden=\"true\"></div></div>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-dtk { --ef-dtk-page: #fbf8f1; --ef-dtk-a-bg: #0c1e18; --ef-dtk-a-ink: #e6ff55; --ef-dtk-b-bg: #fbf8f1; --ef-dtk-b-ink: #0c1e18; --ef-dtk-size: 1.2rem; --ef-dtk-gap: 60px; --ef-dtk-fade: 0px; position: relative; width: 100%; min-height: 20rem; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; overflow: hidden; border-radius: 1rem; background: var(--ef-dtk-page); font-family: 'Parkinsans', 'Space Grotesk', sans-serif; }\n.ef-dtk .ef-dtk__rows { width: 100%; overflow: hidden; outline: none; }\n.ef-dtk .ef-dtk__rows:focus-visible { box-shadow: 0 0 0 3px var(--ef-dtk-a-ink), 0 0 0 6px var(--ef-dtk-a-bg); }\n.ef-dtk .ef-dtk__row { position: relative; overflow: hidden; white-space: nowrap; -webkit-mask-image: var(--ef-dtk-mask, none); mask-image: var(--ef-dtk-mask, none); }\n.ef-dtk .ef-dtk__row--a { padding: 12px 0; background: var(--ef-dtk-a-bg); color: var(--ef-dtk-a-ink); border-top: 3px solid var(--ef-dtk-a-bg); border-bottom: 3px solid var(--ef-dtk-a-bg); }\n.ef-dtk .ef-dtk__row--b { padding: 10px 0; background: var(--ef-dtk-b-bg); color: var(--ef-dtk-b-ink); }\n.ef-dtk .ef-dtk__track { display: flex; width: max-content; will-change: transform; }\n.ef-dtk .ef-dtk__item { flex: none; margin: 0; padding: 0 var(--ef-dtk-gap) 0 0; font-size: var(--ef-dtk-size); font-weight: 800; line-height: 1.15; letter-spacing: 1px; text-transform: uppercase; opacity: 1; }\n.ef-dtk .ef-dtk__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Double ticker band: two stacked full-width bands of repeated words, each on its own endless loop. Each band holds one\n// short line repeated eight times as a set, the set is doubled, and the track slides by exactly half its width on a linear\n// loop, so the join never shows. The top band takes 30 seconds per set and the bottom one 14, as in the original, so they\n// drift past each other at different speeds; either can run the other way. On a wide screen extra sets are added and the\n// loop time grows with them, so the words keep the same pace. The loops run as Web Animations on the compositor.\n// Reduced motion shows the words still. The loops pause off screen, in hidden tabs, and while the band has keyboard focus.\n// mount(root, { top (text), bottom (text), separator, topSpeed (s per set of 8), bottomSpeed (s per set of 8),\n//               topDirection (\"left\" or \"right\"), bottomDirection, size (rem), gap (px), fade (edge fade, px),\n//               topBg, topInk, bottomBg, bottomInk, background })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var box = root.querySelector(\".ef-dtk\");\n  var group = root.querySelector(\".ef-dtk__rows\");\n  var SET = 8; // copies per set, as in the original\n  var rows = [].map.call(root.querySelectorAll(\".ef-dtk__row\"), function (el, i) {\n    return { el: el, track: el.querySelector(\".ef-dtk__track\"), sr: el.querySelector(\".ef-dtk__sr\"), key: i ? \"bottom\" : \"top\", anim: null, dur: 0, dir: \"\", sig: \"\" };\n  });\n  var opts = {}, io = null, ro = null, visible = true, focused = false, destroyed = false, lastW = 0;\n\n  function num(v, d) { v = Number(v); return isFinite(v) ? v : d; }\n  function item(text) { var s = document.createElement(\"span\"); s.className = \"ef-dtk__item\"; s.textContent = text; return s; }\n  function frames(dir) {\n    var a = { transform: \"translate3d(0,0,0)\" }, b = { transform: \"translate3d(-50%,0,0)\" };\n    return dir === \"right\" ? [b, a] : [a, b];\n  }\n  function paused() { return !visible || focused || document.hidden; }\n\n  // Start (or restart) one band's loop, keeping its current place so a live change never jumps.\n  function play(r, sec, dir) {\n    if (reduce || !r.track.animate) return;\n    var dur = Math.max(0.5, sec) * 1000, p = 0;\n    if (r.anim) {\n      var ct = Number(r.anim.currentTime) || 0;\n      p = r.dur ? (ct % r.dur) / r.dur : 0;\n      if (r.dir && r.dir !== dir) p = 1 - p;\n      r.anim.cancel();\n    }\n    r.anim = r.track.animate(frames(dir), { duration: dur, iterations: Infinity, easing: \"linear\" });\n    r.anim.currentTime = p * dur;\n    r.dur = dur; r.dir = dir;\n    if (paused()) r.anim.pause();\n  }\n  // Fill a band: one set of eight must cover the width; add sets until it does, and scale the loop time to match.\n  function build(r) {\n    var text = String(opts[r.key] || \"\").trim() || \" \";\n    var label = opts.separator ? text + \" \" + opts.separator : text;\n    var sig = label + \"|\" + opts.size + \"|\" + opts.gap;\n    r.sr.textContent = text;\n    var probe = item(label);\n    r.track.textContent = \"\";\n    r.track.appendChild(probe);\n    var w = probe.getBoundingClientRect().width || 120;\n    var k = Math.max(1, Math.ceil((box.clientWidth || 800) / (w * SET)));\n    var n = SET * k * 2, frag = document.createDocumentFragment();\n    for (var i = 0; i < n; i++) frag.appendChild(item(label));\n    r.track.textContent = \"\";\n    r.track.appendChild(frag);\n    r.k = k; r.sig = sig;\n  }\n  function run(r) { play(r, num(opts[r.key + \"Speed\"], r.key === \"top\" ? 30 : 14) * r.k, opts[r.key + \"Direction\"] === \"right\" ? \"right\" : \"left\"); }\n  function sync() { rows.forEach(function (r) { if (r.anim) { if (paused()) r.anim.pause(); else r.anim.play(); } }); }\n\n  function update(partial) {\n    opts = Object.assign({\n      top: \"Capture it\", bottom: \"Rebuild it\", separator: \"•\", topSpeed: 30, bottomSpeed: 14, topDirection: \"left\", bottomDirection: \"left\",\n      size: 1.2, gap: 60, fade: 0, topBg: \"#0c1e18\", topInk: \"#e6ff55\", bottomBg: \"#fbf8f1\", bottomInk: \"#0c1e18\", background: \"#fbf8f1\"\n    }, opts, partial || {});\n    opts.size = Math.max(0.5, num(opts.size, 1.2)); opts.gap = Math.max(0, num(opts.gap, 60)); opts.fade = Math.max(0, num(opts.fade, 0));\n    var s = box.style;\n    s.setProperty(\"--ef-dtk-page\", opts.background);\n    s.setProperty(\"--ef-dtk-a-bg\", opts.topBg); s.setProperty(\"--ef-dtk-a-ink\", opts.topInk);\n    s.setProperty(\"--ef-dtk-b-bg\", opts.bottomBg); s.setProperty(\"--ef-dtk-b-ink\", opts.bottomInk);\n    s.setProperty(\"--ef-dtk-size\", opts.size + \"rem\"); s.setProperty(\"--ef-dtk-gap\", opts.gap + \"px\");\n    s.setProperty(\"--ef-dtk-mask\", opts.fade > 0 && !reduce ? \"linear-gradient(to right, transparent 0, #000 \" + opts.fade + \"px, #000 calc(100% - \" + opts.fade + \"px), transparent 100%)\" : \"none\");\n    if (destroyed) return;\n    rows.forEach(function (r) {\n      var text = String(opts[r.key] || \"\").trim() || \" \";\n      if ((opts.separator ? text + \" \" + opts.separator : text) + \"|\" + opts.size + \"|\" + opts.gap !== r.sig) build(r);\n      run(r);\n    });\n    lastW = box.clientWidth;\n  }\n  function refit() { if (destroyed) return; rows.forEach(function (r) { r.sig = \"\"; build(r); run(r); }); lastW = box.clientWidth; }\n  function onFocus() { focused = true; sync(); }\n  function onBlur() { focused = false; sync(); }\n  function onVis() { sync(); }\n\n  update(o);\n  group.addEventListener(\"focus\", onFocus);\n  group.addEventListener(\"blur\", onBlur);\n  document.addEventListener(\"visibilitychange\", onVis);\n  if (\"IntersectionObserver\" in window) { io = new IntersectionObserver(function (e) { visible = e[0].isIntersecting; sync(); }); io.observe(box); }\n  if (\"ResizeObserver\" in window) {\n    ro = new ResizeObserver(function () { var w = box.clientWidth; if (Math.abs(w - lastW) > 24) refit(); });\n    ro.observe(box);\n  }\n  if (document.fonts && document.fonts.ready) document.fonts.ready.then(function () { refit(); });\n  return {\n    update: update,\n    destroy: function () {\n      destroyed = true;\n      rows.forEach(function (r) { if (r.anim) r.anim.cancel(); r.anim = null; });\n      group.removeEventListener(\"focus\", onFocus); group.removeEventListener(\"blur\", onBlur);\n      document.removeEventListener(\"visibilitychange\", onVis);\n      if (io) io.disconnect();\n      if (ro) ro.disconnect();\n    }\n  };\n}"
  }
}