3D Effects
import { FlipCard, Carousel3D, CardStack, TiltWall, DotGlobe } from "pleate/effects/depth";Flip card
Click or press Enter on the boarding pass; the second card flips on hover and on focus.
Ring carousel
Buttons, arrow keys or a horizontal swipe turn the ring the short way round.
Lisbon
Portugal
from €142 a night
Card stack
Scroll the page: each day sticks on top of the last, which tips back into the pile.
Lisbon
Land 10:40, tram 28 to Alfama, dinner in Mouraria.
Sintra
Train at 08:45, Pena Palace before the crowds, back by 18:00.
Porto
Alfa Pendular at 09:09, Ribeira walk, cellars across the river.
Douro
Boat up the valley, lunch at a quinta, last train home.
Tilt wall
Columns drift in opposite directions on a tilted plane; hover to stop them.
Dot globe
A canvas sphere of dots with labelled markers. It only animates while on screen.
Drag or use the arrow keys to turn it
Props
- FlipCard front / back
The two faces; the card takes the height of the taller one.
ReactNode- flipped / defaultFlipped / onFlippedChange
Controlled or uncontrolled side.
boolean- trigger / axis
How it turns, and around which axis.
"click" | "hover" | "manual" / "x" | "y"default "click" / "y"- Carousel3D items
Slides; three or more make a ring.
ReactNode[]- index / defaultIndex / onIndexChange
Front slide, controlled or not.
number- itemWidth / itemHeight / gap
Slide size; the ring radius follows.
number (px)default 220 / 280 / 24- CardStack children / top / step
Cards, where they stick and how far each edge shows.
ReactNode / number / numberdefault 96 / 14- TiltWall items / columns / duration / height
Tiles spread over drifting columns.
ReactNode[] / number / number / numberdefault 4 / 40 / 480- DotGlobe size / dots / markers / speed / tilt
Canvas globe; speed in degrees per second.
number / number / { lat, lon, label? }[] / number / numberdefault 360 / 1400 / [] / 8 / 18
Accessibility
- FlipCard with trigger="click" is a toggle button (aria-pressed); the hidden face is inert, so focus never lands on it.
- Carousel3D is a labelled carousel region; only the front slide is reachable, and the position is announced politely.
- Reduced motion swaps the turn for an instant change, keeps the stack flat, stops the wall and the globe.
- TiltWall reads each tile once: the loop copy is hidden and inert.
- DotGlobe is a named image listing its markers; drag or arrow keys turn it.