Reflow

Essay

Room to breathe

A page is not a box to be filled. The best layouts leave the reader somewhere to rest, and they let a picture sit where it means something rather than where the grid happened to put it. Move the stone and watch the words make way for it, line by line, the way a stream finds its way round a rock.

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-reflow

About this component

An essay card whose round photo you can pick up and move: drag it up and down the column and across to the other side, and the paragraph flows around its curve live, every line rewrapping as it goes, with the margin it keeps shown as a dashed ring while you hold it.

Dependencies
None
Difficulty
Intermediate
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers3

  • Mouse tracking
  • State change
  • Card

Techniques3

  • Event position
  • CSS variables
  • border-radius

Accessibility

Keyboard and screen readers

The photo is a focusable button whose label describes the move; arrow keys move it by a line or switch sides, and its position is announced. The essay is ordinary text.

Reduced motion

Nothing animates beyond the text reflow; under prefers-reduced-motion the margin ring appears without fading.

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

More cards

See all

Long read · 9 min

The quiet return of the paper map

Walkers are folding maps again. Not for nostalgia: a map shows the whole valley at once, and a phone shows you a blue dot.

By Ines Calder
RollupGet code
Studio Monitor 2$189
New in · sealed
Shrink WrapGet code
Daily motion prompt#14

Animate a ball that is afraid of the floor.

Medium
1 / 5
SmearGet code
The sound of roomsSmall Hours · Ep. 41
0:0038 min
SpectrogramGet code