# Bottom sheet filters

> A panel that slides up from the bottom with a grab handle, collapsible sections and an Apply button with a count.

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

## Where to use it

On a phone, a bottom sheet is the friendliest place for a full set of filters. Think of a second-hand marketplace where people narrow things down by category, price and condition. The sections fold away so the sheet never gets too tall, and the Apply button shows how many options are picked. Also found as a mobile filter drawer.

Let people close the sheet by tapping the dimmed background, as the demo does. Keep the Apply button always visible at the bottom. If you only have two or three filters, simple chips above the list do the job with fewer taps.

## Code

### HTML

```html
<div class="uv-fmh"><div class="ph"><button class="op"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 7h10M18 7h2M4 17h4M12 17h8"/><circle cx="16" cy="7" r="2"/><circle cx="10" cy="17" r="2"/></svg> Filters</button><div class="ov"></div><div class="sh"><span class="gr"></span><div class="ac open"><button class="hd">Category<i><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg></i></button><div class="bd"><button class="op2">Design</button><button class="op2">Code</button><button class="op2">Photos</button></div></div><div class="ac"><button class="hd">Price<i><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg></i></button><div class="bd"><button class="op2">Low</button><button class="op2">Medium</button><button class="op2">High</button></div></div><button class="ap">Apply <b class="n">0</b></button></div></div></div>
```

### CSS

```css
.uv-fmh {
  --c1: #0071e3;
  --c2: #8ec5ff;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uv-fmh {
  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;
}

.uv-fmh .ph {
  position: relative;
  width: 16em;
  height: 26em;
  padding: .9em;
  border-radius: 2.2em;
  background: var(--bg);
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--fg) 14%,transparent),0 24px 50px rgba(0,0,0,.18);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.uv-fmh .op {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: inline-flex;
  align-items: center;
  gap: .5em;
  color: #fff;
  background: var(--c1);
  box-shadow: 0 10px 24px color-mix(in srgb,var(--c1) 34%,transparent);
}

.uv-fmh .op svg {
  width: 1.1em;
  height: 1.1em;
}

.uv-fmh .op:active {
  transform: scale(.95);
}

.uv-fmh .ov {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-fmh.open .ov {
  opacity: 1;
  pointer-events: auto;
}

.uv-fmh .sh {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: .5em;
  padding: .6em 1em 1.2em;
  border-radius: 1.6em 1.6em 0 0;
  background: var(--bg);
  box-shadow: 0 -12px 40px rgba(0,0,0,.2);
  transform: translateY(110%);
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-fmh.open .sh {
  transform: none;
}

.uv-fmh .gr {
  width: 2.4em;
  height: 4px;
  margin: 0 auto .4em;
  border-radius: 999px;
  background: color-mix(in srgb,var(--fg) 22%,transparent);
}

.uv-fmh .ac .hd {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: .6em 0;
  border-radius: 0;
  font-weight: 600;
  font-size: calc(var(--s) * .92);
}

.uv-fmh .ac .hd i {
  display: grid;
  place-items: center;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-fmh .ac .hd svg {
  width: 1em;
  height: 1em;
  opacity: .6;
}

.uv-fmh .ac.open .hd i {
  transform: rotate(180deg);
}

.uv-fmh .ac .bd {
  display: flex;
  flex-wrap: wrap;
  gap: .4em;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),padding calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-fmh .ac.open .bd {
  max-height: 8em;
  opacity: 1;
  padding-bottom: .6em;
}

.uv-fmh .op2 {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  font-size: calc(var(--s) * .82);
  padding: .5em .9em;
  background: color-mix(in srgb,var(--fg) 7%,transparent);
}

.uv-fmh .op2.on {
  color: #fff;
  background: var(--c1);
}

.uv-fmh .ap {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: flex;
  justify-content: center;
  gap: .5em;
  margin-top: .3em;
  color: #fff;
  background: var(--c1);
  font-weight: 700;
}

.uv-fmh .ap b {
  display: grid;
  place-items: center;
  min-width: 1.5em;
  padding: 0 .35em;
  border-radius: 999px;
  font-size: calc(var(--s) * .72);
  background: rgba(255,255,255,.25);
}

.uv-fmh .ap:active {
  transform: scale(.97);
}
```

### JavaScript

```js
document.querySelectorAll(".uv-fmh").forEach(el => {
  const ph=el.querySelector(".ph");el.querySelector(".op").addEventListener("click",()=>el.classList.add("open"));el.querySelector(".ov").addEventListener("click",()=>el.classList.remove("open"));el.querySelectorAll(".ac .hd").forEach(h=>h.addEventListener("click",()=>h.parentElement.classList.toggle("open")));const n=el.querySelector(".n");el.querySelectorAll(".op2").forEach(b=>b.addEventListener("click",()=>{b.classList.toggle("on");n.textContent=el.querySelectorAll(".op2.on").length}));el.querySelector(".ap").addEventListener("click",()=>el.classList.remove("open"))
});
```

### 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 = `
.uv-fmh {
  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;
}

.uv-fmh .ph {
  position: relative;
  width: 16em;
  height: 26em;
  padding: .9em;
  border-radius: 2.2em;
  background: var(--bg);
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--fg) 14%,transparent),0 24px 50px rgba(0,0,0,.18);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.uv-fmh .op {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: inline-flex;
  align-items: center;
  gap: .5em;
  color: #fff;
  background: var(--c1);
  box-shadow: 0 10px 24px color-mix(in srgb,var(--c1) 34%,transparent);
}

.uv-fmh .op svg {
  width: 1.1em;
  height: 1.1em;
}

.uv-fmh .op:active {
  transform: scale(.95);
}

.uv-fmh .ov {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-fmh.open .ov {
  opacity: 1;
  pointer-events: auto;
}

.uv-fmh .sh {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: .5em;
  padding: .6em 1em 1.2em;
  border-radius: 1.6em 1.6em 0 0;
  background: var(--bg);
  box-shadow: 0 -12px 40px rgba(0,0,0,.2);
  transform: translateY(110%);
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-fmh.open .sh {
  transform: none;
}

.uv-fmh .gr {
  width: 2.4em;
  height: 4px;
  margin: 0 auto .4em;
  border-radius: 999px;
  background: color-mix(in srgb,var(--fg) 22%,transparent);
}

.uv-fmh .ac .hd {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: .6em 0;
  border-radius: 0;
  font-weight: 600;
  font-size: calc(var(--s) * .92);
}

.uv-fmh .ac .hd i {
  display: grid;
  place-items: center;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-fmh .ac .hd svg {
  width: 1em;
  height: 1em;
  opacity: .6;
}

.uv-fmh .ac.open .hd i {
  transform: rotate(180deg);
}

.uv-fmh .ac .bd {
  display: flex;
  flex-wrap: wrap;
  gap: .4em;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),padding calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-fmh .ac.open .bd {
  max-height: 8em;
  opacity: 1;
  padding-bottom: .6em;
}

.uv-fmh .op2 {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  font-size: calc(var(--s) * .82);
  padding: .5em .9em;
  background: color-mix(in srgb,var(--fg) 7%,transparent);
}

.uv-fmh .op2.on {
  color: #fff;
  background: var(--c1);
}

.uv-fmh .ap {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: flex;
  justify-content: center;
  gap: .5em;
  margin-top: .3em;
  color: #fff;
  background: var(--c1);
  font-weight: 700;
}

.uv-fmh .ap b {
  display: grid;
  place-items: center;
  min-width: 1.5em;
  padding: 0 .35em;
  border-radius: 999px;
  font-size: calc(var(--s) * .72);
  background: rgba(255,255,255,.25);
}

.uv-fmh .ap:active {
  transform: scale(.97);
}
`;

// 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 ph=el.querySelector(".ph");el.querySelector(".op").addEventListener("click",()=>el.classList.add("open"));el.querySelector(".ov").addEventListener("click",()=>el.classList.remove("open"));el.querySelectorAll(".ac .hd").forEach(h=>h.addEventListener("click",()=>h.parentElement.classList.toggle("open")));const n=el.querySelector(".n");el.querySelectorAll(".op2").forEach(b=>b.addEventListener("click",()=>{b.classList.toggle("on");n.textContent=el.querySelectorAll(".op2.on").length}));el.querySelector(".ap").addEventListener("click",()=>el.classList.remove("open"))
}

export default function FMobSheet() {
  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": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uv-fmh"><div className="ph"><button className="op"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round"><path d="M4 7h10M18 7h2M4 17h4M12 17h8" /><circle cx="16" cy="7" r="2" /><circle cx="10" cy="17" r="2" /></svg> Filters</button><div className="ov"></div><div className="sh"><span className="gr"></span><div className="ac open"><button className="hd">Category<i><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><path d="M6 9l6 6 6-6" /></svg></i></button><div className="bd"><button className="op2">Design</button><button className="op2">Code</button><button className="op2">Photos</button></div></div><div className="ac"><button className="hd">Price<i><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><path d="M6 9l6 6 6-6" /></svg></i></button><div className="bd"><button className="op2">Low</button><button className="op2">Medium</button><button className="op2">High</button></div></div><button className="ap">Apply <b className="n">0</b></button></div></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 “Bottom sheet filters” block (Filters) from AIMRAN Library to my project.

## What it is
A panel that slides up from the bottom with a grab handle, collapsible sections and an Apply button with a count.

## Chosen settings
- Main color: #0071e3
- Secondary color: #8ec5ff
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)

## 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 = `
.uv-fmh {
  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;
}

.uv-fmh .ph {
  position: relative;
  width: 16em;
  height: 26em;
  padding: .9em;
  border-radius: 2.2em;
  background: var(--bg);
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--fg) 14%,transparent),0 24px 50px rgba(0,0,0,.18);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.uv-fmh .op {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: inline-flex;
  align-items: center;
  gap: .5em;
  color: #fff;
  background: var(--c1);
  box-shadow: 0 10px 24px color-mix(in srgb,var(--c1) 34%,transparent);
}

.uv-fmh .op svg {
  width: 1.1em;
  height: 1.1em;
}

.uv-fmh .op:active {
  transform: scale(.95);
}

.uv-fmh .ov {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-fmh.open .ov {
  opacity: 1;
  pointer-events: auto;
}

.uv-fmh .sh {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: .5em;
  padding: .6em 1em 1.2em;
  border-radius: 1.6em 1.6em 0 0;
  background: var(--bg);
  box-shadow: 0 -12px 40px rgba(0,0,0,.2);
  transform: translateY(110%);
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-fmh.open .sh {
  transform: none;
}

.uv-fmh .gr {
  width: 2.4em;
  height: 4px;
  margin: 0 auto .4em;
  border-radius: 999px;
  background: color-mix(in srgb,var(--fg) 22%,transparent);
}

.uv-fmh .ac .hd {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: .6em 0;
  border-radius: 0;
  font-weight: 600;
  font-size: calc(var(--s) * .92);
}

.uv-fmh .ac .hd i {
  display: grid;
  place-items: center;
  transition: transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uv-fmh .ac .hd svg {
  width: 1em;
  height: 1em;
  opacity: .6;
}

.uv-fmh .ac.open .hd i {
  transform: rotate(180deg);
}

.uv-fmh .ac .bd {
  display: flex;
  flex-wrap: wrap;
  gap: .4em;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),padding calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uv-fmh .ac.open .bd {
  max-height: 8em;
  opacity: 1;
  padding-bottom: .6em;
}

.uv-fmh .op2 {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  font-size: calc(var(--s) * .82);
  padding: .5em .9em;
  background: color-mix(in srgb,var(--fg) 7%,transparent);
}

.uv-fmh .op2.on {
  color: #fff;
  background: var(--c1);
}

.uv-fmh .ap {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  font-weight: 550;
  line-height: 1;
  padding: .72em 1.25em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  position: relative;
  transition: color calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.32s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.32s / var(--k)) cubic-bezier(.34,1.56,.64,1);
  display: flex;
  justify-content: center;
  gap: .5em;
  margin-top: .3em;
  color: #fff;
  background: var(--c1);
  font-weight: 700;
}

.uv-fmh .ap b {
  display: grid;
  place-items: center;
  min-width: 1.5em;
  padding: 0 .35em;
  border-radius: 999px;
  font-size: calc(var(--s) * .72);
  background: rgba(255,255,255,.25);
}

.uv-fmh .ap:active {
  transform: scale(.97);
}
`;

// 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 ph=el.querySelector(".ph");el.querySelector(".op").addEventListener("click",()=>el.classList.add("open"));el.querySelector(".ov").addEventListener("click",()=>el.classList.remove("open"));el.querySelectorAll(".ac .hd").forEach(h=>h.addEventListener("click",()=>h.parentElement.classList.toggle("open")));const n=el.querySelector(".n");el.querySelectorAll(".op2").forEach(b=>b.addEventListener("click",()=>{b.classList.toggle("on");n.textContent=el.querySelectorAll(".op2.on").length}));el.querySelector(".ap").addEventListener("click",()=>el.classList.remove("open"))
}

export default function FMobSheet() {
  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": "#0071e3",
          "--c2": "#8ec5ff",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uv-fmh"><div className="ph"><button className="op"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round"><path d="M4 7h10M18 7h2M4 17h4M12 17h8" /><circle cx="16" cy="7" r="2" /><circle cx="10" cy="17" r="2" /></svg> Filters</button><div className="ov"></div><div className="sh"><span className="gr"></span><div className="ac open"><button className="hd">Category<i><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><path d="M6 9l6 6 6-6" /></svg></i></button><div className="bd"><button className="op2">Design</button><button className="op2">Code</button><button className="op2">Photos</button></div></div><div className="ac"><button className="hd">Price<i><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><path d="M6 9l6 6 6-6" /></svg></i></button><div className="bd"><button className="op2">Low</button><button className="op2">Medium</button><button className="op2">High</button></div></div><button className="ap">Apply <b className="n">0</b></button></div></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.
````
