# Washing machine spin loader

> A front loader shakes slightly as the drum turns the laundry round and the water sways behind the glass.

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

## Where to use it

A white enamel washing machine with a control knob, a small display and a status light. Behind the chrome porthole the perforated drum spins the clothes while the water level rolls in place, and the whole machine vibrates a little. It suits laundry services, home appliance shops, cleaning apps and long background jobs.

The main color sets the water and the second one item of clothing, the others stay neutral. Use it for jobs that take a while, like a backup or an export, with a remaining time next to it.

## Code

### HTML

```html
<div class="uvq10-wsh" role="status"><span class="sr">Loading</span><div class="pn" aria-hidden="true"><i class="kn"></i><span class="dp">0:42</span><i class="lt"></i></div><div class="dr" aria-hidden="true"><div class="gl"><div class="dm"><i class="cl a"></i><i class="cl b"></i><i class="cl c"></i></div><i class="w"></i><i class="rf"></i></div></div></div>
```

### CSS

```css
.uvq10-wsh {
  --c1: #4cc9f0;
  --c2: #ff6b6b;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq10-wsh {
  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: 8.8em;
  border-radius: .8em;
  background: linear-gradient(180deg,#fdfdfc,#e2e3df);
  box-shadow: 0 0 0 1px rgba(0,0,0,.1),0 1em 1.8em -1em rgba(0,0,0,.55),inset 0 -.3em 0 #d2d4cf;
  animation: uvq10-wsh-v calc(0.18s / var(--k)) linear infinite;
}

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

.uvq10-wsh .pn {
  display: flex;
  align-items: center;
  gap: .5em;
  height: 1.7em;
  padding: 0 .7em;
  border-bottom: 1px solid rgba(0,0,0,.1);
}

.uvq10-wsh .kn {
  width: .95em;
  height: .95em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#fff,#c7c9c4);
  box-shadow: 0 .1em .2em rgba(0,0,0,.3),inset 0 0 0 .08em #b5b7b2;
}

.uvq10-wsh .dp {
  padding: .15em .35em;
  border-radius: .2em;
  background: #1d2b2a;
  color: #7ef0c8;
  font: 700 .62em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .05em;
}

.uvq10-wsh .lt {
  width: .32em;
  height: .32em;
  margin-left: auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 .4em #22c55e;
  animation: uvq10-wsh-l calc(1s / var(--k)) steps(1) infinite;
}

.uvq10-wsh .dr {
  display: grid;
  place-items: center;
  height: 6.9em;
}

.uvq10-wsh .gl {
  position: relative;
  width: 5.4em;
  height: 5.4em;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle,#3a3f45 0 .5em,#22262b .55em);
  box-shadow: 0 0 0 .35em #c8ccd1,0 0 0 .45em #8d939b,0 0 0 .55em #eceeef,0 .4em .8em .4em rgba(0,0,0,.25);
}

.uvq10-wsh .dm {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.12) 0 .05em,transparent .07em) 0 0/.45em .45em;
  animation: uvq10-wsh-r calc(1.4s / var(--k)) linear infinite;
}

.uvq10-wsh .cl {
  position: absolute;
  border-radius: 45% 55% 50% 40%;
}

.uvq10-wsh .cl.a {
  left: .6em;
  top: 2.9em;
  width: 1.8em;
  height: 1em;
  background: var(--c2);
  transform: rotate(-20deg);
}

.uvq10-wsh .cl.b {
  left: 2.8em;
  top: .6em;
  width: 1.5em;
  height: 1.1em;
  background: #f4d35e;
  transform: rotate(30deg);
}

.uvq10-wsh .cl.c {
  left: 3em;
  top: 3.3em;
  width: 1.3em;
  height: .8em;
  background: #f1f5f9;
  transform: rotate(60deg);
}

.uvq10-wsh .w {
  position: absolute;
  left: -50%;
  top: 56%;
  width: 200%;
  height: 200%;
  border-radius: 42%;
  background: color-mix(in srgb,var(--c1) 55%,transparent);
  animation: uvq10-wsh-r calc(3s / var(--k)) linear infinite;
}

.uvq10-wsh .rf {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(140deg,rgba(255,255,255,.5),transparent 32%),radial-gradient(circle at 70% 80%,rgba(255,255,255,.18),transparent 30%);
  pointer-events: none;
}

@keyframes uvq10-wsh-r {
  to {
    transform: rotate(1turn);
  }
}

@keyframes uvq10-wsh-v {
  0%,100% {
    transform: translate(0,0);
  }
  25% {
    transform: translate(.025em,-.02em);
  }
  50% {
    transform: translate(-.02em,.02em);
  }
  75% {
    transform: translate(.02em,.01em);
  }
}

@keyframes uvq10-wsh-l {
  50% {
    opacity: .25;
  }
}

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

### React

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

const css = `
.uvq10-wsh {
  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: 8.8em;
  border-radius: .8em;
  background: linear-gradient(180deg,#fdfdfc,#e2e3df);
  box-shadow: 0 0 0 1px rgba(0,0,0,.1),0 1em 1.8em -1em rgba(0,0,0,.55),inset 0 -.3em 0 #d2d4cf;
  animation: uvq10-wsh-v calc(0.18s / var(--k)) linear infinite;
}

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

.uvq10-wsh .pn {
  display: flex;
  align-items: center;
  gap: .5em;
  height: 1.7em;
  padding: 0 .7em;
  border-bottom: 1px solid rgba(0,0,0,.1);
}

.uvq10-wsh .kn {
  width: .95em;
  height: .95em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#fff,#c7c9c4);
  box-shadow: 0 .1em .2em rgba(0,0,0,.3),inset 0 0 0 .08em #b5b7b2;
}

.uvq10-wsh .dp {
  padding: .15em .35em;
  border-radius: .2em;
  background: #1d2b2a;
  color: #7ef0c8;
  font: 700 .62em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .05em;
}

.uvq10-wsh .lt {
  width: .32em;
  height: .32em;
  margin-left: auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 .4em #22c55e;
  animation: uvq10-wsh-l calc(1s / var(--k)) steps(1) infinite;
}

.uvq10-wsh .dr {
  display: grid;
  place-items: center;
  height: 6.9em;
}

.uvq10-wsh .gl {
  position: relative;
  width: 5.4em;
  height: 5.4em;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle,#3a3f45 0 .5em,#22262b .55em);
  box-shadow: 0 0 0 .35em #c8ccd1,0 0 0 .45em #8d939b,0 0 0 .55em #eceeef,0 .4em .8em .4em rgba(0,0,0,.25);
}

.uvq10-wsh .dm {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.12) 0 .05em,transparent .07em) 0 0/.45em .45em;
  animation: uvq10-wsh-r calc(1.4s / var(--k)) linear infinite;
}

.uvq10-wsh .cl {
  position: absolute;
  border-radius: 45% 55% 50% 40%;
}

.uvq10-wsh .cl.a {
  left: .6em;
  top: 2.9em;
  width: 1.8em;
  height: 1em;
  background: var(--c2);
  transform: rotate(-20deg);
}

.uvq10-wsh .cl.b {
  left: 2.8em;
  top: .6em;
  width: 1.5em;
  height: 1.1em;
  background: #f4d35e;
  transform: rotate(30deg);
}

.uvq10-wsh .cl.c {
  left: 3em;
  top: 3.3em;
  width: 1.3em;
  height: .8em;
  background: #f1f5f9;
  transform: rotate(60deg);
}

.uvq10-wsh .w {
  position: absolute;
  left: -50%;
  top: 56%;
  width: 200%;
  height: 200%;
  border-radius: 42%;
  background: color-mix(in srgb,var(--c1) 55%,transparent);
  animation: uvq10-wsh-r calc(3s / var(--k)) linear infinite;
}

.uvq10-wsh .rf {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(140deg,rgba(255,255,255,.5),transparent 32%),radial-gradient(circle at 70% 80%,rgba(255,255,255,.18),transparent 30%);
  pointer-events: none;
}

@keyframes uvq10-wsh-r {
  to {
    transform: rotate(1turn);
  }
}

@keyframes uvq10-wsh-v {
  0%,100% {
    transform: translate(0,0);
  }
  25% {
    transform: translate(.025em,-.02em);
  }
  50% {
    transform: translate(-.02em,.02em);
  }
  75% {
    transform: translate(.02em,.01em);
  }
}

@keyframes uvq10-wsh-l {
  50% {
    opacity: .25;
  }
}

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

export default function LdWashingDrum() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#4cc9f0",
          "--c2": "#ff6b6b",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq10-wsh" role="status"><span className="sr">Loading</span><div className="pn" aria-hidden="true"><i className="kn"></i><span className="dp">0:42</span><i className="lt"></i></div><div className="dr" aria-hidden="true"><div className="gl"><div className="dm"><i className="cl a"></i><i className="cl b"></i><i className="cl c"></i></div><i className="w"></i><i className="rf"></i></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 “Washing machine spin loader” block (Loaders) from AIMRAN Library to my project.

## What it is
A front loader shakes slightly as the drum turns the laundry round and the water sways behind the glass.

## Chosen settings
- Main color: #4cc9f0
- Secondary color: #ff6b6b
- 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-wsh {
  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: 8.8em;
  border-radius: .8em;
  background: linear-gradient(180deg,#fdfdfc,#e2e3df);
  box-shadow: 0 0 0 1px rgba(0,0,0,.1),0 1em 1.8em -1em rgba(0,0,0,.55),inset 0 -.3em 0 #d2d4cf;
  animation: uvq10-wsh-v calc(0.18s / var(--k)) linear infinite;
}

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

.uvq10-wsh .pn {
  display: flex;
  align-items: center;
  gap: .5em;
  height: 1.7em;
  padding: 0 .7em;
  border-bottom: 1px solid rgba(0,0,0,.1);
}

.uvq10-wsh .kn {
  width: .95em;
  height: .95em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#fff,#c7c9c4);
  box-shadow: 0 .1em .2em rgba(0,0,0,.3),inset 0 0 0 .08em #b5b7b2;
}

.uvq10-wsh .dp {
  padding: .15em .35em;
  border-radius: .2em;
  background: #1d2b2a;
  color: #7ef0c8;
  font: 700 .62em/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing: .05em;
}

.uvq10-wsh .lt {
  width: .32em;
  height: .32em;
  margin-left: auto;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 .4em #22c55e;
  animation: uvq10-wsh-l calc(1s / var(--k)) steps(1) infinite;
}

.uvq10-wsh .dr {
  display: grid;
  place-items: center;
  height: 6.9em;
}

.uvq10-wsh .gl {
  position: relative;
  width: 5.4em;
  height: 5.4em;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle,#3a3f45 0 .5em,#22262b .55em);
  box-shadow: 0 0 0 .35em #c8ccd1,0 0 0 .45em #8d939b,0 0 0 .55em #eceeef,0 .4em .8em .4em rgba(0,0,0,.25);
}

.uvq10-wsh .dm {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.12) 0 .05em,transparent .07em) 0 0/.45em .45em;
  animation: uvq10-wsh-r calc(1.4s / var(--k)) linear infinite;
}

.uvq10-wsh .cl {
  position: absolute;
  border-radius: 45% 55% 50% 40%;
}

.uvq10-wsh .cl.a {
  left: .6em;
  top: 2.9em;
  width: 1.8em;
  height: 1em;
  background: var(--c2);
  transform: rotate(-20deg);
}

.uvq10-wsh .cl.b {
  left: 2.8em;
  top: .6em;
  width: 1.5em;
  height: 1.1em;
  background: #f4d35e;
  transform: rotate(30deg);
}

.uvq10-wsh .cl.c {
  left: 3em;
  top: 3.3em;
  width: 1.3em;
  height: .8em;
  background: #f1f5f9;
  transform: rotate(60deg);
}

.uvq10-wsh .w {
  position: absolute;
  left: -50%;
  top: 56%;
  width: 200%;
  height: 200%;
  border-radius: 42%;
  background: color-mix(in srgb,var(--c1) 55%,transparent);
  animation: uvq10-wsh-r calc(3s / var(--k)) linear infinite;
}

.uvq10-wsh .rf {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(140deg,rgba(255,255,255,.5),transparent 32%),radial-gradient(circle at 70% 80%,rgba(255,255,255,.18),transparent 30%);
  pointer-events: none;
}

@keyframes uvq10-wsh-r {
  to {
    transform: rotate(1turn);
  }
}

@keyframes uvq10-wsh-v {
  0%,100% {
    transform: translate(0,0);
  }
  25% {
    transform: translate(.025em,-.02em);
  }
  50% {
    transform: translate(-.02em,.02em);
  }
  75% {
    transform: translate(.02em,.01em);
  }
}

@keyframes uvq10-wsh-l {
  50% {
    opacity: .25;
  }
}

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

export default function LdWashingDrum() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#4cc9f0",
          "--c2": "#ff6b6b",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq10-wsh" role="status"><span className="sr">Loading</span><div className="pn" aria-hidden="true"><i className="kn"></i><span className="dp">0:42</span><i className="lt"></i></div><div className="dr" aria-hidden="true"><div className="gl"><div className="dm"><i className="cl a"></i><i className="cl b"></i><i className="cl c"></i></div><i className="w"></i><i className="rf"></i></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.
````
