# Who reacted tooltip

> Reactions under a chat message: hover one to see who reacted, click it to add yourself.

- Category: [Tooltips](https://library.aimran.es/components/tooltips)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-tip-reactions-who
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

A chat message with three reaction chips below it. Hover or focus a chip and a tooltip lists the people who reacted next to a large version of the icon, which bounces in. Clicking toggles your own reaction, updates the count and adds you to the list. The icons are inline SVG, so they look the same on every system without emoji fonts.

The main color marks your active reactions and the avatar. Swap the icons, names and counts for your own data, and keep the list to three names plus a count so the tooltip stays on one or two lines.

## Code

### HTML

```html
<div class="uvq08-rx"><div class="msg"><span class="av" aria-hidden="true">SR</span><div class="bb"><b>Sara</b><p>Shall we do the demo on Friday at 11?</p></div></div><div class="rs"><span class="wr pk" style="--e:#f59e0b"><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-0"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10v10H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1zM9 20h7.6a2 2 0 0 0 2-1.6l1.3-6.5A2 2 0 0 0 18 9.5h-4.6l.8-3.7A1.8 1.8 0 0 0 12.4 4L9 10z"/></svg><span class="sr">Like</span><span class="n">12</span></button><span class="tt" role="tooltip" id="uvq08-rx-0"><span class="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M7 10v10H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1zM9 20h7.6a2 2 0 0 0 2-1.6l1.3-6.5A2 2 0 0 0 18 9.5h-4.6l.8-3.7A1.8 1.8 0 0 0 12.4 4L9 10z"/></svg></span><span class="who"><span class="me">You,</span> <span>Ana, Luis, Marta</span> <span>and 9 more</span></span></span></span><span class="wr" style="--e:#e11d48"><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-1"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 20.5s-7.5-4.6-9.2-9.3C1.7 8 3.6 4.5 7.2 4.5c2 0 3.6 1.1 4.8 2.8 1.2-1.7 2.8-2.8 4.8-2.8 3.6 0 5.5 3.5 4.4 6.7-1.7 4.7-9.2 9.3-9.2 9.3z"/></svg><span class="sr">Love it</span><span class="n">5</span></button><span class="tt" role="tooltip" id="uvq08-rx-1"><span class="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 20.5s-7.5-4.6-9.2-9.3C1.7 8 3.6 4.5 7.2 4.5c2 0 3.6 1.1 4.8 2.8 1.2-1.7 2.8-2.8 4.8-2.8 3.6 0 5.5 3.5 4.4 6.7-1.7 4.7-9.2 9.3-9.2 9.3z"/></svg></span><span class="who"><span class="me">You,</span> <span>Iker, Nora</span> <span>and 3 more</span></span></span></span><span class="wr" style="--e:#eab308"><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-2"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9.5"/><path d="M7.5 13.5h9a4.5 4.5 0 0 1-9 0z" fill="#fff"/><path d="M7.5 10l1.5-1.2 1.5 1.2M13.5 10l1.5-1.2 1.5 1.2" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg><span class="sr">Haha</span><span class="n">3</span></button><span class="tt" role="tooltip" id="uvq08-rx-2"><span class="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="9.5"/><path d="M7.5 13.5h9a4.5 4.5 0 0 1-9 0z" fill="#fff"/><path d="M7.5 10l1.5-1.2 1.5 1.2M13.5 10l1.5-1.2 1.5 1.2" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></span><span class="who"><span class="me">You,</span> <span>Paula, Dani, Teo</span></span></span></span></div></div>
```

### CSS

```css
.uvq08-rx {
  --c1: #0d9488;
  --c2: #ccfbf1;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq08-rx {
  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: 17em;
  padding-bottom: 4.2em;
}

.uvq08-rx .msg {
  display: flex;
  align-items: flex-end;
  gap: .6em;
}

.uvq08-rx .av {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  font-size: .85em;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg,var(--c1),color-mix(in srgb,var(--c1) 50%,#facc15));
}

.uvq08-rx .bb {
  padding: .6em .85em;
  border-radius: 1.1em 1.1em 1.1em .3em;
  background: color-mix(in srgb,var(--fg) 7%,var(--bg));
}

.uvq08-rx .bb b {
  display: block;
  font-size: .75em;
  color: var(--c1);
}

.uvq08-rx .bb p {
  margin: .1em 0 0;
  font-size: .92em;
  line-height: 1.4;
}

.uvq08-rx .rs {
  display: flex;
  gap: .4em;
  margin: .55em 0 0 2.5em;
}

.uvq08-rx .wr {
  position: relative;
}

.uvq08-rx button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .35em .7em;
  border-radius: 2em;
  font-size: .85em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-rx button svg {
  width: 1.15em;
  height: 1.15em;
  fill: var(--e);
}

.uvq08-rx button:hover {
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq08-rx button:active {
  transform: scale(.94);
}

.uvq08-rx button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq08-rx button[aria-pressed="true"] {
  color: var(--c1);
  background: color-mix(in srgb,var(--c1) 14%,transparent);
  box-shadow: inset 0 0 0 1.5px var(--c1);
}

.uvq08-rx button.pop svg {
  animation: uvq08-rx-p calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-rx .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.uvq08-rx .tt {
  position: absolute;
  left: 50%;
  top: calc(100% + .7em);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .6em;
  width: max-content;
  max-width: 12.5em;
  padding: .55em .8em .55em .55em;
  border-radius: .9em;
  font-size: .78em;
  line-height: 1.35;
  color: var(--bg);
  background: var(--fg);
  box-shadow: 0 .8em 1.6em -.6em rgba(0,0,0,.45);
  transform: translate(-50%,-.35em);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-rx .tt::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: .7em;
  height: .7em;
  background: var(--fg);
  transform: translate(-50%,55%) rotate(45deg);
  border-radius: .15em 0 0 0;
}

.uvq08-rx .wr:first-child .tt {
  left: -.4em;
  transform: translate(0,-.35em);
}

.uvq08-rx .wr:first-child .tt::after {
  left: 2em;
}

.uvq08-rx .ei {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: color-mix(in srgb,var(--e) 22%,transparent);
}

.uvq08-rx .ei svg {
  width: 1.3em;
  height: 1.3em;
  fill: var(--e);
}

.uvq08-rx .me {
  display: none;
  font-weight: 800;
}

.uvq08-rx button[aria-pressed="true"]+.tt .me {
  display: inline;
}

.uvq08-rx .wr:hover .tt,.uvq08-rx .wr:focus-within .tt,.uvq08-rx .wr.pk .tt {
  transform: translate(-50%,0);
  opacity: 1;
  visibility: visible;
}

.uvq08-rx .wr:first-child:is(:hover,:focus-within,.pk) .tt {
  transform: none;
}

.uvq08-rx .wr:is(:hover,:focus-within,.pk) .ei svg {
  animation: uvq08-rx-p calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

@keyframes uvq08-rx-p {
  0% {
    transform: scale(.4) rotate(-15deg);
  }
  60% {
    transform: scale(1.25) rotate(6deg);
  }
  100% {
    transform: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq08-rx,.uvq08-rx *,.uvq08-rx *::before,.uvq08-rx *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
```

### JavaScript

```js
document.querySelectorAll(".uvq08-rx").forEach(el => {
  const unpk=()=>{el.classList.remove("pk");el.querySelectorAll(".pk").forEach(x=>x.classList.remove("pk"))};el.addEventListener("pointerover",unpk,{once:true});el.addEventListener("focusin",unpk,{once:true});el.querySelectorAll(".rs button").forEach(b=>b.addEventListener("click",()=>{const on=b.getAttribute("aria-pressed")!=="true",n=b.querySelector(".n");b.setAttribute("aria-pressed",String(on));n.textContent=String(+n.textContent+(on?1:-1));b.classList.remove("pop");void b.offsetWidth;b.classList.add("pop")}))
});
```

### 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 = `
.uvq08-rx {
  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: 17em;
  padding-bottom: 4.2em;
}

.uvq08-rx .msg {
  display: flex;
  align-items: flex-end;
  gap: .6em;
}

.uvq08-rx .av {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  font-size: .85em;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg,var(--c1),color-mix(in srgb,var(--c1) 50%,#facc15));
}

.uvq08-rx .bb {
  padding: .6em .85em;
  border-radius: 1.1em 1.1em 1.1em .3em;
  background: color-mix(in srgb,var(--fg) 7%,var(--bg));
}

.uvq08-rx .bb b {
  display: block;
  font-size: .75em;
  color: var(--c1);
}

.uvq08-rx .bb p {
  margin: .1em 0 0;
  font-size: .92em;
  line-height: 1.4;
}

.uvq08-rx .rs {
  display: flex;
  gap: .4em;
  margin: .55em 0 0 2.5em;
}

.uvq08-rx .wr {
  position: relative;
}

.uvq08-rx button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .35em .7em;
  border-radius: 2em;
  font-size: .85em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-rx button svg {
  width: 1.15em;
  height: 1.15em;
  fill: var(--e);
}

.uvq08-rx button:hover {
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq08-rx button:active {
  transform: scale(.94);
}

.uvq08-rx button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq08-rx button[aria-pressed="true"] {
  color: var(--c1);
  background: color-mix(in srgb,var(--c1) 14%,transparent);
  box-shadow: inset 0 0 0 1.5px var(--c1);
}

.uvq08-rx button.pop svg {
  animation: uvq08-rx-p calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-rx .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.uvq08-rx .tt {
  position: absolute;
  left: 50%;
  top: calc(100% + .7em);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .6em;
  width: max-content;
  max-width: 12.5em;
  padding: .55em .8em .55em .55em;
  border-radius: .9em;
  font-size: .78em;
  line-height: 1.35;
  color: var(--bg);
  background: var(--fg);
  box-shadow: 0 .8em 1.6em -.6em rgba(0,0,0,.45);
  transform: translate(-50%,-.35em);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-rx .tt::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: .7em;
  height: .7em;
  background: var(--fg);
  transform: translate(-50%,55%) rotate(45deg);
  border-radius: .15em 0 0 0;
}

.uvq08-rx .wr:first-child .tt {
  left: -.4em;
  transform: translate(0,-.35em);
}

.uvq08-rx .wr:first-child .tt::after {
  left: 2em;
}

.uvq08-rx .ei {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: color-mix(in srgb,var(--e) 22%,transparent);
}

.uvq08-rx .ei svg {
  width: 1.3em;
  height: 1.3em;
  fill: var(--e);
}

.uvq08-rx .me {
  display: none;
  font-weight: 800;
}

.uvq08-rx button[aria-pressed="true"]+.tt .me {
  display: inline;
}

.uvq08-rx .wr:hover .tt,.uvq08-rx .wr:focus-within .tt,.uvq08-rx .wr.pk .tt {
  transform: translate(-50%,0);
  opacity: 1;
  visibility: visible;
}

.uvq08-rx .wr:first-child:is(:hover,:focus-within,.pk) .tt {
  transform: none;
}

.uvq08-rx .wr:is(:hover,:focus-within,.pk) .ei svg {
  animation: uvq08-rx-p calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

@keyframes uvq08-rx-p {
  0% {
    transform: scale(.4) rotate(-15deg);
  }
  60% {
    transform: scale(1.25) rotate(6deg);
  }
  100% {
    transform: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq08-rx,.uvq08-rx *,.uvq08-rx *::before,.uvq08-rx *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// 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 unpk=()=>{el.classList.remove("pk");el.querySelectorAll(".pk").forEach(x=>x.classList.remove("pk"))};el.addEventListener("pointerover",unpk,{once:true});el.addEventListener("focusin",unpk,{once:true});el.querySelectorAll(".rs button").forEach(b=>b.addEventListener("click",()=>{const on=b.getAttribute("aria-pressed")!=="true",n=b.querySelector(".n");b.setAttribute("aria-pressed",String(on));n.textContent=String(+n.textContent+(on?1:-1));b.classList.remove("pop");void b.offsetWidth;b.classList.add("pop")}))
}

export default function TipReactionsWho() {
  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": "#0d9488",
          "--c2": "#ccfbf1",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq08-rx"><div className="msg"><span className="av" aria-hidden="true">SR</span><div className="bb"><b>Sara</b><p>Shall we do the demo on Friday at 11?</p></div></div><div className="rs"><span className="wr pk" style={{ "--e": "#f59e0b" } as CSSProperties}><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-0"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10v10H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1zM9 20h7.6a2 2 0 0 0 2-1.6l1.3-6.5A2 2 0 0 0 18 9.5h-4.6l.8-3.7A1.8 1.8 0 0 0 12.4 4L9 10z" /></svg><span className="sr">Like</span><span className="n">12</span></button><span className="tt" role="tooltip" id="uvq08-rx-0"><span className="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M7 10v10H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1zM9 20h7.6a2 2 0 0 0 2-1.6l1.3-6.5A2 2 0 0 0 18 9.5h-4.6l.8-3.7A1.8 1.8 0 0 0 12.4 4L9 10z" /></svg></span><span className="who"><span className="me">You,</span> <span>Ana, Luis, Marta</span> <span>and 9 more</span></span></span></span><span className="wr" style={{ "--e": "#e11d48" } as CSSProperties}><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-1"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 20.5s-7.5-4.6-9.2-9.3C1.7 8 3.6 4.5 7.2 4.5c2 0 3.6 1.1 4.8 2.8 1.2-1.7 2.8-2.8 4.8-2.8 3.6 0 5.5 3.5 4.4 6.7-1.7 4.7-9.2 9.3-9.2 9.3z" /></svg><span className="sr">Love it</span><span className="n">5</span></button><span className="tt" role="tooltip" id="uvq08-rx-1"><span className="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 20.5s-7.5-4.6-9.2-9.3C1.7 8 3.6 4.5 7.2 4.5c2 0 3.6 1.1 4.8 2.8 1.2-1.7 2.8-2.8 4.8-2.8 3.6 0 5.5 3.5 4.4 6.7-1.7 4.7-9.2 9.3-9.2 9.3z" /></svg></span><span className="who"><span className="me">You,</span> <span>Iker, Nora</span> <span>and 3 more</span></span></span></span><span className="wr" style={{ "--e": "#eab308" } as CSSProperties}><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-2"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9.5" /><path d="M7.5 13.5h9a4.5 4.5 0 0 1-9 0z" fill="#fff" /><path d="M7.5 10l1.5-1.2 1.5 1.2M13.5 10l1.5-1.2 1.5 1.2" fill="none" stroke="#fff" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /></svg><span className="sr">Haha</span><span className="n">3</span></button><span className="tt" role="tooltip" id="uvq08-rx-2"><span className="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="9.5" /><path d="M7.5 13.5h9a4.5 4.5 0 0 1-9 0z" fill="#fff" /><path d="M7.5 10l1.5-1.2 1.5 1.2M13.5 10l1.5-1.2 1.5 1.2" fill="none" stroke="#fff" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /></svg></span><span className="who"><span className="me">You,</span> <span>Paula, Dani, Teo</span></span></span></span></div></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 “Who reacted tooltip” block (Tooltips) from AIMRAN Library to my project.

## What it is
Reactions under a chat message: hover one to see who reacted, click it to add yourself.

## Chosen settings
- Main color: #0d9488
- Secondary color: #ccfbf1
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "¿Hacemos la demo el viernes a las 11?"

## 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 = `
.uvq08-rx {
  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: 17em;
  padding-bottom: 4.2em;
}

.uvq08-rx .msg {
  display: flex;
  align-items: flex-end;
  gap: .6em;
}

.uvq08-rx .av {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  font-size: .85em;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg,var(--c1),color-mix(in srgb,var(--c1) 50%,#facc15));
}

.uvq08-rx .bb {
  padding: .6em .85em;
  border-radius: 1.1em 1.1em 1.1em .3em;
  background: color-mix(in srgb,var(--fg) 7%,var(--bg));
}

.uvq08-rx .bb b {
  display: block;
  font-size: .75em;
  color: var(--c1);
}

.uvq08-rx .bb p {
  margin: .1em 0 0;
  font-size: .92em;
  line-height: 1.4;
}

.uvq08-rx .rs {
  display: flex;
  gap: .4em;
  margin: .55em 0 0 2.5em;
}

.uvq08-rx .wr {
  position: relative;
}

.uvq08-rx button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .35em .7em;
  border-radius: 2em;
  font-size: .85em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-rx button svg {
  width: 1.15em;
  height: 1.15em;
  fill: var(--e);
}

.uvq08-rx button:hover {
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq08-rx button:active {
  transform: scale(.94);
}

.uvq08-rx button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq08-rx button[aria-pressed="true"] {
  color: var(--c1);
  background: color-mix(in srgb,var(--c1) 14%,transparent);
  box-shadow: inset 0 0 0 1.5px var(--c1);
}

.uvq08-rx button.pop svg {
  animation: uvq08-rx-p calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq08-rx .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.uvq08-rx .tt {
  position: absolute;
  left: 50%;
  top: calc(100% + .7em);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .6em;
  width: max-content;
  max-width: 12.5em;
  padding: .55em .8em .55em .55em;
  border-radius: .9em;
  font-size: .78em;
  line-height: 1.35;
  color: var(--bg);
  background: var(--fg);
  box-shadow: 0 .8em 1.6em -.6em rgba(0,0,0,.45);
  transform: translate(-50%,-.35em);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq08-rx .tt::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: .7em;
  height: .7em;
  background: var(--fg);
  transform: translate(-50%,55%) rotate(45deg);
  border-radius: .15em 0 0 0;
}

.uvq08-rx .wr:first-child .tt {
  left: -.4em;
  transform: translate(0,-.35em);
}

.uvq08-rx .wr:first-child .tt::after {
  left: 2em;
}

.uvq08-rx .ei {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: color-mix(in srgb,var(--e) 22%,transparent);
}

.uvq08-rx .ei svg {
  width: 1.3em;
  height: 1.3em;
  fill: var(--e);
}

.uvq08-rx .me {
  display: none;
  font-weight: 800;
}

.uvq08-rx button[aria-pressed="true"]+.tt .me {
  display: inline;
}

.uvq08-rx .wr:hover .tt,.uvq08-rx .wr:focus-within .tt,.uvq08-rx .wr.pk .tt {
  transform: translate(-50%,0);
  opacity: 1;
  visibility: visible;
}

.uvq08-rx .wr:first-child:is(:hover,:focus-within,.pk) .tt {
  transform: none;
}

.uvq08-rx .wr:is(:hover,:focus-within,.pk) .ei svg {
  animation: uvq08-rx-p calc(0.5s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

@keyframes uvq08-rx-p {
  0% {
    transform: scale(.4) rotate(-15deg);
  }
  60% {
    transform: scale(1.25) rotate(6deg);
  }
  100% {
    transform: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq08-rx,.uvq08-rx *,.uvq08-rx *::before,.uvq08-rx *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// 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 unpk=()=>{el.classList.remove("pk");el.querySelectorAll(".pk").forEach(x=>x.classList.remove("pk"))};el.addEventListener("pointerover",unpk,{once:true});el.addEventListener("focusin",unpk,{once:true});el.querySelectorAll(".rs button").forEach(b=>b.addEventListener("click",()=>{const on=b.getAttribute("aria-pressed")!=="true",n=b.querySelector(".n");b.setAttribute("aria-pressed",String(on));n.textContent=String(+n.textContent+(on?1:-1));b.classList.remove("pop");void b.offsetWidth;b.classList.add("pop")}))
}

export default function TipReactionsWho() {
  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": "#0d9488",
          "--c2": "#ccfbf1",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq08-rx"><div className="msg"><span className="av" aria-hidden="true">SR</span><div className="bb"><b>Sara</b><p>Shall we do the demo on Friday at 11?</p></div></div><div className="rs"><span className="wr pk" style={{ "--e": "#f59e0b" } as CSSProperties}><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-0"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10v10H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1zM9 20h7.6a2 2 0 0 0 2-1.6l1.3-6.5A2 2 0 0 0 18 9.5h-4.6l.8-3.7A1.8 1.8 0 0 0 12.4 4L9 10z" /></svg><span className="sr">Like</span><span className="n">12</span></button><span className="tt" role="tooltip" id="uvq08-rx-0"><span className="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M7 10v10H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1zM9 20h7.6a2 2 0 0 0 2-1.6l1.3-6.5A2 2 0 0 0 18 9.5h-4.6l.8-3.7A1.8 1.8 0 0 0 12.4 4L9 10z" /></svg></span><span className="who"><span className="me">You,</span> <span>Ana, Luis, Marta</span> <span>and 9 more</span></span></span></span><span className="wr" style={{ "--e": "#e11d48" } as CSSProperties}><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-1"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 20.5s-7.5-4.6-9.2-9.3C1.7 8 3.6 4.5 7.2 4.5c2 0 3.6 1.1 4.8 2.8 1.2-1.7 2.8-2.8 4.8-2.8 3.6 0 5.5 3.5 4.4 6.7-1.7 4.7-9.2 9.3-9.2 9.3z" /></svg><span className="sr">Love it</span><span className="n">5</span></button><span className="tt" role="tooltip" id="uvq08-rx-1"><span className="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 20.5s-7.5-4.6-9.2-9.3C1.7 8 3.6 4.5 7.2 4.5c2 0 3.6 1.1 4.8 2.8 1.2-1.7 2.8-2.8 4.8-2.8 3.6 0 5.5 3.5 4.4 6.7-1.7 4.7-9.2 9.3-9.2 9.3z" /></svg></span><span className="who"><span className="me">You,</span> <span>Iker, Nora</span> <span>and 3 more</span></span></span></span><span className="wr" style={{ "--e": "#eab308" } as CSSProperties}><button type="button" aria-pressed="false" aria-describedby="uvq08-rx-2"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9.5" /><path d="M7.5 13.5h9a4.5 4.5 0 0 1-9 0z" fill="#fff" /><path d="M7.5 10l1.5-1.2 1.5 1.2M13.5 10l1.5-1.2 1.5 1.2" fill="none" stroke="#fff" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /></svg><span className="sr">Haha</span><span className="n">3</span></button><span className="tt" role="tooltip" id="uvq08-rx-2"><span className="ei" aria-hidden="true"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="9.5" /><path d="M7.5 13.5h9a4.5 4.5 0 0 1-9 0z" fill="#fff" /><path d="M7.5 10l1.5-1.2 1.5 1.2M13.5 10l1.5-1.2 1.5 1.2" fill="none" stroke="#fff" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" /></svg></span><span className="who"><span className="me">You,</span> <span>Paula, Dani, Teo</span></span></span></span></div></div>
      </div>
    </>
  );
}
```

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