Pivot
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardPivot(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/card-pivotAbout 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 allEssay
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.
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.
Animate a ball that is afraid of the floor.