# Self-sorting bookshelf

> Books on a shelf hop and rearrange themselves by height, colour or year when you change the sort order.

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

## Where to use it

Sort menus usually just reorder a list, but here the items are physical: eight books on a wooden shelf with gilt bands and their year on the spine. Each sort option stores precomputed positions in CSS variables, so the books slide to their new place with a small hop, all without JavaScript. A potted plant keeps the shelf company.

The first colour sets the shelf and the active option, the second the plant. Replace the books with your own items and recompute the three position sets, or add a fourth order such as title by extending the variables.

## Code

### HTML

```html
<div class="uvq05-sh"><div class="hd"><span class="lb">Sort by</span><div class="sg" role="radiogroup" aria-label="Sort by"><label><input type="radio" name="uvq05-sh" checked><span>Height</span></label><label><input type="radio" name="uvq05-sh"><span>Color</span></label><label><input type="radio" name="uvq05-sh"><span>Year</span></label></div></div><div class="sf" aria-hidden="true"><i class="bk" style="--h:5.2em;--w:1.1em;--b:#c0392b;--x0:2.34em;--x1:0em;--x2:3.56em;--d:0"><b>1987</b></i><i class="bk" style="--h:4.2em;--w:0.9em;--b:#2e86ab;--x0:7.02em;--x1:5.6em;--x2:5.9em;--d:1"><b>2004</b></i><i class="bk" style="--h:6em;--w:1.3em;--b:#1e3d59;--x0:0em;--x1:6.62em;--x2:0em;--d:2"><b>1952</b></i><i class="bk" style="--h:4.8em;--w:1em;--b:#f2a541;--x0:4.68em;--x1:2.34em;--x2:8.24em;--d:3;--t:#3a2a10"><b>2019</b></i><i class="bk" style="--h:5.6em;--w:0.8em;--b:#3c896d;--x0:1.42em;--x1:3.46em;--x2:2.64em;--d:4"><b>1971</b></i><i class="bk" style="--h:3.8em;--w:1.2em;--b:#9b5de5;--x0:8.04em;--x1:8.04em;--x2:6.92em;--d:5"><b>2011</b></i><i class="bk" style="--h:5em;--w:1em;--b:#e76f51;--x0:3.56em;--x1:1.22em;--x2:4.78em;--d:6"><b>1999</b></i><i class="bk" style="--h:4.4em;--w:1.1em;--b:#264653;--x0:5.8em;--x1:4.38em;--x2:1.42em;--d:7"><b>1963</b></i><span class="pt"><i></i><i></i><i></i></span></div></div>
```

### CSS

```css
.uvq05-sh {
  --c1: #8b5e34;
  --c2: #3f7d4e;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq05-sh {
  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: 16em;
}

.uvq05-sh .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5em;
  margin-bottom: .8em;
}

.uvq05-sh .lb {
  font-weight: 700;
}

.uvq05-sh .sg {
  display: flex;
  padding: .2em;
  border-radius: .7em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq05-sh label {
  position: relative;
  cursor: pointer;
}

.uvq05-sh input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq05-sh .sg span {
  display: block;
  padding: .4em .65em;
  border-radius: .55em;
  font-size: .75em;
  font-weight: 700;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
  transition: background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-sh label:hover span {
  color: var(--fg);
}

.uvq05-sh label:active span {
  transform: scale(.95);
}

.uvq05-sh input:checked+span {
  color: #fff;
  background: var(--c1);
}

.uvq05-sh input:focus-visible+span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-sh .sf {
  position: relative;
  height: 7em;
  border-radius: .6em .6em .2em .2em;
  background: linear-gradient(transparent 60%,color-mix(in srgb,var(--c1) 10%,transparent)),color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq05-sh .sf::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: .55em;
  border-radius: .15em;
  background: linear-gradient(color-mix(in srgb,var(--c1) 70%,#fff),var(--c1));
  box-shadow: 0 .5em .8em -.3em rgba(0,0,0,.45);
}

.uvq05-sh .bk {
  position: absolute;
  bottom: .55em;
  left: calc(1em + var(--x0));
  width: var(--w);
  height: var(--h);
  border-radius: .12em .12em .05em .05em;
  background: linear-gradient(90deg,rgba(0,0,0,.25),rgba(255,255,255,.18) 20%,transparent 45%,rgba(0,0,0,.2)),linear-gradient(transparent .5em,rgba(255,220,150,.8) .5em .62em,transparent .62em .8em,rgba(255,220,150,.8) .8em .86em,transparent .86em calc(100% - .7em),rgba(255,220,150,.7) calc(100% - .7em) calc(100% - .6em),transparent calc(100% - .6em)),var(--b);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
  transform-origin: 50% 100%;
  transition: left calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--d) * 0.03s / var(--k));
  animation: uvq05-sha calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1) both;
  animation-delay: calc(var(--d) * 0.03s / var(--k));
}

.uvq05-sh .bk b {
  position: absolute;
  left: 50%;
  top: 50%;
  font: 700 .45em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color: var(--t,rgba(255,255,255,.85));
  writing-mode: vertical-rl;
  transform: translate(-50%,-50%) rotate(180deg);
}

.uvq05-sh:has(.sg label:nth-of-type(2) input:checked) .bk {
  left: calc(1em + var(--x1));
  animation-name: uvq05-shb;
}

.uvq05-sh:has(.sg label:nth-of-type(3) input:checked) .bk {
  left: calc(1em + var(--x2));
  animation-name: uvq05-shc;
}

.uvq05-sh .pt {
  position: absolute;
  right: 1em;
  bottom: .55em;
  width: 1.8em;
  height: 1.6em;
  border-radius: .15em .15em .5em .5em;
  background: linear-gradient(#c96f45,#a8532f);
}

.uvq05-sh .pt i {
  position: absolute;
  bottom: 1.4em;
  left: 50%;
  width: .7em;
  height: 1.9em;
  margin-left: -.35em;
  border-radius: 50% 50% 50% 50%/80% 80% 20% 20%;
  background: var(--c2);
  transform-origin: 50% 100%;
}

.uvq05-sh .pt i:nth-child(1) {
  transform: rotate(-30deg);
}

.uvq05-sh .pt i:nth-child(3) {
  transform: rotate(32deg);
  height: 1.6em;
}

.uvq05-sh .pt i:nth-child(2) {
  height: 2.3em;
  background: color-mix(in srgb,var(--c2) 80%,#fff);
}

@keyframes uvq05-sha {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

@keyframes uvq05-shb {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

@keyframes uvq05-shc {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

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

### React

```tsx
import type { CSSProperties } from "react";

const css = `
.uvq05-sh {
  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: 16em;
}

.uvq05-sh .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5em;
  margin-bottom: .8em;
}

.uvq05-sh .lb {
  font-weight: 700;
}

.uvq05-sh .sg {
  display: flex;
  padding: .2em;
  border-radius: .7em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq05-sh label {
  position: relative;
  cursor: pointer;
}

.uvq05-sh input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq05-sh .sg span {
  display: block;
  padding: .4em .65em;
  border-radius: .55em;
  font-size: .75em;
  font-weight: 700;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
  transition: background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-sh label:hover span {
  color: var(--fg);
}

.uvq05-sh label:active span {
  transform: scale(.95);
}

.uvq05-sh input:checked+span {
  color: #fff;
  background: var(--c1);
}

.uvq05-sh input:focus-visible+span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-sh .sf {
  position: relative;
  height: 7em;
  border-radius: .6em .6em .2em .2em;
  background: linear-gradient(transparent 60%,color-mix(in srgb,var(--c1) 10%,transparent)),color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq05-sh .sf::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: .55em;
  border-radius: .15em;
  background: linear-gradient(color-mix(in srgb,var(--c1) 70%,#fff),var(--c1));
  box-shadow: 0 .5em .8em -.3em rgba(0,0,0,.45);
}

.uvq05-sh .bk {
  position: absolute;
  bottom: .55em;
  left: calc(1em + var(--x0));
  width: var(--w);
  height: var(--h);
  border-radius: .12em .12em .05em .05em;
  background: linear-gradient(90deg,rgba(0,0,0,.25),rgba(255,255,255,.18) 20%,transparent 45%,rgba(0,0,0,.2)),linear-gradient(transparent .5em,rgba(255,220,150,.8) .5em .62em,transparent .62em .8em,rgba(255,220,150,.8) .8em .86em,transparent .86em calc(100% - .7em),rgba(255,220,150,.7) calc(100% - .7em) calc(100% - .6em),transparent calc(100% - .6em)),var(--b);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
  transform-origin: 50% 100%;
  transition: left calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--d) * 0.03s / var(--k));
  animation: uvq05-sha calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1) both;
  animation-delay: calc(var(--d) * 0.03s / var(--k));
}

.uvq05-sh .bk b {
  position: absolute;
  left: 50%;
  top: 50%;
  font: 700 .45em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color: var(--t,rgba(255,255,255,.85));
  writing-mode: vertical-rl;
  transform: translate(-50%,-50%) rotate(180deg);
}

.uvq05-sh:has(.sg label:nth-of-type(2) input:checked) .bk {
  left: calc(1em + var(--x1));
  animation-name: uvq05-shb;
}

.uvq05-sh:has(.sg label:nth-of-type(3) input:checked) .bk {
  left: calc(1em + var(--x2));
  animation-name: uvq05-shc;
}

.uvq05-sh .pt {
  position: absolute;
  right: 1em;
  bottom: .55em;
  width: 1.8em;
  height: 1.6em;
  border-radius: .15em .15em .5em .5em;
  background: linear-gradient(#c96f45,#a8532f);
}

.uvq05-sh .pt i {
  position: absolute;
  bottom: 1.4em;
  left: 50%;
  width: .7em;
  height: 1.9em;
  margin-left: -.35em;
  border-radius: 50% 50% 50% 50%/80% 80% 20% 20%;
  background: var(--c2);
  transform-origin: 50% 100%;
}

.uvq05-sh .pt i:nth-child(1) {
  transform: rotate(-30deg);
}

.uvq05-sh .pt i:nth-child(3) {
  transform: rotate(32deg);
  height: 1.6em;
}

.uvq05-sh .pt i:nth-child(2) {
  height: 2.3em;
  background: color-mix(in srgb,var(--c2) 80%,#fff);
}

@keyframes uvq05-sha {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

@keyframes uvq05-shb {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

@keyframes uvq05-shc {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

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

export default function FShelfSort() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#8b5e34",
          "--c2": "#3f7d4e",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq05-sh"><div className="hd"><span className="lb">Sort by</span><div className="sg" role="radiogroup" aria-label="Sort by"><label><input type="radio" name="uvq05-sh" checked={true} /><span>Height</span></label><label><input type="radio" name="uvq05-sh" /><span>Color</span></label><label><input type="radio" name="uvq05-sh" /><span>Year</span></label></div></div><div className="sf" aria-hidden="true"><i className="bk" style={{ "--h": "5.2em", "--w": "1.1em", "--b": "#c0392b", "--x0": "2.34em", "--x1": "0em", "--x2": "3.56em", "--d": "0" } as CSSProperties}><b>1987</b></i><i className="bk" style={{ "--h": "4.2em", "--w": "0.9em", "--b": "#2e86ab", "--x0": "7.02em", "--x1": "5.6em", "--x2": "5.9em", "--d": "1" } as CSSProperties}><b>2004</b></i><i className="bk" style={{ "--h": "6em", "--w": "1.3em", "--b": "#1e3d59", "--x0": "0em", "--x1": "6.62em", "--x2": "0em", "--d": "2" } as CSSProperties}><b>1952</b></i><i className="bk" style={{ "--h": "4.8em", "--w": "1em", "--b": "#f2a541", "--x0": "4.68em", "--x1": "2.34em", "--x2": "8.24em", "--d": "3", "--t": "#3a2a10" } as CSSProperties}><b>2019</b></i><i className="bk" style={{ "--h": "5.6em", "--w": "0.8em", "--b": "#3c896d", "--x0": "1.42em", "--x1": "3.46em", "--x2": "2.64em", "--d": "4" } as CSSProperties}><b>1971</b></i><i className="bk" style={{ "--h": "3.8em", "--w": "1.2em", "--b": "#9b5de5", "--x0": "8.04em", "--x1": "8.04em", "--x2": "6.92em", "--d": "5" } as CSSProperties}><b>2011</b></i><i className="bk" style={{ "--h": "5em", "--w": "1em", "--b": "#e76f51", "--x0": "3.56em", "--x1": "1.22em", "--x2": "4.78em", "--d": "6" } as CSSProperties}><b>1999</b></i><i className="bk" style={{ "--h": "4.4em", "--w": "1.1em", "--b": "#264653", "--x0": "5.8em", "--x1": "4.38em", "--x2": "1.42em", "--d": "7" } as CSSProperties}><b>1963</b></i><span className="pt"><i></i><i></i><i></i></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 “Self-sorting bookshelf” block (Filters) from AIMRAN Library to my project.

## What it is
Books on a shelf hop and rearrange themselves by height, colour or year when you change the sort order.

## Chosen settings
- Main color: #8b5e34
- Secondary color: #3f7d4e
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Ordenar por"

## 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
import type { CSSProperties } from "react";

const css = `
.uvq05-sh {
  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: 16em;
}

.uvq05-sh .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5em;
  margin-bottom: .8em;
}

.uvq05-sh .lb {
  font-weight: 700;
}

.uvq05-sh .sg {
  display: flex;
  padding: .2em;
  border-radius: .7em;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq05-sh label {
  position: relative;
  cursor: pointer;
}

.uvq05-sh input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq05-sh .sg span {
  display: block;
  padding: .4em .65em;
  border-radius: .55em;
  font-size: .75em;
  font-weight: 700;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
  transition: background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-sh label:hover span {
  color: var(--fg);
}

.uvq05-sh label:active span {
  transform: scale(.95);
}

.uvq05-sh input:checked+span {
  color: #fff;
  background: var(--c1);
}

.uvq05-sh input:focus-visible+span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-sh .sf {
  position: relative;
  height: 7em;
  border-radius: .6em .6em .2em .2em;
  background: linear-gradient(transparent 60%,color-mix(in srgb,var(--c1) 10%,transparent)),color-mix(in srgb,var(--fg) 6%,transparent);
}

.uvq05-sh .sf::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: .55em;
  border-radius: .15em;
  background: linear-gradient(color-mix(in srgb,var(--c1) 70%,#fff),var(--c1));
  box-shadow: 0 .5em .8em -.3em rgba(0,0,0,.45);
}

.uvq05-sh .bk {
  position: absolute;
  bottom: .55em;
  left: calc(1em + var(--x0));
  width: var(--w);
  height: var(--h);
  border-radius: .12em .12em .05em .05em;
  background: linear-gradient(90deg,rgba(0,0,0,.25),rgba(255,255,255,.18) 20%,transparent 45%,rgba(0,0,0,.2)),linear-gradient(transparent .5em,rgba(255,220,150,.8) .5em .62em,transparent .62em .8em,rgba(255,220,150,.8) .8em .86em,transparent .86em calc(100% - .7em),rgba(255,220,150,.7) calc(100% - .7em) calc(100% - .6em),transparent calc(100% - .6em)),var(--b);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
  transform-origin: 50% 100%;
  transition: left calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--d) * 0.03s / var(--k));
  animation: uvq05-sha calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1) both;
  animation-delay: calc(var(--d) * 0.03s / var(--k));
}

.uvq05-sh .bk b {
  position: absolute;
  left: 50%;
  top: 50%;
  font: 700 .45em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color: var(--t,rgba(255,255,255,.85));
  writing-mode: vertical-rl;
  transform: translate(-50%,-50%) rotate(180deg);
}

.uvq05-sh:has(.sg label:nth-of-type(2) input:checked) .bk {
  left: calc(1em + var(--x1));
  animation-name: uvq05-shb;
}

.uvq05-sh:has(.sg label:nth-of-type(3) input:checked) .bk {
  left: calc(1em + var(--x2));
  animation-name: uvq05-shc;
}

.uvq05-sh .pt {
  position: absolute;
  right: 1em;
  bottom: .55em;
  width: 1.8em;
  height: 1.6em;
  border-radius: .15em .15em .5em .5em;
  background: linear-gradient(#c96f45,#a8532f);
}

.uvq05-sh .pt i {
  position: absolute;
  bottom: 1.4em;
  left: 50%;
  width: .7em;
  height: 1.9em;
  margin-left: -.35em;
  border-radius: 50% 50% 50% 50%/80% 80% 20% 20%;
  background: var(--c2);
  transform-origin: 50% 100%;
}

.uvq05-sh .pt i:nth-child(1) {
  transform: rotate(-30deg);
}

.uvq05-sh .pt i:nth-child(3) {
  transform: rotate(32deg);
  height: 1.6em;
}

.uvq05-sh .pt i:nth-child(2) {
  height: 2.3em;
  background: color-mix(in srgb,var(--c2) 80%,#fff);
}

@keyframes uvq05-sha {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

@keyframes uvq05-shb {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

@keyframes uvq05-shc {
  40% {
    transform: translateY(-1.1em) rotate(-4deg);
  }
}

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

export default function FShelfSort() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#8b5e34",
          "--c2": "#3f7d4e",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq05-sh"><div className="hd"><span className="lb">Sort by</span><div className="sg" role="radiogroup" aria-label="Sort by"><label><input type="radio" name="uvq05-sh" checked={true} /><span>Height</span></label><label><input type="radio" name="uvq05-sh" /><span>Color</span></label><label><input type="radio" name="uvq05-sh" /><span>Year</span></label></div></div><div className="sf" aria-hidden="true"><i className="bk" style={{ "--h": "5.2em", "--w": "1.1em", "--b": "#c0392b", "--x0": "2.34em", "--x1": "0em", "--x2": "3.56em", "--d": "0" } as CSSProperties}><b>1987</b></i><i className="bk" style={{ "--h": "4.2em", "--w": "0.9em", "--b": "#2e86ab", "--x0": "7.02em", "--x1": "5.6em", "--x2": "5.9em", "--d": "1" } as CSSProperties}><b>2004</b></i><i className="bk" style={{ "--h": "6em", "--w": "1.3em", "--b": "#1e3d59", "--x0": "0em", "--x1": "6.62em", "--x2": "0em", "--d": "2" } as CSSProperties}><b>1952</b></i><i className="bk" style={{ "--h": "4.8em", "--w": "1em", "--b": "#f2a541", "--x0": "4.68em", "--x1": "2.34em", "--x2": "8.24em", "--d": "3", "--t": "#3a2a10" } as CSSProperties}><b>2019</b></i><i className="bk" style={{ "--h": "5.6em", "--w": "0.8em", "--b": "#3c896d", "--x0": "1.42em", "--x1": "3.46em", "--x2": "2.64em", "--d": "4" } as CSSProperties}><b>1971</b></i><i className="bk" style={{ "--h": "3.8em", "--w": "1.2em", "--b": "#9b5de5", "--x0": "8.04em", "--x1": "8.04em", "--x2": "6.92em", "--d": "5" } as CSSProperties}><b>2011</b></i><i className="bk" style={{ "--h": "5em", "--w": "1em", "--b": "#e76f51", "--x0": "3.56em", "--x1": "1.22em", "--x2": "4.78em", "--d": "6" } as CSSProperties}><b>1999</b></i><i className="bk" style={{ "--h": "4.4em", "--w": "1.1em", "--b": "#264653", "--x0": "5.8em", "--x1": "4.38em", "--x2": "1.42em", "--d": "7" } as CSSProperties}><b>1963</b></i><span className="pt"><i></i><i></i><i></i></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.
````
