# Camera mode strip radio

> The mode strip from a phone camera app: the chosen mode slides to the centre in yellow and the viewfinder changes with it.

- Category: [Radio buttons](https://library.aimran.es/components/radios)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-rd-cam-modes
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Modelled on the camera app of a phone, this radio group lines up five modes under a small viewfinder. The chosen word slides to the centre in yellow, the shutter turns red for video modes, a badge shows the frame rate or aperture, and portrait mode blurs the edges. It works for photo tools, creative apps and media pickers.

Swap the yellow with the main color and the recording red with the secondary one. The strip uses fixed widths per item, so keep each mode to one or two short words, and arrow keys move through it like any native radio group.

## Code

### HTML

```html
<fieldset class="uvq04-cam"><legend>Camera mode</legend><div class="ph"><div class="vf" aria-hidden="true"><i class="bk"></i><i class="gr"></i><i class="fc"></i><i class="pa"></i><b class="bd"></b></div><div class="md"><div class="tr"><label><input type="radio" name="uvq04-cam"><span>Slow-mo</span></label><label><input type="radio" name="uvq04-cam"><span>Video</span></label><label><input type="radio" name="uvq04-cam" checked><span>Photo</span></label><label><input type="radio" name="uvq04-cam"><span>Portrait</span></label><label><input type="radio" name="uvq04-cam"><span>Panorama</span></label></div></div><span class="sh" aria-hidden="true"><i></i></span></div></fieldset>
```

### CSS

```css
.uvq04-cam {
  --c1: #ffd60a;
  --c2: #ff3b30;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq04-cam {
  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;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.uvq04-cam legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq04-cam .ph {
  width: 18em;
  padding: .55em .55em .9em;
  border-radius: 1.6em;
  background: #0b0b0c;
  box-shadow: 0 1.2em 2.4em -1.2em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.06);
}

.uvq04-cam .vf {
  position: relative;
  height: 9.5em;
  border-radius: 1.1em;
  overflow: hidden;
  background: radial-gradient(circle at 72% 32%,#fff1c4 0 .8em,rgba(255,228,160,.5) 1em,transparent 2.6em),radial-gradient(120% 60% at 25% 104%,#3e6a4c 0 50%,transparent 51%),radial-gradient(90% 55% at 88% 106%,#2b5139 0 50%,transparent 51%),linear-gradient(#f4b98c,#e98d6c 45%,#9a5c7c);
}

.uvq04-cam .vf i,.uvq04-cam .bd {
  position: absolute;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-cam .bk {
  inset: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  -webkit-mask: radial-gradient(closest-side,transparent 55%,#000);
  mask: radial-gradient(closest-side,transparent 55%,#000);
  opacity: 0;
}

.uvq04-cam .gr {
  inset: 0;
  background: linear-gradient(90deg,transparent calc(33.3% - .5px),rgba(255,255,255,.4) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.4) 0 calc(66.6% + .5px),transparent 0),linear-gradient(transparent calc(33.3% - .5px),rgba(255,255,255,.4) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.4) 0 calc(66.6% + .5px),transparent 0);
}

.uvq04-cam .fc {
  left: 50%;
  top: 50%;
  width: 2.4em;
  height: 2.4em;
  margin: -1.2em;
  border: 1px solid var(--c1);
  animation: uvq04-cam-fc calc(2.4s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite;
}

.uvq04-cam .pa {
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: rgba(255,255,255,.85);
  opacity: 0;
}

.uvq04-cam .pa::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.3em;
  height: 1.3em;
  margin-top: -.65em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 .2em rgba(0,0,0,.25);
  animation: uvq04-cam-pa calc(3s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite alternate;
}

.uvq04-cam .bd {
  top: .6em;
  left: 50%;
  translate: -50% 0;
  padding: .3em .6em;
  border-radius: .45em;
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(0,0,0,.45);
}

.uvq04-cam .bd::after {
  content: var(--b,"4:3");
}

.uvq04-cam .md {
  position: relative;
  height: 2.3em;
  margin-top: .6em;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent);
  mask: linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent);
}

.uvq04-cam .tr {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  transform: translateX(calc(var(--i,2) * -6.2em - 3.1em));
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-cam label {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 6.2em;
  height: 2.3em;
  cursor: pointer;
}

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

.uvq04-cam label span {
  padding: .35em .5em;
  border-radius: .5em;
  font-size: .66em;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255,255,255,.62);
  transition: color calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-cam label:hover span {
  color: #fff;
}

.uvq04-cam input:checked + span {
  color: var(--c1);
}

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

.uvq04-cam .sh {
  display: grid;
  place-items: center;
  width: 3.3em;
  height: 3.3em;
  margin: .35em auto 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 .2em #fff;
}

.uvq04-cam .sh i {
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  background: #fff;
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.4s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq04-cam .sh:active i {
  transform: scale(.88);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .tr {
  --i: 0;
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .bd {
  --b: "120 FPS";
  background: var(--c2);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .sh i {
  background: var(--c2);
  transform: scale(.86);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .fc {
  opacity: 0;
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .tr {
  --i: 1;
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .bd {
  --b: "00:00";
  background: var(--c2);
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .sh i {
  background: var(--c2);
  transform: scale(.86);
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .fc {
  opacity: 0;
}

.uvq04-cam:has(label:nth-of-type(3) input:checked) .tr {
  --i: 2;
}

.uvq04-cam:has(label:nth-of-type(3) input:checked) .bd {
  --b: "4:3";
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .tr {
  --i: 3;
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .bd {
  --b: "f/1.8";
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .tr {
  --i: 4;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .bd {
  --b: "180°";
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .bk {
  opacity: 1;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .pa {
  opacity: 1;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .gr,.uvq04-cam:has(label:nth-of-type(5) input:checked) .fc {
  opacity: 0;
}

@keyframes uvq04-cam-fc {
  0%,100% {
    transform: scale(1);
  }
  50% {
    transform: scale(.9);
  }
}

@keyframes uvq04-cam-pa {
  to {
    left: calc(100% - 1.3em);
  }
}

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

### React

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

const css = `
.uvq04-cam {
  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;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.uvq04-cam legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq04-cam .ph {
  width: 18em;
  padding: .55em .55em .9em;
  border-radius: 1.6em;
  background: #0b0b0c;
  box-shadow: 0 1.2em 2.4em -1.2em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.06);
}

.uvq04-cam .vf {
  position: relative;
  height: 9.5em;
  border-radius: 1.1em;
  overflow: hidden;
  background: radial-gradient(circle at 72% 32%,#fff1c4 0 .8em,rgba(255,228,160,.5) 1em,transparent 2.6em),radial-gradient(120% 60% at 25% 104%,#3e6a4c 0 50%,transparent 51%),radial-gradient(90% 55% at 88% 106%,#2b5139 0 50%,transparent 51%),linear-gradient(#f4b98c,#e98d6c 45%,#9a5c7c);
}

.uvq04-cam .vf i,.uvq04-cam .bd {
  position: absolute;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-cam .bk {
  inset: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  -webkit-mask: radial-gradient(closest-side,transparent 55%,#000);
  mask: radial-gradient(closest-side,transparent 55%,#000);
  opacity: 0;
}

.uvq04-cam .gr {
  inset: 0;
  background: linear-gradient(90deg,transparent calc(33.3% - .5px),rgba(255,255,255,.4) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.4) 0 calc(66.6% + .5px),transparent 0),linear-gradient(transparent calc(33.3% - .5px),rgba(255,255,255,.4) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.4) 0 calc(66.6% + .5px),transparent 0);
}

.uvq04-cam .fc {
  left: 50%;
  top: 50%;
  width: 2.4em;
  height: 2.4em;
  margin: -1.2em;
  border: 1px solid var(--c1);
  animation: uvq04-cam-fc calc(2.4s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite;
}

.uvq04-cam .pa {
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: rgba(255,255,255,.85);
  opacity: 0;
}

.uvq04-cam .pa::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.3em;
  height: 1.3em;
  margin-top: -.65em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 .2em rgba(0,0,0,.25);
  animation: uvq04-cam-pa calc(3s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite alternate;
}

.uvq04-cam .bd {
  top: .6em;
  left: 50%;
  translate: -50% 0;
  padding: .3em .6em;
  border-radius: .45em;
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(0,0,0,.45);
}

.uvq04-cam .bd::after {
  content: var(--b,"4:3");
}

.uvq04-cam .md {
  position: relative;
  height: 2.3em;
  margin-top: .6em;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent);
  mask: linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent);
}

.uvq04-cam .tr {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  transform: translateX(calc(var(--i,2) * -6.2em - 3.1em));
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-cam label {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 6.2em;
  height: 2.3em;
  cursor: pointer;
}

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

.uvq04-cam label span {
  padding: .35em .5em;
  border-radius: .5em;
  font-size: .66em;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255,255,255,.62);
  transition: color calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-cam label:hover span {
  color: #fff;
}

.uvq04-cam input:checked + span {
  color: var(--c1);
}

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

.uvq04-cam .sh {
  display: grid;
  place-items: center;
  width: 3.3em;
  height: 3.3em;
  margin: .35em auto 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 .2em #fff;
}

.uvq04-cam .sh i {
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  background: #fff;
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.4s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq04-cam .sh:active i {
  transform: scale(.88);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .tr {
  --i: 0;
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .bd {
  --b: "120 FPS";
  background: var(--c2);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .sh i {
  background: var(--c2);
  transform: scale(.86);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .fc {
  opacity: 0;
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .tr {
  --i: 1;
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .bd {
  --b: "00:00";
  background: var(--c2);
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .sh i {
  background: var(--c2);
  transform: scale(.86);
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .fc {
  opacity: 0;
}

.uvq04-cam:has(label:nth-of-type(3) input:checked) .tr {
  --i: 2;
}

.uvq04-cam:has(label:nth-of-type(3) input:checked) .bd {
  --b: "4:3";
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .tr {
  --i: 3;
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .bd {
  --b: "f/1.8";
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .tr {
  --i: 4;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .bd {
  --b: "180°";
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .bk {
  opacity: 1;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .pa {
  opacity: 1;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .gr,.uvq04-cam:has(label:nth-of-type(5) input:checked) .fc {
  opacity: 0;
}

@keyframes uvq04-cam-fc {
  0%,100% {
    transform: scale(1);
  }
  50% {
    transform: scale(.9);
  }
}

@keyframes uvq04-cam-pa {
  to {
    left: calc(100% - 1.3em);
  }
}

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

export default function RdCamModes() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#ffd60a",
          "--c2": "#ff3b30",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq04-cam"><legend>Camera mode</legend><div className="ph"><div className="vf" aria-hidden="true"><i className="bk"></i><i className="gr"></i><i className="fc"></i><i className="pa"></i><b className="bd"></b></div><div className="md"><div className="tr"><label><input type="radio" name="uvq04-cam" /><span>Slow-mo</span></label><label><input type="radio" name="uvq04-cam" /><span>Video</span></label><label><input type="radio" name="uvq04-cam" checked={true} /><span>Photo</span></label><label><input type="radio" name="uvq04-cam" /><span>Portrait</span></label><label><input type="radio" name="uvq04-cam" /><span>Panorama</span></label></div></div><span className="sh" aria-hidden="true"><i></i></span></div></fieldset>
      </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 “Camera mode strip radio” block (Radio buttons) from AIMRAN Library to my project.

## What it is
The mode strip from a phone camera app: the chosen mode slides to the centre in yellow and the viewfinder changes with it.

## Chosen settings
- Main color: #ffd60a
- Secondary color: #ff3b30
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Modo de cámara"

## 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 = `
.uvq04-cam {
  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;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.uvq04-cam legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq04-cam .ph {
  width: 18em;
  padding: .55em .55em .9em;
  border-radius: 1.6em;
  background: #0b0b0c;
  box-shadow: 0 1.2em 2.4em -1.2em rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.06);
}

.uvq04-cam .vf {
  position: relative;
  height: 9.5em;
  border-radius: 1.1em;
  overflow: hidden;
  background: radial-gradient(circle at 72% 32%,#fff1c4 0 .8em,rgba(255,228,160,.5) 1em,transparent 2.6em),radial-gradient(120% 60% at 25% 104%,#3e6a4c 0 50%,transparent 51%),radial-gradient(90% 55% at 88% 106%,#2b5139 0 50%,transparent 51%),linear-gradient(#f4b98c,#e98d6c 45%,#9a5c7c);
}

.uvq04-cam .vf i,.uvq04-cam .bd {
  position: absolute;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-cam .bk {
  inset: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  -webkit-mask: radial-gradient(closest-side,transparent 55%,#000);
  mask: radial-gradient(closest-side,transparent 55%,#000);
  opacity: 0;
}

.uvq04-cam .gr {
  inset: 0;
  background: linear-gradient(90deg,transparent calc(33.3% - .5px),rgba(255,255,255,.4) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.4) 0 calc(66.6% + .5px),transparent 0),linear-gradient(transparent calc(33.3% - .5px),rgba(255,255,255,.4) 0 calc(33.3% + .5px),transparent 0 calc(66.6% - .5px),rgba(255,255,255,.4) 0 calc(66.6% + .5px),transparent 0);
}

.uvq04-cam .fc {
  left: 50%;
  top: 50%;
  width: 2.4em;
  height: 2.4em;
  margin: -1.2em;
  border: 1px solid var(--c1);
  animation: uvq04-cam-fc calc(2.4s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite;
}

.uvq04-cam .pa {
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: rgba(255,255,255,.85);
  opacity: 0;
}

.uvq04-cam .pa::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.3em;
  height: 1.3em;
  margin-top: -.65em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 .2em rgba(0,0,0,.25);
  animation: uvq04-cam-pa calc(3s / var(--k)) cubic-bezier(.25,.1,.25,1) infinite alternate;
}

.uvq04-cam .bd {
  top: .6em;
  left: 50%;
  translate: -50% 0;
  padding: .3em .6em;
  border-radius: .45em;
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(0,0,0,.45);
}

.uvq04-cam .bd::after {
  content: var(--b,"4:3");
}

.uvq04-cam .md {
  position: relative;
  height: 2.3em;
  margin-top: .6em;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent);
  mask: linear-gradient(90deg,transparent,#000 22%,#000 78%,transparent);
}

.uvq04-cam .tr {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  transform: translateX(calc(var(--i,2) * -6.2em - 3.1em));
  transition: transform calc(0.45s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq04-cam label {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 6.2em;
  height: 2.3em;
  cursor: pointer;
}

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

.uvq04-cam label span {
  padding: .35em .5em;
  border-radius: .5em;
  font-size: .66em;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255,255,255,.62);
  transition: color calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq04-cam label:hover span {
  color: #fff;
}

.uvq04-cam input:checked + span {
  color: var(--c1);
}

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

.uvq04-cam .sh {
  display: grid;
  place-items: center;
  width: 3.3em;
  height: 3.3em;
  margin: .35em auto 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 .2em #fff;
}

.uvq04-cam .sh i {
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  background: #fff;
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.4s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq04-cam .sh:active i {
  transform: scale(.88);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .tr {
  --i: 0;
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .bd {
  --b: "120 FPS";
  background: var(--c2);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .sh i {
  background: var(--c2);
  transform: scale(.86);
}

.uvq04-cam:has(label:nth-of-type(1) input:checked) .fc {
  opacity: 0;
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .tr {
  --i: 1;
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .bd {
  --b: "00:00";
  background: var(--c2);
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .sh i {
  background: var(--c2);
  transform: scale(.86);
}

.uvq04-cam:has(label:nth-of-type(2) input:checked) .fc {
  opacity: 0;
}

.uvq04-cam:has(label:nth-of-type(3) input:checked) .tr {
  --i: 2;
}

.uvq04-cam:has(label:nth-of-type(3) input:checked) .bd {
  --b: "4:3";
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .tr {
  --i: 3;
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .bd {
  --b: "f/1.8";
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .tr {
  --i: 4;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .bd {
  --b: "180°";
}

.uvq04-cam:has(label:nth-of-type(4) input:checked) .bk {
  opacity: 1;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .pa {
  opacity: 1;
}

.uvq04-cam:has(label:nth-of-type(5) input:checked) .gr,.uvq04-cam:has(label:nth-of-type(5) input:checked) .fc {
  opacity: 0;
}

@keyframes uvq04-cam-fc {
  0%,100% {
    transform: scale(1);
  }
  50% {
    transform: scale(.9);
  }
}

@keyframes uvq04-cam-pa {
  to {
    left: calc(100% - 1.3em);
  }
}

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

export default function RdCamModes() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#ffd60a",
          "--c2": "#ff3b30",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq04-cam"><legend>Camera mode</legend><div className="ph"><div className="vf" aria-hidden="true"><i className="bk"></i><i className="gr"></i><i className="fc"></i><i className="pa"></i><b className="bd"></b></div><div className="md"><div className="tr"><label><input type="radio" name="uvq04-cam" /><span>Slow-mo</span></label><label><input type="radio" name="uvq04-cam" /><span>Video</span></label><label><input type="radio" name="uvq04-cam" checked={true} /><span>Photo</span></label><label><input type="radio" name="uvq04-cam" /><span>Portrait</span></label><label><input type="radio" name="uvq04-cam" /><span>Panorama</span></label></div></div><span className="sh" aria-hidden="true"><i></i></span></div></fieldset>
      </div>
    </>
  );
}
```

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