{
  "id": "radial-cards-slider",
  "kind": "element",
  "title": "Radial cards slider",
  "summary": "Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.",
  "url": "https://enrichr.dev/elements/radial-cards-slider.html",
  "section": "gallery",
  "techniques": [
    "carousel",
    "pointer-interaction"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "modern",
    "fluid",
    "polished"
  ],
  "intents": [
    "radial card slider",
    "circular arc carousel",
    "fan of cards dial",
    "wheel rotate card selector",
    "draggable curved carousel"
  ],
  "status": "tested",
  "params": [
    {
      "key": "accent",
      "label": "Accent colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "count",
      "label": "Cards",
      "type": "range",
      "min": 5,
      "max": 12,
      "step": 1,
      "value": 8
    },
    {
      "key": "radius",
      "label": "Dial radius (px)",
      "type": "range",
      "min": 200,
      "max": 500,
      "step": 10,
      "value": 330
    },
    {
      "key": "step",
      "label": "Angle between cards (deg)",
      "type": "range",
      "min": 10,
      "max": 40,
      "step": 1,
      "value": 20
    },
    {
      "key": "scale",
      "label": "Active card scale",
      "type": "range",
      "min": 1,
      "max": 1.8,
      "step": 0.05,
      "value": 1.3
    }
  ],
  "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 \"Radial cards slider\" element to this project.\n\nThis is the \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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/radial-cards-slider.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 \"Radial cards slider\" 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 \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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 \"Radial cards slider\" element to this codebase.\n\nThis is the \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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-radial-cards-slider.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Radial cards slider 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 \"Radial cards slider\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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- radial-cards-slider.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 \"./radial-cards-slider\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RadialCardsSlider(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 \"Radial cards slider\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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- radial-cards-slider.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/RadialCardsSlider.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./radial-cards-slider\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RadialCardsSlider(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 \"Radial cards slider\" element.\n\nThis is the \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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), radial-cards-slider.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 \"Radial cards slider\" element. No packages, no server code.\n\nThis is the \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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 radial-cards-slider.js and then main.js), style.css (the CSS below), radial-cards-slider.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 \"Radial cards slider\" 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 \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.json\n\nWhat it does: A pivot point sits below the stage. Every card is centred on it, rotated by its signed distance from the current position times the angle step, then moved up by the radius, so the cards ride an arc without any trigonometry. The position is one float: dragging, wheel notches, keys and buttons move a target and an exponential ease pulls the position toward it, so the dial can be turned part way and then snaps to the nearest card. Distance from the centre drives scale, opacity and z-index, and distances wrap so the dial loops forever.\nAccessibility: The stage is focusable and labelled; left and right arrows, the two buttons and clicking any card move the dial. The caption is a polite live region that announces the active card, and only the active card carries aria-current. With prefers-reduced-motion the dial jumps straight to the chosen card with no easing.\n\nTunable settings:\n- Accent colour: color, default #e6ff55\n- Cards: range 5 to 12, step 1, default 8\n- Dial radius (px): range 200 to 500, step 10, default 330\n- Angle between cards (deg): range 10 to 40, step 1, default 20\n- Active card scale: range 1 to 1.8, step 0.05, default 1.3\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/radial-cards-slider.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 \"Radial cards slider\" 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 \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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 RadialCardsSlider.\n2. Paste the JavaScript below into a separate code file named radial-cards-slider.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 \"./radial-cards-slider\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function RadialCardsSlider(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(RadialCardsSlider, {\n  accent: { type: ControlType.Color, title: \"Accent colour\", defaultValue: \"#e6ff55\" },\n  count: { type: ControlType.Number, title: \"Cards\", min: 5, max: 12, step: 1, defaultValue: 8 },\n  radius: { type: ControlType.Number, title: \"Dial radius\", min: 200, max: 500, step: 10, defaultValue: 330 },\n  step: { type: ControlType.Number, title: \"Angle between cards\", min: 10, max: 40, step: 1, defaultValue: 20 },\n  scale: { type: ControlType.Number, title: \"Active card scale\", min: 1, max: 1.8, step: 0.05, defaultValue: 1.3 },\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 \"Radial cards slider\" 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 \"Radial cards slider\" element from the Enrichr Library: Cards fan along a circular arc like a dial; wheel, drag, arrow keys or buttons rotate it and the active card sits centred, enlarged and outlined.\nPage: https://enrichr.dev/elements/radial-cards-slider.html\nMachine-readable spec: https://enrichr.dev/elements/radial-cards-slider.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-radial-cards-slider\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-radial-cards-slider\"), { ...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": "The stage is focusable and labelled; left and right arrows, the two buttons and clicking any card move the dial. The caption is a polite live region that announces the active card, and only the active card carries aria-current. With prefers-reduced-motion the dial jumps straight to the chosen card with no easing.",
  "performance": "While moving, each frame writes a transform, opacity and z-index to at most a dozen cards; the loop stops as soon as the dial settles. Cards beyond about three positions away are hidden.",
  "dependencies": [],
  "source": {
    "markup": "<svg width=\"0\" height=\"0\" style=\"position:absolute\" aria-hidden=\"true\" focusable=\"false\"><defs>\n<symbol id=\"ef-rad-p1\" viewBox=\"1513.7 1453.9 322.3 322.3\">\n    <path fill=\"currentColor\" d=\"M1821 1761.2h-292.3v-111.6c0-8 6.5-14.5 14.5-14.5 4.2 0 8.2 1.9 11 5.1 7.8 8.6 19.7 13.6 32.7 11.9 16.8-2.3 30.1-16 32-32.7 2.5-22.6-15.1-41.6-37.1-41.6-11 0-20.9 4.7-27.7 12.3-2.8 3.1-6.7 4.9-10.9 4.9-8 0-14.5-6.4-14.5-14.4v-111.7h292.3v111.7c0 8-6.4 14.4-14.5 14.4-4.2 0-8.1-1.8-10.9-5-7.9-8.6-19.7-13.6-32.7-11.9-16.8 2.2-30.1 15.9-32 32.7-2.5 22.6 15.1 41.6 37.1 41.6 11 0 20.8-4.8 27.7-12.3 2.8-3.1 6.7-5 10.8-5 8.1 0 14.5 6.5 14.5 14.5z\"/>\n  </symbol>\n\n<symbol id=\"ef-rad-p4\" viewBox=\"1423.36 860.8 503.07 322.3\">\n    <path fill=\"currentColor\" d=\"M1821 875.8v111.6c0 8 6.5 14.5 14.5 14.5 4.2 0 8.1-1.9 10.9-5 6.8-7.5 16.7-12.3 27.7-12.3 22 0 39.6 19 37.1 41.6-1.9 16.7-15.2 30.5-32 32.7-13 1.7-24.8-3.3-32.7-11.9-2.8-3.2-6.8-5-11-5-8 0-14.5 6.4-14.5 14.4v111.7h-111.6c-8 0-14.5-6.5-14.5-14.5 0-4.2 1.9-8.2 5-11 8.7-7.9 13.7-19.7 12-32.7-2.3-16.8-16-30.1-32.8-32-22.5-2.5-41.5 15.1-41.5 37.1 0 11 4.7 20.9 12.3 27.7 3.1 2.8 4.9 6.7 4.9 10.8v0.1c0 8-6.4 14.5-14.5 14.5h-111.6v-111.7c0-8-6.4-14.4-14.5-14.4-4.1 0-8 1.8-10.8 4.9-6.9 7.6-16.7 12.3-27.7 12.3-22 0-39.6-19-37.1-41.6 1.9-16.7 15.2-30.4 32-32.7 13-1.7 24.8 3.3 32.7 11.9 2.8 3.2 6.7 5.1 10.9 5.1 8.1 0 14.5-6.5 14.5-14.5v-111.6z\"/>\n  </symbol>\n\n<symbol id=\"ef-rad-p8\" viewBox=\"1513.7 166.86 322.3 503.06\">\n    <path fill=\"currentColor\" d=\"M1528.7 564.5v-111.6c0-8 6.5-14.5 14.5-14.5 4.2 0 8.2 1.9 11 5 7.8 8.7 19.7 13.7 32.7 11.9 16.8-2.2 30.1-15.9 32-32.7 2.5-22.5-15.1-41.5-37.1-41.5-11 0-20.9 4.7-27.7 12.3-2.8 3.1-6.7 4.9-10.9 4.9-8 0-14.5-6.5-14.5-14.5v-111.6h111.6c8.1 0 14.5-6.5 14.5-14.5 0-4.1-1.8-8.1-4.9-10.9-7.6-6.8-12.3-16.6-12.3-27.6 0-22 19-39.6 41.5-37.1 16.8 1.8 30.5 15.2 32.8 32 1.7 12.9-3.3 24.8-12 32.7-3.1 2.8-5 6.7-5 10.9 0 8 6.5 14.5 14.5 14.5h111.6v111.6c0 8-6.4 14.5-14.5 14.5-4.2 0-8.1-1.9-10.9-5-7.9-8.7-19.7-13.6-32.7-11.9-16.8 2.2-30.1 15.9-32 32.7-2.5 22.5 15.1 41.6 37.1 41.6 11 0 20.8-4.8 27.7-12.3 2.8-3.1 6.7-5 10.8-5 8.1 0 14.5 6.5 14.5 14.5v111.6h-111.6c-8 0-14.5 6.5-14.5 14.5 0 4.2 1.9 8.1 5 10.9 7.5 6.8 12.3 16.7 12.3 27.7 0 22-19 39.5-41.6 37.1-16.8-1.9-30.5-15.3-32.7-32-1.7-13 3.3-24.9 11.9-32.7 3.1-2.9 5-6.8 5-11 0-8-6.4-14.5-14.5-14.5z\"/>\n  </symbol></defs></svg>\n<div class=\"ef-rad\">\n  <div class=\"ef-rad__stage\" tabindex=\"0\" role=\"group\" aria-roledescription=\"carousel\" aria-label=\"Cards on a circular dial. Drag, scroll or use the left and right arrow keys to rotate.\">\n    <div class=\"ef-rad__pivot\"></div>\n    <div class=\"ef-rad__cap\">\n      <button type=\"button\" class=\"ef-rad__btn\" data-dir=\"-1\" aria-label=\"Previous card\">&#8592;</button>\n      <p class=\"ef-rad__name\" aria-live=\"polite\"></p>\n      <button type=\"button\" class=\"ef-rad__btn\" data-dir=\"1\" aria-label=\"Next card\">&#8594;</button>\n    </div>\n  </div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-rad { width: 100%; font-family: system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif; }\n.ef-rad__stage { position: relative; box-sizing: border-box; width: 100%; height: 30rem; border-radius: 1rem; overflow: hidden; background: #0c1e18; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; }\n.ef-rad__stage.is-drag { cursor: grabbing; }\n.ef-rad__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--ef-acc, #e6ff55); }\n.ef-rad__pivot { position: absolute; left: 50%; top: 0; width: 0; height: 0; }\n.ef-rad__card { position: absolute; left: 0; top: 0; width: 6.4rem; height: 8.6rem; padding: 0; border: 0; border-radius: 0.8rem; overflow: hidden; background: var(--bg, #005236); color: var(--fg, #e6ff55); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(251, 248, 241, 0.12) inset; cursor: pointer; will-change: transform, opacity; transform-origin: 50% 50%; }\n.ef-rad__card.is-active { box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.8), 0 0 0 2px var(--ef-acc, #e6ff55); }\n.ef-rad__art { position: absolute; left: 12%; top: 10%; width: 76%; height: 66%; pointer-events: none; }\n.ef-rad__no { position: absolute; left: 0.6rem; bottom: 0.5rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; pointer-events: none; }\n.ef-rad__cap { position: absolute; left: 0; right: 0; bottom: 1rem; display: flex; align-items: center; justify-content: center; gap: 1rem; color: #fbf8f1; }\n.ef-rad__name { min-width: 8rem; margin: 0; text-align: center; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }\n.ef-rad__name span { display: block; margin-top: 0.15rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; opacity: 0.7; }\n.ef-rad__btn { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1.5px solid #fbf8f1; background: transparent; color: #fbf8f1; font-size: 1rem; line-height: 1; cursor: pointer; transition: background 200ms, color 200ms; }\n.ef-rad__btn:hover { background: var(--ef-acc, #e6ff55); color: #0c1e18; border-color: var(--ef-acc, #e6ff55); }\n.ef-rad__btn:focus-visible, .ef-rad__card:focus-visible { outline: 2px solid var(--ef-acc, #e6ff55); outline-offset: 2px; }\n@media (prefers-reduced-motion: reduce) { .ef-rad__btn { transition: none; } .ef-rad__stage { cursor: default; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Radial cards slider: cards fan along a circular arc like a dial. Drag, wheel (only while the pointer is over it), arrow keys or the buttons\n// rotate it; the active card sits at the top centre, enlarged and outlined. The dial loops. Reduced motion: it jumps card to card with no easing.\n// mount(root, { count (5-12), radius (px), step (deg between cards), scale (active size), accent }) -> { update, destroy, go }\nfunction mount(root, o) {\n  var reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n  var stage = root.querySelector(\".ef-rad__stage\");\n  var pivot = root.querySelector(\".ef-rad__pivot\");\n  var nameEl = root.querySelector(\".ef-rad__name\");\n  var opts = {}, offs = [], cardOffs = [], cards = [], pos = 0, target = 0, raf = 0, last = 0, drag = null, wheelAcc = 0, wheelAt = 0, ro = null, shown = -1;\n  var PAL = [[\"#005236\", \"#e6ff55\"], [\"#0a6b46\", \"#fbf8f1\"], [\"#2f7d5b\", \"#0c1e18\"], [\"#c6f26b\", \"#005236\"], [\"#fbf8f1\", \"#0a6b46\"], [\"#0c1e18\", \"#c6f26b\"]];\n  var NAMES = [\"Fit\", \"Link\", \"Spark\", \"Stack\", \"Weave\", \"Align\", \"Merge\", \"Shape\", \"Anchor\", \"Mesh\", \"Frame\", \"Click\"];\n  var PIECES = [\"p1\", \"p4\", \"p8\"];\n\n  function wrap(d, n) { d = ((d % n) + n) % n; return d > n / 2 ? d - n : d; }\n  function build() {\n    cardOffs.forEach(function (f) { f(); }); cardOffs = [];\n    pivot.textContent = \"\"; cards = [];\n    for (var i = 0; i < opts.count; i++) (function (i) {\n      var b = document.createElement(\"button\");\n      b.type = \"button\"; b.className = \"ef-rad__card\"; b.tabIndex = -1;\n      b.setAttribute(\"aria-label\", NAMES[i % NAMES.length] + \", card \" + (i + 1) + \" of \" + opts.count);\n      var pal = PAL[i % PAL.length];\n      b.style.setProperty(\"--bg\", pal[0]); b.style.setProperty(\"--fg\", i % 6 === 0 ? opts.accent : pal[1]);\n      b.innerHTML = '<svg class=\"ef-rad__art\" aria-hidden=\"true\" focusable=\"false\"><use href=\"#ef-rad-' + PIECES[i % 3] + '\" width=\"100%\" height=\"100%\"/></svg><span class=\"ef-rad__no\">' + String(i + 1).padStart(2, \"0\") + '</span>';\n      var h = function () { if (!moved) go(i); };\n      b.addEventListener(\"click\", h);\n      cardOffs.push(function () { b.removeEventListener(\"click\", h); });\n      pivot.appendChild(b); cards.push(b);\n    })(i);\n    shown = -1; layout();\n  }\n  var moved = false;\n  function layout() {\n    pivot.style.top = (stage.clientHeight * 0.4 + opts.radius).toFixed(1) + \"px\";\n    render();\n  }\n  function render() {\n    var n = opts.count, cur = ((Math.round(pos) % n) + n) % n;\n    for (var i = 0; i < n; i++) {\n      var d = wrap(i - pos, n), ad = Math.abs(d);\n      var a = d * opts.step;\n      var s = 1 + (opts.scale - 1) * Math.max(0, 1 - ad);\n      var op = ad > 3.4 ? 0 : Math.min(1, 1 - Math.max(0, ad - 2.2) / 1.2);\n      var c = cards[i];\n      c.style.transform = \"translate(-50%,-50%) rotate(\" + a.toFixed(2) + \"deg) translateY(\" + (-opts.radius) + \"px) scale(\" + s.toFixed(3) + \")\";\n      c.style.opacity = op.toFixed(3);\n      c.style.zIndex = String(100 - Math.round(ad * 10));\n      c.style.visibility = op <= 0 ? \"hidden\" : \"visible\";\n      var on = i === cur;\n      if (on !== c.classList.contains(\"is-active\")) c.classList.toggle(\"is-active\", on);\n      if (on) c.setAttribute(\"aria-current\", \"true\"); else c.removeAttribute(\"aria-current\");\n    }\n    if (shown !== cur) {\n      shown = cur;\n      nameEl.innerHTML = \"\";\n      nameEl.appendChild(document.createTextNode(NAMES[cur % NAMES.length]));\n      var sp = document.createElement(\"span\"); sp.textContent = String(cur + 1).padStart(2, \"0\") + \" / \" + String(n).padStart(2, \"0\");\n      nameEl.appendChild(sp);\n    }\n  }\n  function frame(t) {\n    var dt = Math.min(0.05, (t - last) / 1000); last = t;\n    var diff = target - pos;\n    if (Math.abs(diff) < 0.0015) { pos = target; raf = 0; render(); return; }\n    pos += diff * (1 - Math.exp(-dt * 9));\n    render();\n    raf = requestAnimationFrame(frame);\n  }\n  function kick() {\n    if (reduce) { pos = target; render(); return; }\n    if (!raf) { last = performance.now(); raf = requestAnimationFrame(frame); }\n  }\n  function by(d) { target = Math.round(target) + d; kick(); }\n  function go(i) { target = Math.round(target) + wrap(i - Math.round(target), opts.count); kick(); }\n\n  function pd(e) {\n    if (e.target.closest && e.target.closest(\".ef-rad__btn\")) return;\n    if (e.button !== undefined && e.button > 0) return;\n    drag = { x: e.clientX, lx: e.clientX, lt: performance.now(), v: 0 };\n    moved = false;\n  }\n  function pm(e) {\n    if (!drag) return;\n    if (!moved && Math.abs(e.clientX - drag.x) > 4) {\n      moved = true; stage.classList.add(\"is-drag\");\n      try { stage.setPointerCapture(e.pointerId); } catch (x) {}\n    }\n    if (!moved) return;\n    var dx = e.clientX - drag.lx, now = performance.now();\n    var per = opts.radius * opts.step * Math.PI / 180;\n    drag.v = (-dx / per) / Math.max(0.008, (now - drag.lt) / 1000);\n    drag.lx = e.clientX; drag.lt = now;\n    if (!reduce) { pos -= dx / per; target = pos; render(); }\n  }\n  function pu(e) {\n    if (!drag) return;\n    var total = e.clientX - drag.x, was = moved;\n    var v = drag.v;\n    drag = null; stage.classList.remove(\"is-drag\");\n    if (was) {\n      if (reduce) target = Math.round(pos) + (Math.abs(total) > 24 ? (total < 0 ? 1 : -1) : 0);\n      else target = Math.round(pos + Math.max(-2, Math.min(2, v * 0.12)));\n      kick();\n    }\n    setTimeout(function () { moved = false; }, 0);\n  }\n  function wheel(e) {\n    e.preventDefault();\n    var d = Math.abs(e.deltaY) > Math.abs(e.deltaX) ? e.deltaY : e.deltaX;\n    var now = performance.now();\n    if (now - wheelAt > 250) wheelAcc = 0;\n    wheelAt = now; wheelAcc += d;\n    if (Math.abs(wheelAcc) >= 50) { by(wheelAcc > 0 ? 1 : -1); wheelAcc = 0; wheelAt = now + 150; }\n  }\n  function key(e) {\n    var d = e.key === \"ArrowRight\" || e.key === \"ArrowDown\" ? 1 : e.key === \"ArrowLeft\" || e.key === \"ArrowUp\" ? -1 : 0;\n    if (!d) return;\n    e.preventDefault(); by(d);\n  }\n  function btn(e) {\n    var b = e.target.closest ? e.target.closest(\".ef-rad__btn\") : null;\n    if (b) by(parseInt(b.getAttribute(\"data-dir\"), 10));\n  }\n  function on(el, ev, fn, op) { el.addEventListener(ev, fn, op); offs.push(function () { el.removeEventListener(ev, fn, op); }); }\n  on(stage, \"pointerdown\", pd);\n  on(stage, \"pointermove\", pm);\n  on(stage, \"pointerup\", pu);\n  on(stage, \"pointercancel\", pu);\n  on(stage, \"wheel\", wheel, { passive: false });\n  on(stage, \"keydown\", key);\n  on(stage, \"click\", btn);\n  if (window.ResizeObserver) { ro = new ResizeObserver(function () { layout(); }); ro.observe(stage); }\n\n  function update(next) {\n    var prev = opts;\n    opts = Object.assign({ count: 8, radius: 330, step: 20, scale: 1.3, accent: \"#e6ff55\" }, opts, next || {});\n    opts.count = Math.max(5, Math.min(12, Math.round(opts.count)));\n    stage.style.setProperty(\"--ef-acc\", opts.accent);\n    if (prev.count !== opts.count || prev.accent !== opts.accent || !cards.length) build(); else layout();\n  }\n  update(o);\n  return { update: update, go: go, destroy: function () { if (raf) cancelAnimationFrame(raf); raf = 0; offs.forEach(function (f) { f(); }); cardOffs.forEach(function (f) { f(); }); offs = []; cardOffs = []; if (ro) ro.disconnect(); } };\n}"
  }
}