Pivot

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/card-pivot

About this component

A portrait video card that turns like a phone: press rotate and the whole card swings a quarter turn on its centre, and as it lands the same clip is laid out again for landscape, the picture filling the wide frame with the title over it; rotate again to stand it back up.

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

Triggers4

  • Click
  • State change
  • Morph
  • Card

Techniques3

  • Keyframes
  • Transform only
  • State machine

Accessibility

Keyboard and screen readers

Rotate is a button whose label names the next orientation; the time and title are in both layouts and the hidden one is aria-hidden and inert.

Reduced motion

The layouts swap without turning.

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

More cards

See all

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.

ReflowGet code

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