Shy table
Drag the handle to squeeze the table. When the words stop fitting, they fall on the floor and get swept under the rug. Give them room and they come back.
| Pastry | Bake | Crumb |
|---|---|---|
| Croissant | 18 min | flaky |
| Sourdough | 45 min | open |
| Cinnamon bun | 25 min | sticky |
| Victoria sponge | 30 min | light |
How it works
The table knows how wide it wants to be. A ResizeObserver checks that against the space it has. Each word is its own span, so when the room runs out, copies of the words take over and fall with a few lines of physics: gravity, a bounce, a little spin. Then a broom (also a few lines of code) sweeps them under the rug, which keeps a lump to show for it.
Give the table room and every word flies back along an arc to the exact spot its span is waiting in. No libraries. With reduced motion turned on, the words simply fade out and back.