Ir al contenido
Español
Progreso líquido viene con Pro. La vista previa aparece al desbloquearlo.

Cómo funciona

The fill is as wide as the pill and slides in from the left with transform: translateX, so it never animates layout; at 0 it hides 14px past the left edge. Its body is a gradient that brightens toward the front, and the front itself is a 28px column of SVG: the liquid body left of a wavy line built from three sine harmonics, a wide hazy stroke and a crisp bright stroke along it. The strip is one wave period taller than the pill and slides upward by exactly that period in a loop, so the ripple never shows a seam. There are two fronts, a calm one (2.2s per 24px period) and a lively one (0.6s per 16px period, about twice the amplitude); while the value changes they cross-fade, so the motion picks up and settles without its speed ever jumping. The number counts in JavaScript frames in step with the fill. Unlike the thin progress pill in the stat trend card, which slides in once with a smooth edge, this is a full labelled row for live work whose edge keeps moving.

Úsalo para

  • Uploads, backups, syncs and exports the person is watching.
  • Several parallel jobs listed together, each in its own colour.
  • Long tasks in creative or AI tools where the wait should feel alive.

Busca otra opción cuando

  • Static measures such as a quota or a score: use a meter or the stat trend card.
  • Tight table cells and toolbars: a 60px pill is too large.
  • Unknown durations with no percentage: use a spinner or the agent status pill.

Uso

import { WavyProgress } from './WavyProgress.jsx'

export function Uploads({ jobs }) {
  return (
    <div style={{ display: 'grid', gap: 8 }}>
      {jobs.map((job, i) => (
        <WavyProgress
          key={job.id}
          value={job.done}
          max={job.total}
          tone={[4, 7, 6][i % 3]}
          label={job.name}
          detail={`${job.done} of ${job.total} files`}
        />
      ))}
    </div>
  )
}

Propiedades

PropiedadTipoPor defectoQué hace
valuenumber0Progress, from 0 to max. A new value glides from the old one and churns the front while it moves.
maxnumber100The value that means complete. At max the front settles and a check is drawn beside the number.
labelReactNode—Title of the job; a string also names the progress bar for screen readers.
detailReactNode—A second line, for example “214 of 380 photos”. Hidden in the small size.
tone1–81Chart colour of the fill and its edge.
variant'ink' | 'soft''ink'Ink is a near-black pill in both themes, where the glow reads best; soft is a light filled pill.
size'sm' | 'md''md'Height 48 or 60px.
format(value, ratio) => string—Formats the counting number instead of a percentage, for example (v) => `${Math.round(v)} MB`.
labels{ value: (percent) => string, done: string }—Replaces the built-in text: how the percentage is written and the word added to the spoken value when complete.
...restHTMLAttributes<HTMLDivElement>—Other attributes go to the root, which has role="progressbar".

Accesibilidad

  • The root has role="progressbar" with aria-valuemin, aria-valuemax, aria-valuenow and an aria-valuetext that says the final value (and labels.done when complete), not the counting one.
  • A string label names the bar; pass aria-label when the label is not plain text.
  • The text sits above the fill and keeps its contrast: the fill only brightens toward the front.
  • The wave, haze and glow are decorative and hidden from screen readers.
  • Reduced motion shows a still wavy front, jumps the fill and the number to the new value, and draws the check at once.

Movimiento

Fill and number: 900ms cubic-bezier(0.22, 1, 0.36, 1), starting when the pill is 30% in view. Front: calm 2.2s per period; lively 0.6s while the value moves, cross-fading in 360ms. Check: drawn in 360ms after 120ms.

Añádelo a tu proyecto

Los miembros Pro copian un prompt y su agente de programación instala el código, igual que con los gratuitos.

WavyProgress.jsxwavy-progress.csstokens.cssREADME.md

Los dos archivos se instalan juntos. La hoja de estilos lee las variables de tokens.css y lleva valores de reserva, así que también funciona sola.

Carga
Revelado de imagen viene con Pro. La vista previa aparece al desbloquearlo.
Cargador orbital viene con Pro. La vista previa aparece al desbloquearlo.