# Coffee flavour wheel

> A two-ring tasting wheel: tap a family to select both of its notes, or pick the notes one by one.

- Category: [Filters](https://library.aimran.es/components/filters)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-f-flavor-wheel
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Coffee roasters, wine shops and tea brands describe taste with flavour wheels, and this one doubles as a filter. The SVG sunburst has four families in the inner ring and eight notes outside; each segment is a focusable checkbox, families show a mixed state when only one note is on, and the centre counts the chosen notes.

Segment colours live in the code, while the main colour sets the hub and the second its fill. Swap the families and notes for hops, perfumes or cheeses, and keep note names short so they fit along the ring.

## Code

### HTML

```html
<div class="uvq05-fw"><p class="hd">Tasting notes</p><svg viewBox="-74 -74 148 148" role="group" aria-label="Tasting notes"><g class="s" style="--cl:#e4572e"><path class="fm" d="M0.00 -42.00A42 42 0 0 1 42.00 0.00L20.00 0.00A20 20 0 0 0 0.00 -20.00Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Fruity"/><text transform="translate(21.92 -21.92) rotate(45)" font-size="6.4">Fruity</text></g><g class="s" style="--cl:#e4572e"><path class="nt" d="M0.00 -71.00A71 71 0 0 1 50.20 -50.20L31.11 -31.11A44 44 0 0 0 0.00 -44.00Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Red berries"/><text transform="translate(22.00 -53.12) rotate(22.5)" font-size="5.4">Red berries</text></g><g class="s" style="--cl:#e4572e"><path class="nt" d="M50.20 -50.20A71 71 0 0 1 71.00 0.00L44.00 0.00A44 44 0 0 0 31.11 -31.11Z" tabindex="0" role="checkbox" aria-checked="true" aria-label="Citrus"/><text transform="translate(53.12 -22.00) rotate(67.5)" font-size="5.4">Citrus</text></g><g class="s" style="--cl:#b5179e"><path class="fm" d="M42.00 0.00A42 42 0 0 1 0.00 42.00L0.00 20.00A20 20 0 0 0 20.00 0.00Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Floral"/><text transform="translate(21.92 21.92) rotate(315)" font-size="6.4">Floral</text></g><g class="s" style="--cl:#b5179e"><path class="nt" d="M71.00 0.00A71 71 0 0 1 50.20 50.20L31.11 31.11A44 44 0 0 0 44.00 0.00Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Jasmine"/><text transform="translate(53.12 22.00) rotate(292.5)" font-size="5.4">Jasmine</text></g><g class="s" style="--cl:#b5179e"><path class="nt" d="M50.20 50.20A71 71 0 0 1 0.00 71.00L0.00 44.00A44 44 0 0 0 31.11 31.11Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Black tea"/><text transform="translate(22.00 53.12) rotate(337.5)" font-size="5.4">Black tea</text></g><g class="s" style="--cl:#e09f3e"><path class="fm" d="M0.00 42.00A42 42 0 0 1 -42.00 0.00L-20.00 0.00A20 20 0 0 0 0.00 20.00Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Sweet"/><text transform="translate(-21.92 21.92) rotate(405)" font-size="6.4">Sweet</text></g><g class="s" style="--cl:#e09f3e"><path class="nt" d="M0.00 71.00A71 71 0 0 1 -50.20 50.20L-31.11 31.11A44 44 0 0 0 0.00 44.00Z" tabindex="0" role="checkbox" aria-checked="true" aria-label="Caramel"/><text transform="translate(-22.00 53.12) rotate(382.5)" font-size="5.4">Caramel</text></g><g class="s" style="--cl:#e09f3e"><path class="nt" d="M-50.20 50.20A71 71 0 0 1 -71.00 0.00L-44.00 0.00A44 44 0 0 0 -31.11 31.11Z" tabindex="0" role="checkbox" aria-checked="true" aria-label="Chocolate"/><text transform="translate(-53.12 22.00) rotate(427.5)" font-size="5.4">Chocolate</text></g><g class="s" style="--cl:#7f5539"><path class="fm" d="M-42.00 0.00A42 42 0 0 1 -0.00 -42.00L-0.00 -20.00A20 20 0 0 0 -20.00 0.00Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Roasted"/><text transform="translate(-21.92 -21.92) rotate(315)" font-size="6.4">Roasted</text></g><g class="s" style="--cl:#7f5539"><path class="nt" d="M-71.00 0.00A71 71 0 0 1 -50.20 -50.20L-31.11 -31.11A44 44 0 0 0 -44.00 0.00Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Nuts"/><text transform="translate(-53.12 -22.00) rotate(292.5)" font-size="5.4">Nuts</text></g><g class="s" style="--cl:#7f5539"><path class="nt" d="M-50.20 -50.20A71 71 0 0 1 -0.00 -71.00L-0.00 -44.00A44 44 0 0 0 -31.11 -31.11Z" tabindex="0" role="checkbox" aria-checked="false" aria-label="Cereal"/><text transform="translate(-22.00 -53.12) rotate(337.5)" font-size="5.4">Cereal</text></g><circle class="hb" r="17"/><text class="cl" y="-3.5">Notes</text><text class="cn" y="9">3</text></svg><p class="ls" aria-live="polite">Citrus, Caramel, Chocolate</p></div>
```

### CSS

```css
.uvq05-fw {
  --c1: #6f4e37;
  --c2: #fff6ea;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq05-fw {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 15em;
  text-align: center;
}

.uvq05-fw .hd {
  margin: 0 0 .6em;
  font-weight: 700;
  text-align: left;
}

.uvq05-fw svg {
  display: block;
  width: 13.5em;
  height: 13.5em;
  margin: 0 auto;
  overflow: visible;
}

.uvq05-fw path {
  fill: color-mix(in srgb,var(--cl) 22%,var(--bg));
  stroke: var(--bg);
  stroke-width: 1.6;
  cursor: pointer;
  outline: 0;
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  transform-origin: 0 0;
}

.uvq05-fw path[aria-checked="mixed"] {
  fill: color-mix(in srgb,var(--cl) 55%,var(--bg));
}

.uvq05-fw path[aria-checked="true"] {
  fill: var(--cl);
}

.uvq05-fw path:hover {
  fill: color-mix(in srgb,var(--cl) 40%,var(--bg));
}

.uvq05-fw path[aria-checked="true"]:hover {
  fill: color-mix(in srgb,var(--cl) 85%,#fff);
}

.uvq05-fw path:active {
  transform: scale(.97);
}

.uvq05-fw path:focus-visible {
  stroke: var(--fg);
  stroke-width: 2.6;
}

.uvq05-fw text {
  font-family: inherit;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--fg);
  pointer-events: none;
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-fw .s:has(path[aria-checked="true"]) text {
  fill: #fff;
}

.uvq05-fw .hb {
  fill: var(--c2);
  stroke: var(--c1);
  stroke-width: 1.5;
}

.uvq05-fw .cl {
  font-size: 5px;
  letter-spacing: .06em;
  fill: #7a6450;
}

.uvq05-fw .cn {
  font-size: 13px;
  font-weight: 800;
  fill: var(--c1);
}

.uvq05-fw .ls {
  min-height: 2.6em;
  margin: .7em 0 0;
  font-size: .78em;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
}
```

### JavaScript

```js
document.querySelectorAll(".uvq05-fw").forEach(el => {
  const fs=[...el.querySelectorAll(".fm")],ns=[...el.querySelectorAll(".nt")],c=el.querySelector(".cn"),ls=el.querySelector(".ls");const on=n=>n.getAttribute("aria-checked")==="true";
const sync=()=>{fs.forEach((f,i)=>{const a=on(ns[i*2]),b=on(ns[i*2+1]);f.setAttribute("aria-checked",a&&b?"true":a||b?"mixed":"false")});const l=ns.filter(on);c.textContent=l.length;ls.textContent=l.length?l.map(n=>n.getAttribute("aria-label")).join(", "):"No notes"};
const tog=n=>{if(n.classList.contains("fm")){const i=fs.indexOf(n),v=on(n)?"false":"true";ns[i*2].setAttribute("aria-checked",v);ns[i*2+1].setAttribute("aria-checked",v)}else n.setAttribute("aria-checked",on(n)?"false":"true");sync()};
[...fs,...ns].forEach(n=>{n.addEventListener("click",()=>tog(n));n.addEventListener("keydown",e=>{if(e.key===" "||e.key==="Enter"){e.preventDefault();tog(n)}})});sync()
});
```

### React

```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq05-fw {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 15em;
  text-align: center;
}

.uvq05-fw .hd {
  margin: 0 0 .6em;
  font-weight: 700;
  text-align: left;
}

.uvq05-fw svg {
  display: block;
  width: 13.5em;
  height: 13.5em;
  margin: 0 auto;
  overflow: visible;
}

.uvq05-fw path {
  fill: color-mix(in srgb,var(--cl) 22%,var(--bg));
  stroke: var(--bg);
  stroke-width: 1.6;
  cursor: pointer;
  outline: 0;
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  transform-origin: 0 0;
}

.uvq05-fw path[aria-checked="mixed"] {
  fill: color-mix(in srgb,var(--cl) 55%,var(--bg));
}

.uvq05-fw path[aria-checked="true"] {
  fill: var(--cl);
}

.uvq05-fw path:hover {
  fill: color-mix(in srgb,var(--cl) 40%,var(--bg));
}

.uvq05-fw path[aria-checked="true"]:hover {
  fill: color-mix(in srgb,var(--cl) 85%,#fff);
}

.uvq05-fw path:active {
  transform: scale(.97);
}

.uvq05-fw path:focus-visible {
  stroke: var(--fg);
  stroke-width: 2.6;
}

.uvq05-fw text {
  font-family: inherit;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--fg);
  pointer-events: none;
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-fw .s:has(path[aria-checked="true"]) text {
  fill: #fff;
}

.uvq05-fw .hb {
  fill: var(--c2);
  stroke: var(--c1);
  stroke-width: 1.5;
}

.uvq05-fw .cl {
  font-size: 5px;
  letter-spacing: .06em;
  fill: #7a6450;
}

.uvq05-fw .cn {
  font-size: 13px;
  font-weight: 800;
  fill: var(--c1);
}

.uvq05-fw .ls {
  min-height: 2.6em;
  margin: .7em 0 0;
  font-size: .78em;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const fs=[...el.querySelectorAll(".fm")],ns=[...el.querySelectorAll(".nt")],c=el.querySelector(".cn"),ls=el.querySelector(".ls");const on=n=>n.getAttribute("aria-checked")==="true";
const sync=()=>{fs.forEach((f,i)=>{const a=on(ns[i*2]),b=on(ns[i*2+1]);f.setAttribute("aria-checked",a&&b?"true":a||b?"mixed":"false")});const l=ns.filter(on);c.textContent=l.length;ls.textContent=l.length?l.map(n=>n.getAttribute("aria-label")).join(", "):"No notes"};
const tog=n=>{if(n.classList.contains("fm")){const i=fs.indexOf(n),v=on(n)?"false":"true";ns[i*2].setAttribute("aria-checked",v);ns[i*2+1].setAttribute("aria-checked",v)}else n.setAttribute("aria-checked",on(n)?"false":"true");sync()};
[...fs,...ns].forEach(n=>{n.addEventListener("click",()=>tog(n));n.addEventListener("keydown",e=>{if(e.key===" "||e.key==="Enter"){e.preventDefault();tog(n)}})});sync()
}

export default function FFlavorWheel() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#6f4e37",
          "--c2": "#fff6ea",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq05-fw"><p className="hd">Tasting notes</p><svg viewBox="-74 -74 148 148" role="group" aria-label="Tasting notes"><g className="s" style={{ "--cl": "#e4572e" } as CSSProperties}><path className="fm" d="M0.00 -42.00A42 42 0 0 1 42.00 0.00L20.00 0.00A20 20 0 0 0 0.00 -20.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Fruity" /><text transform="translate(21.92 -21.92) rotate(45)" fontSize="6.4">Fruity</text></g><g className="s" style={{ "--cl": "#e4572e" } as CSSProperties}><path className="nt" d="M0.00 -71.00A71 71 0 0 1 50.20 -50.20L31.11 -31.11A44 44 0 0 0 0.00 -44.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Red berries" /><text transform="translate(22.00 -53.12) rotate(22.5)" fontSize="5.4">Red berries</text></g><g className="s" style={{ "--cl": "#e4572e" } as CSSProperties}><path className="nt" d="M50.20 -50.20A71 71 0 0 1 71.00 0.00L44.00 0.00A44 44 0 0 0 31.11 -31.11Z" tabIndex={0} role="checkbox" aria-checked="true" aria-label="Citrus" /><text transform="translate(53.12 -22.00) rotate(67.5)" fontSize="5.4">Citrus</text></g><g className="s" style={{ "--cl": "#b5179e" } as CSSProperties}><path className="fm" d="M42.00 0.00A42 42 0 0 1 0.00 42.00L0.00 20.00A20 20 0 0 0 20.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Floral" /><text transform="translate(21.92 21.92) rotate(315)" fontSize="6.4">Floral</text></g><g className="s" style={{ "--cl": "#b5179e" } as CSSProperties}><path className="nt" d="M71.00 0.00A71 71 0 0 1 50.20 50.20L31.11 31.11A44 44 0 0 0 44.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Jasmine" /><text transform="translate(53.12 22.00) rotate(292.5)" fontSize="5.4">Jasmine</text></g><g className="s" style={{ "--cl": "#b5179e" } as CSSProperties}><path className="nt" d="M50.20 50.20A71 71 0 0 1 0.00 71.00L0.00 44.00A44 44 0 0 0 31.11 31.11Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Black tea" /><text transform="translate(22.00 53.12) rotate(337.5)" fontSize="5.4">Black tea</text></g><g className="s" style={{ "--cl": "#e09f3e" } as CSSProperties}><path className="fm" d="M0.00 42.00A42 42 0 0 1 -42.00 0.00L-20.00 0.00A20 20 0 0 0 0.00 20.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Sweet" /><text transform="translate(-21.92 21.92) rotate(405)" fontSize="6.4">Sweet</text></g><g className="s" style={{ "--cl": "#e09f3e" } as CSSProperties}><path className="nt" d="M0.00 71.00A71 71 0 0 1 -50.20 50.20L-31.11 31.11A44 44 0 0 0 0.00 44.00Z" tabIndex={0} role="checkbox" aria-checked="true" aria-label="Caramel" /><text transform="translate(-22.00 53.12) rotate(382.5)" fontSize="5.4">Caramel</text></g><g className="s" style={{ "--cl": "#e09f3e" } as CSSProperties}><path className="nt" d="M-50.20 50.20A71 71 0 0 1 -71.00 0.00L-44.00 0.00A44 44 0 0 0 -31.11 31.11Z" tabIndex={0} role="checkbox" aria-checked="true" aria-label="Chocolate" /><text transform="translate(-53.12 22.00) rotate(427.5)" fontSize="5.4">Chocolate</text></g><g className="s" style={{ "--cl": "#7f5539" } as CSSProperties}><path className="fm" d="M-42.00 0.00A42 42 0 0 1 -0.00 -42.00L-0.00 -20.00A20 20 0 0 0 -20.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Roasted" /><text transform="translate(-21.92 -21.92) rotate(315)" fontSize="6.4">Roasted</text></g><g className="s" style={{ "--cl": "#7f5539" } as CSSProperties}><path className="nt" d="M-71.00 0.00A71 71 0 0 1 -50.20 -50.20L-31.11 -31.11A44 44 0 0 0 -44.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Nuts" /><text transform="translate(-53.12 -22.00) rotate(292.5)" fontSize="5.4">Nuts</text></g><g className="s" style={{ "--cl": "#7f5539" } as CSSProperties}><path className="nt" d="M-50.20 -50.20A71 71 0 0 1 -0.00 -71.00L-0.00 -44.00A44 44 0 0 0 -31.11 -31.11Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Cereal" /><text transform="translate(-22.00 -53.12) rotate(337.5)" fontSize="5.4">Cereal</text></g><circle className="hb" r="17" /><text className="cl" y="-3.5">Notes</text><text className="cn" y="9">3</text></svg><p className="ls" aria-live="polite">Citrus, Caramel, Chocolate</p></div>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Coffee flavour wheel” block (Filters) from AIMRAN Library to my project.

## What it is
A two-ring tasting wheel: tap a family to select both of its notes, or pick the notes one by one.

## Chosen settings
- Main color: #6f4e37
- Secondary color: #fff6ea
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Notas de cata"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq05-fw {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 15em;
  text-align: center;
}

.uvq05-fw .hd {
  margin: 0 0 .6em;
  font-weight: 700;
  text-align: left;
}

.uvq05-fw svg {
  display: block;
  width: 13.5em;
  height: 13.5em;
  margin: 0 auto;
  overflow: visible;
}

.uvq05-fw path {
  fill: color-mix(in srgb,var(--cl) 22%,var(--bg));
  stroke: var(--bg);
  stroke-width: 1.6;
  cursor: pointer;
  outline: 0;
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  transform-origin: 0 0;
}

.uvq05-fw path[aria-checked="mixed"] {
  fill: color-mix(in srgb,var(--cl) 55%,var(--bg));
}

.uvq05-fw path[aria-checked="true"] {
  fill: var(--cl);
}

.uvq05-fw path:hover {
  fill: color-mix(in srgb,var(--cl) 40%,var(--bg));
}

.uvq05-fw path[aria-checked="true"]:hover {
  fill: color-mix(in srgb,var(--cl) 85%,#fff);
}

.uvq05-fw path:active {
  transform: scale(.97);
}

.uvq05-fw path:focus-visible {
  stroke: var(--fg);
  stroke-width: 2.6;
}

.uvq05-fw text {
  font-family: inherit;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--fg);
  pointer-events: none;
  transition: fill calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-fw .s:has(path[aria-checked="true"]) text {
  fill: #fff;
}

.uvq05-fw .hb {
  fill: var(--c2);
  stroke: var(--c1);
  stroke-width: 1.5;
}

.uvq05-fw .cl {
  font-size: 5px;
  letter-spacing: .06em;
  fill: #7a6450;
}

.uvq05-fw .cn {
  font-size: 13px;
  font-weight: 800;
  fill: var(--c1);
}

.uvq05-fw .ls {
  min-height: 2.6em;
  margin: .7em 0 0;
  font-size: .78em;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const fs=[...el.querySelectorAll(".fm")],ns=[...el.querySelectorAll(".nt")],c=el.querySelector(".cn"),ls=el.querySelector(".ls");const on=n=>n.getAttribute("aria-checked")==="true";
const sync=()=>{fs.forEach((f,i)=>{const a=on(ns[i*2]),b=on(ns[i*2+1]);f.setAttribute("aria-checked",a&&b?"true":a||b?"mixed":"false")});const l=ns.filter(on);c.textContent=l.length;ls.textContent=l.length?l.map(n=>n.getAttribute("aria-label")).join(", "):"No notes"};
const tog=n=>{if(n.classList.contains("fm")){const i=fs.indexOf(n),v=on(n)?"false":"true";ns[i*2].setAttribute("aria-checked",v);ns[i*2+1].setAttribute("aria-checked",v)}else n.setAttribute("aria-checked",on(n)?"false":"true");sync()};
[...fs,...ns].forEach(n=>{n.addEventListener("click",()=>tog(n));n.addEventListener("keydown",e=>{if(e.key===" "||e.key==="Enter"){e.preventDefault();tog(n)}})});sync()
}

export default function FFlavorWheel() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#6f4e37",
          "--c2": "#fff6ea",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq05-fw"><p className="hd">Tasting notes</p><svg viewBox="-74 -74 148 148" role="group" aria-label="Tasting notes"><g className="s" style={{ "--cl": "#e4572e" } as CSSProperties}><path className="fm" d="M0.00 -42.00A42 42 0 0 1 42.00 0.00L20.00 0.00A20 20 0 0 0 0.00 -20.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Fruity" /><text transform="translate(21.92 -21.92) rotate(45)" fontSize="6.4">Fruity</text></g><g className="s" style={{ "--cl": "#e4572e" } as CSSProperties}><path className="nt" d="M0.00 -71.00A71 71 0 0 1 50.20 -50.20L31.11 -31.11A44 44 0 0 0 0.00 -44.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Red berries" /><text transform="translate(22.00 -53.12) rotate(22.5)" fontSize="5.4">Red berries</text></g><g className="s" style={{ "--cl": "#e4572e" } as CSSProperties}><path className="nt" d="M50.20 -50.20A71 71 0 0 1 71.00 0.00L44.00 0.00A44 44 0 0 0 31.11 -31.11Z" tabIndex={0} role="checkbox" aria-checked="true" aria-label="Citrus" /><text transform="translate(53.12 -22.00) rotate(67.5)" fontSize="5.4">Citrus</text></g><g className="s" style={{ "--cl": "#b5179e" } as CSSProperties}><path className="fm" d="M42.00 0.00A42 42 0 0 1 0.00 42.00L0.00 20.00A20 20 0 0 0 20.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Floral" /><text transform="translate(21.92 21.92) rotate(315)" fontSize="6.4">Floral</text></g><g className="s" style={{ "--cl": "#b5179e" } as CSSProperties}><path className="nt" d="M71.00 0.00A71 71 0 0 1 50.20 50.20L31.11 31.11A44 44 0 0 0 44.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Jasmine" /><text transform="translate(53.12 22.00) rotate(292.5)" fontSize="5.4">Jasmine</text></g><g className="s" style={{ "--cl": "#b5179e" } as CSSProperties}><path className="nt" d="M50.20 50.20A71 71 0 0 1 0.00 71.00L0.00 44.00A44 44 0 0 0 31.11 31.11Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Black tea" /><text transform="translate(22.00 53.12) rotate(337.5)" fontSize="5.4">Black tea</text></g><g className="s" style={{ "--cl": "#e09f3e" } as CSSProperties}><path className="fm" d="M0.00 42.00A42 42 0 0 1 -42.00 0.00L-20.00 0.00A20 20 0 0 0 0.00 20.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Sweet" /><text transform="translate(-21.92 21.92) rotate(405)" fontSize="6.4">Sweet</text></g><g className="s" style={{ "--cl": "#e09f3e" } as CSSProperties}><path className="nt" d="M0.00 71.00A71 71 0 0 1 -50.20 50.20L-31.11 31.11A44 44 0 0 0 0.00 44.00Z" tabIndex={0} role="checkbox" aria-checked="true" aria-label="Caramel" /><text transform="translate(-22.00 53.12) rotate(382.5)" fontSize="5.4">Caramel</text></g><g className="s" style={{ "--cl": "#e09f3e" } as CSSProperties}><path className="nt" d="M-50.20 50.20A71 71 0 0 1 -71.00 0.00L-44.00 0.00A44 44 0 0 0 -31.11 31.11Z" tabIndex={0} role="checkbox" aria-checked="true" aria-label="Chocolate" /><text transform="translate(-53.12 22.00) rotate(427.5)" fontSize="5.4">Chocolate</text></g><g className="s" style={{ "--cl": "#7f5539" } as CSSProperties}><path className="fm" d="M-42.00 0.00A42 42 0 0 1 -0.00 -42.00L-0.00 -20.00A20 20 0 0 0 -20.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Roasted" /><text transform="translate(-21.92 -21.92) rotate(315)" fontSize="6.4">Roasted</text></g><g className="s" style={{ "--cl": "#7f5539" } as CSSProperties}><path className="nt" d="M-71.00 0.00A71 71 0 0 1 -50.20 -50.20L-31.11 -31.11A44 44 0 0 0 -44.00 0.00Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Nuts" /><text transform="translate(-53.12 -22.00) rotate(292.5)" fontSize="5.4">Nuts</text></g><g className="s" style={{ "--cl": "#7f5539" } as CSSProperties}><path className="nt" d="M-50.20 -50.20A71 71 0 0 1 -0.00 -71.00L-0.00 -44.00A44 44 0 0 0 -31.11 -31.11Z" tabIndex={0} role="checkbox" aria-checked="false" aria-label="Cereal" /><text transform="translate(-22.00 -53.12) rotate(337.5)" fontSize="5.4">Cereal</text></g><circle className="hb" r="17" /><text className="cl" y="-3.5">Notes</text><text className="cn" y="9">3</text></svg><p className="ls" aria-live="polite">Citrus, Caramel, Chocolate</p></div>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
