# Runway pagination

> Page numbers are painted on a runway seen from above: the plane taxis to the one you pick while approach lights race towards it.

- Category: [Navigation](https://library.aimran.es/components/navigation)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-nav-runway-pager
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Pagination drawn as an airport runway seen from above, with edge lights, threshold stripes and a dashed centre line. Page numbers are painted along the tarmac, a small plane taxis to the one you choose and turns around when you go back, and a strobe of approach lights keeps running towards it. It suits travel sites, galleries and long lists with a handful of pages.

The main color sets the green threshold lights and the secondary color the plane. Eight pages fit comfortably; change the number in the data and the plane, lights and counter follow on their own.

## Code

### HTML

```html
<nav class="uvq12-rw" aria-label="Pagination"><p class="rd"><span>Page</span><b class="pn">3</b><small>/ 8</small></p><div class="cs"><button type="button" class="pv" aria-label="Previous page"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6"/></svg></button><div class="rn"><span class="cl" aria-hidden="true"></span><span class="gl" aria-hidden="true"></span><span class="rb" aria-hidden="true"></span><svg class="pl" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z"/></svg><div class="ns"><button type="button" aria-label="Page 1" tabindex="-1">01</button><button type="button" aria-label="Page 2" tabindex="-1">02</button><button type="button" aria-label="Page 3" aria-current="page" tabindex="0">03</button><button type="button" aria-label="Page 4" tabindex="-1">04</button><button type="button" aria-label="Page 5" tabindex="-1">05</button><button type="button" aria-label="Page 6" tabindex="-1">06</button><button type="button" aria-label="Page 7" tabindex="-1">07</button><button type="button" aria-label="Page 8" tabindex="-1">08</button></div></div><button type="button" class="nx" aria-label="Next page"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg></button></div></nav>
```

### CSS

```css
.uvq12-rw {
  --c1: #22c55e;
  --c2: #f8fafc;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq12-rw {
  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: 22em;
  --p: 3;
}

.uvq12-rw .rd {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .35em;
  margin: 0 0 .6em;
  font-size: .85em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq12-rw .rd b {
  min-width: 1.2em;
  font-size: 2em;
  font-weight: 800;
  text-align: center;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.uvq12-rw .cs {
  display: flex;
  align-items: center;
  gap: .5em;
}

.uvq12-rw .pv,.uvq12-rw .nx {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  display: grid;
  place-items: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: color-mix(in srgb,var(--fg) 2%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent),0 1.4em 2.8em -1.4em rgba(0,0,0,.45);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.34,1.56,.64,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-rw .pv svg,.uvq12-rw .nx svg {
  width: 1em;
  height: 1em;
}

.uvq12-rw .pv:active,.uvq12-rw .nx:active {
  transform: scale(.88);
}

.uvq12-rw .pv:disabled,.uvq12-rw .nx:disabled {
  opacity: .35;
  cursor: default;
}

.uvq12-rw button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq12-rw .rn {
  position: relative;
  flex: 1;
  height: 5.6em;
  border-radius: .35em;
  overflow: hidden;
  background: radial-gradient(circle,#fde68a .12em,transparent .17em) 0 .3em/1.05em .6em repeat-x,radial-gradient(circle,#fde68a .12em,transparent .17em) 0 calc(100% - .3em)/1.05em .6em repeat-x,repeating-radial-gradient(circle at 30% 40%,rgba(255,255,255,.025) 0 1px,transparent 1px 4px),linear-gradient(180deg,#3a3c42,#2a2c31);
  box-shadow: 0 .8em 1.6em -.9em rgba(0,0,0,.6);
}

.uvq12-rw .rn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: .7em;
  bottom: .7em;
  border-top: 2px solid rgba(248,250,252,.75);
  border-bottom: 2px solid rgba(248,250,252,.75);
}

.uvq12-rw .rn::after {
  content: "";
  position: absolute;
  left: .3em;
  top: 1.05em;
  bottom: 1.05em;
  width: .6em;
  background: repeating-linear-gradient(180deg,rgba(248,250,252,.8) 0 .22em,transparent .22em .42em);
}

.uvq12-rw .cl {
  position: absolute;
  left: 1.2em;
  right: .6em;
  top: 50%;
  height: .14em;
  margin-top: -.07em;
  background: repeating-linear-gradient(90deg,rgba(248,250,252,.8) 0 .8em,transparent .8em 1.45em);
}

.uvq12-rw .ns {
  position: absolute;
  left: 1.1em;
  right: .3em;
  bottom: .85em;
  display: grid;
  grid-template-columns: repeat(8,1fr);
}

.uvq12-rw .ns button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .15em 0;
  border-radius: .3em;
  font: 800 .72em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .04em;
  color: rgba(248,250,252,.5);
  transition: color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.2s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq12-rw .ns button:hover {
  color: #fff;
}

.uvq12-rw .ns button:active {
  transform: scale(.9);
}

.uvq12-rw .ns button[aria-current] {
  color: #fff;
  text-shadow: 0 0 .5em var(--c1);
}

.uvq12-rw .ns button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 1px;
}

.uvq12-rw .pl,.uvq12-rw .gl,.uvq12-rw .rb {
  position: absolute;
  left: calc(1.1em + (100% - 1.4em) * (var(--p) - .5) / 8);
}

.uvq12-rw .pl {
  z-index: 1;
  top: 50%;
  width: 2em;
  height: 2em;
  margin: -1em 0 0 -1em;
  fill: var(--c2);
  filter: drop-shadow(.25em .35em .1em rgba(0,0,0,.45));
  transform: rotate(90deg);
  transition: left calc(1s / var(--k)) cubic-bezier(.22,1,.36,1),transform calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-rw.bk .pl {
  transform: rotate(-90deg);
}

.uvq12-rw .gl {
  top: .95em;
  bottom: .95em;
  width: .3em;
  margin-left: -1.5em;
  background: radial-gradient(circle,var(--c1) .1em,transparent .15em) 0 0/.3em .42em repeat-y;
  filter: drop-shadow(0 0 .25em var(--c1));
  transition: left calc(1s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq12-rw .rb {
  top: 50%;
  width: .4em;
  height: .4em;
  margin: -.2em 0 0 -.2em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 .5em .15em #fff;
  opacity: 0;
  animation: uvq12-rw calc(1.3s / var(--k)) linear infinite;
}

@keyframes uvq12-rw {
  0% {
    left: .6em;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    opacity: .9;
  }
  100% {
    left: calc(1.1em + (100% - 1.4em) * (var(--p) - .5) / 8 - 1.6em);
    opacity: 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq12-rw .rb {
    display: none;
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq12-rw").forEach(el => {
  const bs=[...el.querySelectorAll(".ns button")],pn=el.querySelector(".pn"),pv=el.querySelector(".pv"),nx=el.querySelector(".nx"),N=bs.length;let p=3;
const go=(k,f)=>{k=Math.max(1,Math.min(N,k));if(k===p&&!f)return;el.classList.toggle("bk",k<p);p=k;el.style.setProperty("--p",p);pn.textContent=p;bs.forEach((b,j)=>{if(j===p-1){b.setAttribute("aria-current","page");b.tabIndex=0}else{b.removeAttribute("aria-current");b.tabIndex=-1}});pv.disabled=p===1;nx.disabled=p===N;if(f===2)bs[p-1].focus()};
bs.forEach((b,j)=>{b.addEventListener("click",()=>go(j+1));b.addEventListener("keydown",e=>{const m={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1}[e.key];if(m){e.preventDefault();go(p+m,2)}if(e.key==="Home"){e.preventDefault();go(1,2)}if(e.key==="End"){e.preventDefault();go(N,2)}})});
pv.addEventListener("click",()=>go(p-1));nx.addEventListener("click",()=>go(p+1));go(p,1)
});
```

### 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 = `
.uvq12-rw {
  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: 22em;
  --p: 3;
}

.uvq12-rw .rd {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .35em;
  margin: 0 0 .6em;
  font-size: .85em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq12-rw .rd b {
  min-width: 1.2em;
  font-size: 2em;
  font-weight: 800;
  text-align: center;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.uvq12-rw .cs {
  display: flex;
  align-items: center;
  gap: .5em;
}

.uvq12-rw .pv,.uvq12-rw .nx {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  display: grid;
  place-items: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: color-mix(in srgb,var(--fg) 2%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent),0 1.4em 2.8em -1.4em rgba(0,0,0,.45);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.34,1.56,.64,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-rw .pv svg,.uvq12-rw .nx svg {
  width: 1em;
  height: 1em;
}

.uvq12-rw .pv:active,.uvq12-rw .nx:active {
  transform: scale(.88);
}

.uvq12-rw .pv:disabled,.uvq12-rw .nx:disabled {
  opacity: .35;
  cursor: default;
}

.uvq12-rw button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq12-rw .rn {
  position: relative;
  flex: 1;
  height: 5.6em;
  border-radius: .35em;
  overflow: hidden;
  background: radial-gradient(circle,#fde68a .12em,transparent .17em) 0 .3em/1.05em .6em repeat-x,radial-gradient(circle,#fde68a .12em,transparent .17em) 0 calc(100% - .3em)/1.05em .6em repeat-x,repeating-radial-gradient(circle at 30% 40%,rgba(255,255,255,.025) 0 1px,transparent 1px 4px),linear-gradient(180deg,#3a3c42,#2a2c31);
  box-shadow: 0 .8em 1.6em -.9em rgba(0,0,0,.6);
}

.uvq12-rw .rn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: .7em;
  bottom: .7em;
  border-top: 2px solid rgba(248,250,252,.75);
  border-bottom: 2px solid rgba(248,250,252,.75);
}

.uvq12-rw .rn::after {
  content: "";
  position: absolute;
  left: .3em;
  top: 1.05em;
  bottom: 1.05em;
  width: .6em;
  background: repeating-linear-gradient(180deg,rgba(248,250,252,.8) 0 .22em,transparent .22em .42em);
}

.uvq12-rw .cl {
  position: absolute;
  left: 1.2em;
  right: .6em;
  top: 50%;
  height: .14em;
  margin-top: -.07em;
  background: repeating-linear-gradient(90deg,rgba(248,250,252,.8) 0 .8em,transparent .8em 1.45em);
}

.uvq12-rw .ns {
  position: absolute;
  left: 1.1em;
  right: .3em;
  bottom: .85em;
  display: grid;
  grid-template-columns: repeat(8,1fr);
}

.uvq12-rw .ns button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .15em 0;
  border-radius: .3em;
  font: 800 .72em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .04em;
  color: rgba(248,250,252,.5);
  transition: color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.2s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq12-rw .ns button:hover {
  color: #fff;
}

.uvq12-rw .ns button:active {
  transform: scale(.9);
}

.uvq12-rw .ns button[aria-current] {
  color: #fff;
  text-shadow: 0 0 .5em var(--c1);
}

.uvq12-rw .ns button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 1px;
}

.uvq12-rw .pl,.uvq12-rw .gl,.uvq12-rw .rb {
  position: absolute;
  left: calc(1.1em + (100% - 1.4em) * (var(--p) - .5) / 8);
}

.uvq12-rw .pl {
  z-index: 1;
  top: 50%;
  width: 2em;
  height: 2em;
  margin: -1em 0 0 -1em;
  fill: var(--c2);
  filter: drop-shadow(.25em .35em .1em rgba(0,0,0,.45));
  transform: rotate(90deg);
  transition: left calc(1s / var(--k)) cubic-bezier(.22,1,.36,1),transform calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-rw.bk .pl {
  transform: rotate(-90deg);
}

.uvq12-rw .gl {
  top: .95em;
  bottom: .95em;
  width: .3em;
  margin-left: -1.5em;
  background: radial-gradient(circle,var(--c1) .1em,transparent .15em) 0 0/.3em .42em repeat-y;
  filter: drop-shadow(0 0 .25em var(--c1));
  transition: left calc(1s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq12-rw .rb {
  top: 50%;
  width: .4em;
  height: .4em;
  margin: -.2em 0 0 -.2em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 .5em .15em #fff;
  opacity: 0;
  animation: uvq12-rw calc(1.3s / var(--k)) linear infinite;
}

@keyframes uvq12-rw {
  0% {
    left: .6em;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    opacity: .9;
  }
  100% {
    left: calc(1.1em + (100% - 1.4em) * (var(--p) - .5) / 8 - 1.6em);
    opacity: 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq12-rw .rb {
    display: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq12-rw,.uvq12-rw *,.uvq12-rw *::before,.uvq12-rw *::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 bs=[...el.querySelectorAll(".ns button")],pn=el.querySelector(".pn"),pv=el.querySelector(".pv"),nx=el.querySelector(".nx"),N=bs.length;let p=3;
const go=(k,f)=>{k=Math.max(1,Math.min(N,k));if(k===p&&!f)return;el.classList.toggle("bk",k<p);p=k;el.style.setProperty("--p",p);pn.textContent=p;bs.forEach((b,j)=>{if(j===p-1){b.setAttribute("aria-current","page");b.tabIndex=0}else{b.removeAttribute("aria-current");b.tabIndex=-1}});pv.disabled=p===1;nx.disabled=p===N;if(f===2)bs[p-1].focus()};
bs.forEach((b,j)=>{b.addEventListener("click",()=>go(j+1));b.addEventListener("keydown",e=>{const m={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1}[e.key];if(m){e.preventDefault();go(p+m,2)}if(e.key==="Home"){e.preventDefault();go(1,2)}if(e.key==="End"){e.preventDefault();go(N,2)}})});
pv.addEventListener("click",()=>go(p-1));nx.addEventListener("click",()=>go(p+1));go(p,1)
}

export default function NavRunwayPager() {
  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": "#22c55e",
          "--c2": "#f8fafc",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <nav className="uvq12-rw" aria-label="Pagination"><p className="rd"><span>Page</span><b className="pn">3</b><small>/ 8</small></p><div className="cs"><button type="button" className="pv" aria-label="Previous page"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6" /></svg></button><div className="rn"><span className="cl" aria-hidden="true"></span><span className="gl" aria-hidden="true"></span><span className="rb" aria-hidden="true"></span><svg className="pl" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z" /></svg><div className="ns"><button type="button" aria-label="Page 1" tabIndex={-1}>01</button><button type="button" aria-label="Page 2" tabIndex={-1}>02</button><button type="button" aria-label="Page 3" aria-current="page" tabIndex={0}>03</button><button type="button" aria-label="Page 4" tabIndex={-1}>04</button><button type="button" aria-label="Page 5" tabIndex={-1}>05</button><button type="button" aria-label="Page 6" tabIndex={-1}>06</button><button type="button" aria-label="Page 7" tabIndex={-1}>07</button><button type="button" aria-label="Page 8" tabIndex={-1}>08</button></div></div><button type="button" className="nx" aria-label="Next page"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6" /></svg></button></div></nav>
      </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 “Runway pagination” block (Navigation) from AIMRAN Library to my project.

## What it is
Page numbers are painted on a runway seen from above: the plane taxis to the one you pick while approach lights race towards it.

## Chosen settings
- Main color: #22c55e
- Secondary color: #f8fafc
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Paginación"

## 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 = `
.uvq12-rw {
  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: 22em;
  --p: 3;
}

.uvq12-rw .rd {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .35em;
  margin: 0 0 .6em;
  font-size: .85em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq12-rw .rd b {
  min-width: 1.2em;
  font-size: 2em;
  font-weight: 800;
  text-align: center;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.uvq12-rw .cs {
  display: flex;
  align-items: center;
  gap: .5em;
}

.uvq12-rw .pv,.uvq12-rw .nx {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  display: grid;
  place-items: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  background: color-mix(in srgb,var(--fg) 2%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 9%,transparent),0 1.4em 2.8em -1.4em rgba(0,0,0,.45);
  transition: transform calc(0.2s / var(--k)) cubic-bezier(.34,1.56,.64,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-rw .pv svg,.uvq12-rw .nx svg {
  width: 1em;
  height: 1em;
}

.uvq12-rw .pv:active,.uvq12-rw .nx:active {
  transform: scale(.88);
}

.uvq12-rw .pv:disabled,.uvq12-rw .nx:disabled {
  opacity: .35;
  cursor: default;
}

.uvq12-rw button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq12-rw .rn {
  position: relative;
  flex: 1;
  height: 5.6em;
  border-radius: .35em;
  overflow: hidden;
  background: radial-gradient(circle,#fde68a .12em,transparent .17em) 0 .3em/1.05em .6em repeat-x,radial-gradient(circle,#fde68a .12em,transparent .17em) 0 calc(100% - .3em)/1.05em .6em repeat-x,repeating-radial-gradient(circle at 30% 40%,rgba(255,255,255,.025) 0 1px,transparent 1px 4px),linear-gradient(180deg,#3a3c42,#2a2c31);
  box-shadow: 0 .8em 1.6em -.9em rgba(0,0,0,.6);
}

.uvq12-rw .rn::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: .7em;
  bottom: .7em;
  border-top: 2px solid rgba(248,250,252,.75);
  border-bottom: 2px solid rgba(248,250,252,.75);
}

.uvq12-rw .rn::after {
  content: "";
  position: absolute;
  left: .3em;
  top: 1.05em;
  bottom: 1.05em;
  width: .6em;
  background: repeating-linear-gradient(180deg,rgba(248,250,252,.8) 0 .22em,transparent .22em .42em);
}

.uvq12-rw .cl {
  position: absolute;
  left: 1.2em;
  right: .6em;
  top: 50%;
  height: .14em;
  margin-top: -.07em;
  background: repeating-linear-gradient(90deg,rgba(248,250,252,.8) 0 .8em,transparent .8em 1.45em);
}

.uvq12-rw .ns {
  position: absolute;
  left: 1.1em;
  right: .3em;
  bottom: .85em;
  display: grid;
  grid-template-columns: repeat(8,1fr);
}

.uvq12-rw .ns button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: .15em 0;
  border-radius: .3em;
  font: 800 .72em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .04em;
  color: rgba(248,250,252,.5);
  transition: color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.2s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq12-rw .ns button:hover {
  color: #fff;
}

.uvq12-rw .ns button:active {
  transform: scale(.9);
}

.uvq12-rw .ns button[aria-current] {
  color: #fff;
  text-shadow: 0 0 .5em var(--c1);
}

.uvq12-rw .ns button:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 1px;
}

.uvq12-rw .pl,.uvq12-rw .gl,.uvq12-rw .rb {
  position: absolute;
  left: calc(1.1em + (100% - 1.4em) * (var(--p) - .5) / 8);
}

.uvq12-rw .pl {
  z-index: 1;
  top: 50%;
  width: 2em;
  height: 2em;
  margin: -1em 0 0 -1em;
  fill: var(--c2);
  filter: drop-shadow(.25em .35em .1em rgba(0,0,0,.45));
  transform: rotate(90deg);
  transition: left calc(1s / var(--k)) cubic-bezier(.22,1,.36,1),transform calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-rw.bk .pl {
  transform: rotate(-90deg);
}

.uvq12-rw .gl {
  top: .95em;
  bottom: .95em;
  width: .3em;
  margin-left: -1.5em;
  background: radial-gradient(circle,var(--c1) .1em,transparent .15em) 0 0/.3em .42em repeat-y;
  filter: drop-shadow(0 0 .25em var(--c1));
  transition: left calc(1s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq12-rw .rb {
  top: 50%;
  width: .4em;
  height: .4em;
  margin: -.2em 0 0 -.2em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 .5em .15em #fff;
  opacity: 0;
  animation: uvq12-rw calc(1.3s / var(--k)) linear infinite;
}

@keyframes uvq12-rw {
  0% {
    left: .6em;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    opacity: .9;
  }
  100% {
    left: calc(1.1em + (100% - 1.4em) * (var(--p) - .5) / 8 - 1.6em);
    opacity: 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq12-rw .rb {
    display: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq12-rw,.uvq12-rw *,.uvq12-rw *::before,.uvq12-rw *::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 bs=[...el.querySelectorAll(".ns button")],pn=el.querySelector(".pn"),pv=el.querySelector(".pv"),nx=el.querySelector(".nx"),N=bs.length;let p=3;
const go=(k,f)=>{k=Math.max(1,Math.min(N,k));if(k===p&&!f)return;el.classList.toggle("bk",k<p);p=k;el.style.setProperty("--p",p);pn.textContent=p;bs.forEach((b,j)=>{if(j===p-1){b.setAttribute("aria-current","page");b.tabIndex=0}else{b.removeAttribute("aria-current");b.tabIndex=-1}});pv.disabled=p===1;nx.disabled=p===N;if(f===2)bs[p-1].focus()};
bs.forEach((b,j)=>{b.addEventListener("click",()=>go(j+1));b.addEventListener("keydown",e=>{const m={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1}[e.key];if(m){e.preventDefault();go(p+m,2)}if(e.key==="Home"){e.preventDefault();go(1,2)}if(e.key==="End"){e.preventDefault();go(N,2)}})});
pv.addEventListener("click",()=>go(p-1));nx.addEventListener("click",()=>go(p+1));go(p,1)
}

export default function NavRunwayPager() {
  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": "#22c55e",
          "--c2": "#f8fafc",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <nav className="uvq12-rw" aria-label="Pagination"><p className="rd"><span>Page</span><b className="pn">3</b><small>/ 8</small></p><div className="cs"><button type="button" className="pv" aria-label="Previous page"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6" /></svg></button><div className="rn"><span className="cl" aria-hidden="true"></span><span className="gl" aria-hidden="true"></span><span className="rb" aria-hidden="true"></span><svg className="pl" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z" /></svg><div className="ns"><button type="button" aria-label="Page 1" tabIndex={-1}>01</button><button type="button" aria-label="Page 2" tabIndex={-1}>02</button><button type="button" aria-label="Page 3" aria-current="page" tabIndex={0}>03</button><button type="button" aria-label="Page 4" tabIndex={-1}>04</button><button type="button" aria-label="Page 5" tabIndex={-1}>05</button><button type="button" aria-label="Page 6" tabIndex={-1}>06</button><button type="button" aria-label="Page 7" tabIndex={-1}>07</button><button type="button" aria-label="Page 8" tabIndex={-1}>08</button></div></div><button type="button" className="nx" aria-label="Next page"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6" /></svg></button></div></nav>
      </div>
    </>
  );
}
```

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