Portal Card, animated React component
Hold and draw a circle on a dark card and a ring of molten sparks tears open where you drew it. Through it you see another world that shifts against the pointer like a view through a window. Click in to step through, click out and it collapses in embers. The other side is plain DOM, so any content can wait behind it.
- Pro
- Cards
- Scroll
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Hold and draw a circle
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| children | ReactNode | — | What waits on the other side. Defaults to a dusk valley. |
| height | number | 460 | Height of the card, in px. It is always as wide as its parent. |
| autoplay | boolean | false | A ghost hand draws a circle, opens the portal, steps through and returns, until a real pointer arrives. Pauses off screen and never runs under reduced motion. |
| className | string | — | Extra classes for the card. |