Breathe

0:00

Breathe in

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-breathe

About this component

A meditation card that is almost all orb: a lilac sphere with two translucent halos round it that swell at their own rates, and the count of the breath set large inside it. Press the orb and it fills for four counts, holds for seven and empties for eight, the glow rising with the inhale and a ring of light drifting out on the exhale, while the phase word changes under it and the session clock counts; press again to hold the breath, and the small key resets.

Triggers

  • Card
  • Glow
  • Click
  • Loop
  • Ambient
  • State change

Techniques

  • requestAnimationFrame
  • CSS variables
  • Conic gradient
  • Radial gradient
  • Keyframes
  • State machine

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

The orb is a native button labelled Start breathing or Pause with the count, with aria-pressed; the reset key is a labelled button; the phase word is a polite live region and the clock carries a Session label. Focus rings are drawn 6px outside the orb and 2px outside the reset key.

Reduced motion

The idle keyframe and the mark transitions are removed; the exercise itself still runs because its slow size change is the content.

Use it in anything you build, commercial and client work included. Licence

More cards

See all
Operating account

19.9%

LedgerGet code

Workspace

No command matches

PaletteGet code

Low Sun

Ora Vale

PlayerGet code

Delete workspace

northwind
PurgeGet code