# Crookes radiometer loader

> Four black and silver vanes spin inside a glass bulb while sunlight falls on them.

- Category: [Loaders](https://library.aimran.es/components/loaders)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-ld-crookes-radiometer
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

The light mill from the physics classroom, built with CSS 3D: four vanes, black on one side and polished on the other, turn on a needle inside a glass bulb with a neck and a foot. Backface visibility swaps the faces as they rotate, and a soft sun pulses at the corner. It suits solar energy, science and education sites.

The main color sets the sunlight and the second tints the glass. Use it while data from sensors or a calculation loads, and give it some space at the top left so the light glow is visible.

## Code

### HTML

```html
<div class="uvq10-rdm" role="status"><span class="sr">Loading</span><i class="sun" aria-hidden="true"></i><i class="ft" aria-hidden="true"></i><i class="nk" aria-hidden="true"></i><div class="bulb" aria-hidden="true"><i class="ax"></i><div class="rt"><span class="v" style="--i:0"><i class="f"></i><i class="b"></i></span><span class="v" style="--i:1"><i class="f"></i><i class="b"></i></span><span class="v" style="--i:2"><i class="f"></i><i class="b"></i></span><span class="v" style="--i:3"><i class="f"></i><i class="b"></i></span></div><i class="gl"></i></div></div>
```

### CSS

```css
.uvq10-rdm {
  --c1: #ffb703;
  --c2: #8ecae6;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq10-rdm {
  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;
  position: relative;
  width: 7.6em;
  height: 9em;
}

.uvq10-rdm .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.uvq10-rdm .sun {
  position: absolute;
  left: -1.4em;
  top: -1.4em;
  width: 5em;
  height: 5em;
  border-radius: 50%;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 85%,#fff) 0 .55em,color-mix(in srgb,var(--c1) 35%,transparent) .9em,transparent 2.4em);
  animation: uvq10-rdm-s calc(3s / var(--k)) ease-in-out infinite;
}

.uvq10-rdm .bulb {
  position: absolute;
  left: .8em;
  top: .4em;
  width: 6em;
  height: 6em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  perspective: 14em;
  background: radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--c2) 8%,transparent),color-mix(in srgb,var(--c2) 26%,transparent) 70%,color-mix(in srgb,var(--c2) 48%,transparent));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--c2) 55%,color-mix(in srgb,var(--fg) 30%,transparent)),0 1em 1.6em -1.2em rgba(0,0,0,.45);
}

.uvq10-rdm .ax {
  position: absolute;
  left: 50%;
  top: 3em;
  bottom: -.2em;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(#cbd5e1,#64748b);
}

.uvq10-rdm .rt {
  position: relative;
  width: 0;
  height: 1.5em;
  transform-style: preserve-3d;
  transform: rotateX(-14deg);
  animation: uvq10-rdm calc(1.1s / var(--k)) linear infinite;
}

.uvq10-rdm .v {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.45em;
  height: 1.5em;
  transform-origin: 0 50%;
  transform: rotateY(calc(var(--i) * 90deg)) translateX(.38em);
  transform-style: preserve-3d;
}

.uvq10-rdm .v::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: .38em;
  height: 1px;
  background: #94a3b8;
}

.uvq10-rdm .v i {
  position: absolute;
  inset: 0;
  border-radius: .06em;
  backface-visibility: hidden;
}

.uvq10-rdm .f {
  background: linear-gradient(135deg,#2f2f33,#0b0b0c);
}

.uvq10-rdm .b {
  background: linear-gradient(135deg,#f8fafc,#a3acb8 55%,#e5e7eb);
  transform: rotateY(180deg);
}

.uvq10-rdm .gl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 24%,rgba(255,255,255,.6) 0 .22em,transparent .9em),radial-gradient(circle at 72% 78%,rgba(255,255,255,.12),transparent 1.4em);
}

.uvq10-rdm .nk {
  position: absolute;
  left: 50%;
  top: 6.1em;
  width: .9em;
  height: 1.6em;
  margin-left: -.05em;
  transform: translateX(-50%);
  border-radius: 0 0 .2em .2em;
  background: linear-gradient(90deg,color-mix(in srgb,var(--c2) 45%,transparent),color-mix(in srgb,var(--c2) 15%,transparent),color-mix(in srgb,var(--c2) 50%,transparent));
}

.uvq10-rdm .ft {
  position: absolute;
  left: 50%;
  top: 7.5em;
  width: 4.4em;
  height: 1.2em;
  margin-left: -1.8em;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--c2) 30%,transparent),color-mix(in srgb,var(--c2) 55%,transparent) 70%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--c2) 55%,transparent),0 .4em .6em -.3em rgba(0,0,0,.35);
}

@keyframes uvq10-rdm {
  from {
    transform: rotateX(-14deg) rotateY(0);
  }
  to {
    transform: rotateX(-14deg) rotateY(-360deg);
  }
}

@keyframes uvq10-rdm-s {
  50% {
    opacity: .7;
    transform: scale(.92);
  }
}

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

### React

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

const css = `
.uvq10-rdm {
  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;
  position: relative;
  width: 7.6em;
  height: 9em;
}

.uvq10-rdm .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.uvq10-rdm .sun {
  position: absolute;
  left: -1.4em;
  top: -1.4em;
  width: 5em;
  height: 5em;
  border-radius: 50%;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 85%,#fff) 0 .55em,color-mix(in srgb,var(--c1) 35%,transparent) .9em,transparent 2.4em);
  animation: uvq10-rdm-s calc(3s / var(--k)) ease-in-out infinite;
}

.uvq10-rdm .bulb {
  position: absolute;
  left: .8em;
  top: .4em;
  width: 6em;
  height: 6em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  perspective: 14em;
  background: radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--c2) 8%,transparent),color-mix(in srgb,var(--c2) 26%,transparent) 70%,color-mix(in srgb,var(--c2) 48%,transparent));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--c2) 55%,color-mix(in srgb,var(--fg) 30%,transparent)),0 1em 1.6em -1.2em rgba(0,0,0,.45);
}

.uvq10-rdm .ax {
  position: absolute;
  left: 50%;
  top: 3em;
  bottom: -.2em;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(#cbd5e1,#64748b);
}

.uvq10-rdm .rt {
  position: relative;
  width: 0;
  height: 1.5em;
  transform-style: preserve-3d;
  transform: rotateX(-14deg);
  animation: uvq10-rdm calc(1.1s / var(--k)) linear infinite;
}

.uvq10-rdm .v {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.45em;
  height: 1.5em;
  transform-origin: 0 50%;
  transform: rotateY(calc(var(--i) * 90deg)) translateX(.38em);
  transform-style: preserve-3d;
}

.uvq10-rdm .v::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: .38em;
  height: 1px;
  background: #94a3b8;
}

.uvq10-rdm .v i {
  position: absolute;
  inset: 0;
  border-radius: .06em;
  backface-visibility: hidden;
}

.uvq10-rdm .f {
  background: linear-gradient(135deg,#2f2f33,#0b0b0c);
}

.uvq10-rdm .b {
  background: linear-gradient(135deg,#f8fafc,#a3acb8 55%,#e5e7eb);
  transform: rotateY(180deg);
}

.uvq10-rdm .gl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 24%,rgba(255,255,255,.6) 0 .22em,transparent .9em),radial-gradient(circle at 72% 78%,rgba(255,255,255,.12),transparent 1.4em);
}

.uvq10-rdm .nk {
  position: absolute;
  left: 50%;
  top: 6.1em;
  width: .9em;
  height: 1.6em;
  margin-left: -.05em;
  transform: translateX(-50%);
  border-radius: 0 0 .2em .2em;
  background: linear-gradient(90deg,color-mix(in srgb,var(--c2) 45%,transparent),color-mix(in srgb,var(--c2) 15%,transparent),color-mix(in srgb,var(--c2) 50%,transparent));
}

.uvq10-rdm .ft {
  position: absolute;
  left: 50%;
  top: 7.5em;
  width: 4.4em;
  height: 1.2em;
  margin-left: -1.8em;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--c2) 30%,transparent),color-mix(in srgb,var(--c2) 55%,transparent) 70%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--c2) 55%,transparent),0 .4em .6em -.3em rgba(0,0,0,.35);
}

@keyframes uvq10-rdm {
  from {
    transform: rotateX(-14deg) rotateY(0);
  }
  to {
    transform: rotateX(-14deg) rotateY(-360deg);
  }
}

@keyframes uvq10-rdm-s {
  50% {
    opacity: .7;
    transform: scale(.92);
  }
}

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

export default function LdCrookesRadiometer() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#ffb703",
          "--c2": "#8ecae6",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq10-rdm" role="status"><span className="sr">Loading</span><i className="sun" aria-hidden="true"></i><i className="ft" aria-hidden="true"></i><i className="nk" aria-hidden="true"></i><div className="bulb" aria-hidden="true"><i className="ax"></i><div className="rt"><span className="v" style={{ "--i": "0" } as CSSProperties}><i className="f"></i><i className="b"></i></span><span className="v" style={{ "--i": "1" } as CSSProperties}><i className="f"></i><i className="b"></i></span><span className="v" style={{ "--i": "2" } as CSSProperties}><i className="f"></i><i className="b"></i></span><span className="v" style={{ "--i": "3" } as CSSProperties}><i className="f"></i><i className="b"></i></span></div><i className="gl"></i></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 “Crookes radiometer loader” block (Loaders) from AIMRAN Library to my project.

## What it is
Four black and silver vanes spin inside a glass bulb while sunlight falls on them.

## Chosen settings
- Main color: #ffb703
- Secondary color: #8ecae6
- 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
import type { CSSProperties } from "react";

const css = `
.uvq10-rdm {
  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;
  position: relative;
  width: 7.6em;
  height: 9em;
}

.uvq10-rdm .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.uvq10-rdm .sun {
  position: absolute;
  left: -1.4em;
  top: -1.4em;
  width: 5em;
  height: 5em;
  border-radius: 50%;
  background: radial-gradient(circle,color-mix(in srgb,var(--c1) 85%,#fff) 0 .55em,color-mix(in srgb,var(--c1) 35%,transparent) .9em,transparent 2.4em);
  animation: uvq10-rdm-s calc(3s / var(--k)) ease-in-out infinite;
}

.uvq10-rdm .bulb {
  position: absolute;
  left: .8em;
  top: .4em;
  width: 6em;
  height: 6em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  perspective: 14em;
  background: radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--c2) 8%,transparent),color-mix(in srgb,var(--c2) 26%,transparent) 70%,color-mix(in srgb,var(--c2) 48%,transparent));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--c2) 55%,color-mix(in srgb,var(--fg) 30%,transparent)),0 1em 1.6em -1.2em rgba(0,0,0,.45);
}

.uvq10-rdm .ax {
  position: absolute;
  left: 50%;
  top: 3em;
  bottom: -.2em;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(#cbd5e1,#64748b);
}

.uvq10-rdm .rt {
  position: relative;
  width: 0;
  height: 1.5em;
  transform-style: preserve-3d;
  transform: rotateX(-14deg);
  animation: uvq10-rdm calc(1.1s / var(--k)) linear infinite;
}

.uvq10-rdm .v {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.45em;
  height: 1.5em;
  transform-origin: 0 50%;
  transform: rotateY(calc(var(--i) * 90deg)) translateX(.38em);
  transform-style: preserve-3d;
}

.uvq10-rdm .v::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: .38em;
  height: 1px;
  background: #94a3b8;
}

.uvq10-rdm .v i {
  position: absolute;
  inset: 0;
  border-radius: .06em;
  backface-visibility: hidden;
}

.uvq10-rdm .f {
  background: linear-gradient(135deg,#2f2f33,#0b0b0c);
}

.uvq10-rdm .b {
  background: linear-gradient(135deg,#f8fafc,#a3acb8 55%,#e5e7eb);
  transform: rotateY(180deg);
}

.uvq10-rdm .gl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 24%,rgba(255,255,255,.6) 0 .22em,transparent .9em),radial-gradient(circle at 72% 78%,rgba(255,255,255,.12),transparent 1.4em);
}

.uvq10-rdm .nk {
  position: absolute;
  left: 50%;
  top: 6.1em;
  width: .9em;
  height: 1.6em;
  margin-left: -.05em;
  transform: translateX(-50%);
  border-radius: 0 0 .2em .2em;
  background: linear-gradient(90deg,color-mix(in srgb,var(--c2) 45%,transparent),color-mix(in srgb,var(--c2) 15%,transparent),color-mix(in srgb,var(--c2) 50%,transparent));
}

.uvq10-rdm .ft {
  position: absolute;
  left: 50%;
  top: 7.5em;
  width: 4.4em;
  height: 1.2em;
  margin-left: -1.8em;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--c2) 30%,transparent),color-mix(in srgb,var(--c2) 55%,transparent) 70%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--c2) 55%,transparent),0 .4em .6em -.3em rgba(0,0,0,.35);
}

@keyframes uvq10-rdm {
  from {
    transform: rotateX(-14deg) rotateY(0);
  }
  to {
    transform: rotateX(-14deg) rotateY(-360deg);
  }
}

@keyframes uvq10-rdm-s {
  50% {
    opacity: .7;
    transform: scale(.92);
  }
}

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

export default function LdCrookesRadiometer() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#ffb703",
          "--c2": "#8ecae6",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq10-rdm" role="status"><span className="sr">Loading</span><i className="sun" aria-hidden="true"></i><i className="ft" aria-hidden="true"></i><i className="nk" aria-hidden="true"></i><div className="bulb" aria-hidden="true"><i className="ax"></i><div className="rt"><span className="v" style={{ "--i": "0" } as CSSProperties}><i className="f"></i><i className="b"></i></span><span className="v" style={{ "--i": "1" } as CSSProperties}><i className="f"></i><i className="b"></i></span><span className="v" style={{ "--i": "2" } as CSSProperties}><i className="f"></i><i className="b"></i></span><span className="v" style={{ "--i": "3" } as CSSProperties}><i className="f"></i><i className="b"></i></span></div><i className="gl"></i></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.
````
