{
  "id": "marquee-hover-menu",
  "kind": "element",
  "title": "Marquee hover menu",
  "summary": "Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.",
  "url": "https://enrichr.dev/elements/marquee-hover-menu.html",
  "section": "nav",
  "techniques": [
    "pointer-interaction",
    "text-animation"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "bold",
    "energetic"
  ],
  "intents": [
    "menu hover marquee",
    "direction aware hover menu",
    "navigation with scrolling text on hover",
    "hover reveal band menu",
    "big type nav ticker"
  ],
  "status": "tested",
  "params": [
    {
      "key": "items",
      "label": "Items (comma separated, Label or Label=url)",
      "type": "text",
      "value": "Discover, Experiment, Create, Repeat"
    },
    {
      "key": "speed",
      "label": "Ticker loop (seconds)",
      "type": "range",
      "min": 4,
      "max": 20,
      "step": 1,
      "value": 9
    },
    {
      "key": "direction",
      "label": "Band direction",
      "type": "select",
      "options": [
        [
          "aware",
          "Follow the pointer"
        ],
        [
          "bottom",
          "Always from below"
        ]
      ],
      "value": "aware"
    },
    {
      "key": "accent",
      "label": "Band colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "background",
      "label": "Background",
      "type": "color",
      "value": "#0c1e18"
    },
    {
      "key": "ink",
      "label": "Text colour",
      "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 \"Marquee hover menu\" element to this project.\n\nThis is the \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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/marquee-hover-menu.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 \"Marquee hover menu\" 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 \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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 \"Marquee hover menu\" element to this codebase.\n\nThis is the \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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-marquee-hover-menu.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Marquee hover menu 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 \"Marquee hover menu\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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- marquee-hover-menu.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 \"./marquee-hover-menu\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function MarqueeHoverMenu(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 \"Marquee hover menu\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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- marquee-hover-menu.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/MarqueeHoverMenu.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./marquee-hover-menu\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function MarqueeHoverMenu(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 \"Marquee hover menu\" element.\n\nThis is the \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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), marquee-hover-menu.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 \"Marquee hover menu\" element. No packages, no server code.\n\nThis is the \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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 marquee-hover-menu.js and then main.js), style.css (the CSS below), marquee-hover-menu.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 \"Marquee hover menu\" 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 \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.json\n\nWhat it does: Each row is a link holding the static label and a hidden band. On pointer enter the script checks whether the pointer came in through the top or bottom half of the row, parks the band just outside that edge and its content just outside the opposite edge, then transitions both to zero. Because they move in opposite directions the band reveals the ticker rather than pushing it. On leave it exits through the edge the pointer left by. The ticker is two identical halves, each filled with enough copies of the word to cover the row, and a CSS animation slides the track by exactly one half so it loops without a seam. It only runs while its band is showing.\nAccessibility: Rows are real links in a list inside a labelled nav, and the band is aria-hidden, so screen readers hear each label once. Keyboard focus shows the band too, with a visible focus ring. Touch taps just follow the link. With prefers-reduced-motion the band appears without sliding and the ticker stays still.\n\nTunable settings:\n- Items (comma separated, Label or Label=url): text, default Discover, Experiment, Create, Repeat\n- Ticker loop (seconds): range 4 to 20, step 1, default 9\n- Band direction: select (Follow the pointer / Always from below), default aware\n- Band colour: color, default #e6ff55\n- Background: color, default #0c1e18\n- Text colour: 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/marquee-hover-menu.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 \"Marquee hover menu\" 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 \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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 MarqueeHoverMenu.\n2. Paste the JavaScript below into a separate code file named marquee-hover-menu.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 \"./marquee-hover-menu\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function MarqueeHoverMenu(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(MarqueeHoverMenu, {\n  items: { type: ControlType.String, title: \"Items (comma separated, Label or Label=url)\", defaultValue: \"Discover, Experiment, Create, Repeat\" },\n  speed: { type: ControlType.Number, title: \"Ticker loop\", min: 4, max: 20, step: 1, defaultValue: 9 },\n  direction: { type: ControlType.Enum, title: \"Band direction\", options: [\"aware\",\"bottom\"], optionTitles: [\"Follow the pointer\",\"Always from below\"], defaultValue: \"aware\" },\n  accent: { type: ControlType.Color, title: \"Band colour\", defaultValue: \"#e6ff55\" },\n  background: { type: ControlType.Color, title: \"Background\", defaultValue: \"#0c1e18\" },\n  ink: { type: ControlType.Color, title: \"Text colour\", 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 \"Marquee hover menu\" 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 \"Marquee hover menu\" element from the Enrichr Library: Big menu rows where a coloured band slides in from the edge the pointer entered, carrying the word as an endless ticker.\nPage: https://enrichr.dev/elements/marquee-hover-menu.html\nMachine-readable spec: https://enrichr.dev/elements/marquee-hover-menu.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-marquee-hover-menu\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-marquee-hover-menu\"), { ...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": "Rows are real links in a list inside a labelled nav, and the band is aria-hidden, so screen readers hear each label once. Keyboard focus shows the band too, with a visible focus ring. Touch taps just follow the link. With prefers-reduced-motion the band appears without sliding and the ticker stays still.",
  "performance": "Only transforms animate, and each ticker is paused unless its row is hovered or focused. Rows are measured once, and again only when the menu's width changes by more than 40 pixels.",
  "dependencies": [],
  "source": {
    "markup": "<nav class=\"ef-mqm\" aria-label=\"Menu\">\n  <ul class=\"ef-mqm__list\"></ul>\n</nav>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-mqm { --ef-mqm-bg: #0c1e18; --ef-mqm-acc: #e6ff55; --ef-mqm-ink: #fbf8f1; --ef-mqm-speed: 9s; --ef-mqm-e: cubic-bezier(0.22, 1, 0.36, 1); width: 100%; box-sizing: border-box; padding: 0.6rem 1.2rem; border-radius: 1rem; background: var(--ef-mqm-bg); color: var(--ef-mqm-ink); font-family: \"Helvetica Neue\", Arial, \"Segoe UI\", system-ui, sans-serif; container-type: inline-size; }\n.ef-mqm__list { list-style: none; margin: 0; padding: 0; }\n.ef-mqm__item { border-top: 1px solid color-mix(in srgb, var(--ef-mqm-ink) 22%, transparent); }\n.ef-mqm__item:last-child { border-bottom: 1px solid color-mix(in srgb, var(--ef-mqm-ink) 22%, transparent); }\n.ef-mqm__row { position: relative; display: block; overflow: hidden; color: inherit; text-decoration: none; outline: none; }\n.ef-mqm__static { display: flex; align-items: center; gap: 1.2rem; padding: 0.9rem 0.4rem; font-size: clamp(1.8rem, 7.5cqi, 4.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.05em; }\n.ef-mqm__n { flex: none; font: 600 0.72rem/1 ui-monospace, \"SFMono-Regular\", Menlo, monospace; letter-spacing: 0.1em; opacity: 0.7; }\n.ef-mqm__arr { margin-left: auto; width: 0.55em; height: 0.55em; flex: none; }\n.ef-mqm__band { position: absolute; inset: 0; overflow: hidden; background: var(--ef-mqm-acc); color: var(--ef-mqm-bg); transform: translate3d(0, 101%, 0); transition: transform 450ms var(--ef-mqm-e); pointer-events: none; }\n.ef-mqm__inner { position: absolute; inset: 0; display: flex; align-items: center; transform: translate3d(0, -101%, 0); transition: transform 450ms var(--ef-mqm-e); }\n.ef-mqm__track { display: flex; flex: none; white-space: nowrap; animation: ef-mqm-run var(--ef-mqm-speed) linear infinite; animation-play-state: paused; will-change: transform; }\n.ef-mqm__row.is-on .ef-mqm__track { animation-play-state: running; }\n.ef-mqm__chunk { display: flex; flex: none; align-items: center; font-size: clamp(2rem, 8.5cqi, 5rem); font-weight: 900; letter-spacing: -0.05em; }\n.ef-mqm__word { padding: 0 0.35em; }\n.ef-mqm__sep { width: 0.32em; height: 0.32em; flex: none; border-radius: 50%; background: currentColor; }\n.ef-mqm__row:focus-visible { box-shadow: inset 0 0 0 3px var(--ef-mqm-ink); }\n@keyframes ef-mqm-run { to { transform: translate3d(-50%, 0, 0); } }\n@media (prefers-reduced-motion: reduce) { .ef-mqm__band, .ef-mqm__inner { transition: none; } .ef-mqm__track { animation: none; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Marquee hover menu: big menu rows where a coloured band slides in on hover or focus, carrying the same word as an endless\n// ticker. The band enters from the edge the pointer came in through and leaves through the edge it went out of, because\n// the band and its content slide in opposite directions (a reveal rather than a push). The ticker is a CSS animation that\n// only runs while its band is showing. Rows are real links; mouse and pen get the effect, touch just follows the link.\n// mount(root, { items (comma separated, \"Label\" or \"Label=url\"), speed (seconds per ticker loop), direction (\"aware\" or \"bottom\"),\n//               accent, background, ink })\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var nav = root.querySelector(\".ef-mqm\");\n  var list = root.querySelector(\".ef-mqm__list\");\n  var opts = {}, rows = [], ro = null, lastW = 0;\n  var NS = \"http://www.w3.org/2000/svg\";\n\n  function arrow() {\n    var s = document.createElementNS(NS, \"svg\");\n    s.setAttribute(\"viewBox\", \"0 0 24 24\"); s.setAttribute(\"class\", \"ef-mqm__arr\"); s.setAttribute(\"aria-hidden\", \"true\"); s.setAttribute(\"focusable\", \"false\");\n    s.innerHTML = '<path d=\"M5 19L19 5M8 5h11v11\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>';\n    return s;\n  }\n  function chunk(word, copies) {\n    var c = document.createElement(\"span\"); c.className = \"ef-mqm__chunk\";\n    for (var i = 0; i < copies; i++) {\n      var w = document.createElement(\"span\"); w.className = \"ef-mqm__word\"; w.textContent = word;\n      var d = document.createElement(\"span\"); d.className = \"ef-mqm__sep\";\n      c.appendChild(w); c.appendChild(d);\n    }\n    return c;\n  }\n  // Fill each ticker so one half is at least as wide as the row; the track then loops by sliding exactly one half.\n  function fill(r) {\n    r.track.textContent = \"\";\n    var probe = chunk(r.word, 1);\n    r.track.appendChild(probe);\n    var one = probe.getBoundingClientRect().width || 200, need = r.el.getBoundingClientRect().width || 600;\n    var copies = Math.max(2, Math.ceil(need / one) + 1);\n    r.track.textContent = \"\";\n    r.track.appendChild(chunk(r.word, copies));\n    r.track.appendChild(chunk(r.word, copies));\n  }\n  function slide(r, y) {\n    r.band.style.transform = \"translate3d(0,\" + y + \"%,0)\";\n    r.inner.style.transform = \"translate3d(0,\" + (-y) + \"%,0)\";\n  }\n  function show(r, fromTop) {\n    var y = fromTop ? -101 : 101;\n    r.band.style.transition = r.inner.style.transition = \"none\";\n    slide(r, y);\n    void r.band.offsetWidth;\n    r.band.style.transition = r.inner.style.transition = \"\";\n    slide(r, 0);\n    r.el.classList.add(\"is-on\");\n  }\n  function hide(r, toTop) {\n    slide(r, toTop ? -101 : 101);\n    r.el.classList.remove(\"is-on\");\n  }\n  function edgeTop(r, e) {\n    if (opts.direction !== \"aware\") return false;\n    var b = r.el.getBoundingClientRect();\n    return e.clientY - b.top < b.height / 2;\n  }\n  function build() {\n    list.textContent = \"\";\n    rows = [];\n    var items = String(opts.items).split(\",\").map(function (s) {\n      var k = s.indexOf(\"=\"); return k < 0 ? { t: s.trim(), href: \"#\" } : { t: s.slice(0, k).trim(), href: s.slice(k + 1).trim() || \"#\" };\n    }).filter(function (i) { return i.t; }).slice(0, 8);\n    if (!items.length) items = [{ t: \"Menu\", href: \"#\" }];\n    items.forEach(function (it, i) {\n      var li = document.createElement(\"li\"); li.className = \"ef-mqm__item\";\n      var a = document.createElement(\"a\"); a.className = \"ef-mqm__row\"; a.href = it.href;\n      var st = document.createElement(\"span\"); st.className = \"ef-mqm__static\";\n      var n = document.createElement(\"span\"); n.className = \"ef-mqm__n\"; n.setAttribute(\"aria-hidden\", \"true\"); n.textContent = String(i + 1).padStart(2, \"0\");\n      var t = document.createElement(\"span\"); t.className = \"ef-mqm__t\"; t.textContent = it.t;\n      st.appendChild(n); st.appendChild(t); st.appendChild(arrow());\n      var band = document.createElement(\"span\"); band.className = \"ef-mqm__band\"; band.setAttribute(\"aria-hidden\", \"true\");\n      var inner = document.createElement(\"span\"); inner.className = \"ef-mqm__inner\";\n      var track = document.createElement(\"span\"); track.className = \"ef-mqm__track\";\n      inner.appendChild(track); band.appendChild(inner);\n      a.appendChild(st); a.appendChild(band);\n      li.appendChild(a); list.appendChild(li);\n      var r = { el: a, band: band, inner: inner, track: track, word: it.t };\n      rows.push(r);\n      a.addEventListener(\"pointerenter\", function (e) { if (e.pointerType !== \"touch\") show(r, edgeTop(r, e)); });\n      a.addEventListener(\"pointerleave\", function (e) { if (e.pointerType !== \"touch\") hide(r, edgeTop(r, e)); });\n      a.addEventListener(\"focus\", function () { if (!r.el.classList.contains(\"is-on\")) show(r, false); });\n      a.addEventListener(\"blur\", function () { hide(r, false); });\n      a.addEventListener(\"click\", function (e) { if (it.href === \"#\") e.preventDefault(); });\n    });\n    rows.forEach(fill);\n    lastW = list.getBoundingClientRect().width;\n  }\n  function update(next) {\n    opts = Object.assign({ items: \"Discover, Experiment, Create, Repeat\", speed: 9, direction: \"aware\", accent: \"#e6ff55\", background: \"#0c1e18\", ink: \"#fbf8f1\" }, opts, next || {});\n    nav.style.setProperty(\"--ef-mqm-speed\", Math.max(2, Number(opts.speed) || 9) + \"s\");\n    nav.style.setProperty(\"--ef-mqm-acc\", opts.accent);\n    nav.style.setProperty(\"--ef-mqm-bg\", opts.background);\n    nav.style.setProperty(\"--ef-mqm-ink\", opts.ink);\n    build();\n  }\n  update(o);\n  if (\"ResizeObserver\" in window) {\n    ro = new ResizeObserver(function () { var w = list.getBoundingClientRect().width; if (Math.abs(w - lastW) > 40) { lastW = w; rows.forEach(fill); } });\n    ro.observe(list);\n  }\n  return { update: update, destroy: function () { if (ro) ro.disconnect(); list.textContent = \"\"; rows = []; } };\n}"
  }
}