StarForge
Animations

View Transitions

Screen-to-screen transition components for moving between views

Note

All presented components are responsive and compatible with Tailwind CSS. Make sure Tailwind is configured in your project to use them.

View transitions, not route transitions

These components animate between views inside a shared layout (tabs, steps, card states). Transitions between routes are framework-specific — in the Next.js App Router, pair them with template.tsx or the View Transitions API.

Slide, Fade & Zoom

A keyed view switcher: change transitionKey and the outgoing view animates out while the new one animates in. Three variants cover the most common navigation metaphors — slide for drilling in, fade for tabs and settings, zoom for opening an item from a grid. direction controls whether the slide moves forward or backward.

EEuMotta
slide
Explore
fade
Explore
zoom
Explore

Props Reference

PropTypeDescriptionDefault
transitionKeyReact.KeyKey identifying the current view — changing it triggers the transitionrequired
variant'slide' | 'fade' | 'zoom'Transition style'slide'
direction1 | -1Slide direction (forward / backward)1
durationnumberAnimation duration in seconds0.25
classNamestringAdditional CSS classesundefined

Shared Element (Expandable Card)

A card that morphs into an expanded detail overlay. The card container, media, and title share layoutIds between collapsed and expanded states, so framer-motion interpolates them — keeping the user oriented about where the content came from. Dismiss with Esc, the close button, or the backdrop.

EEuMotta

Props Reference

PropTypeDescriptionDefault
idstringUnique namespace for the shared layout idsrequired
titlestringCard title (shared between states)required
descriptionstringSupporting text under the titleundefined
mediaReact.ReactNodeMedia content (image, gradient, etc.)undefined
mediaClassNamestringClasses applied to the media area in both statesundefined
childrenReact.ReactNodeExtra body shown only in the expanded stateundefined

A bottom sheet built on the dialog primitive — slides up from the screen edge with a drag handle. Best for tasks the user finishes and dismisses. Inherits focus trap, Esc close, and overlay behavior from the dialog primitive.

EEuMotta

Props Reference

PropTypeDescriptionDefault
showHandlebooleanRenders the drag handle bar on toptrue

ModalSheetContent also accepts all props from the underlying DialogContent (including showCloseButton).


Flip Card

A two-sided card that flips between front and back with a pure CSS 3D transform — no animation library needed. Works controlled (flipped + onFlippedChange) or uncontrolled (defaultFlipped), and toggles on click, Enter, or Space.

EEuMotta
Star Forge4242 4242 4242 4242
J. DOE12/29
CVC 123

Props Reference

PropTypeDescriptionDefault
frontReact.ReactNodeContent of the front facerequired
backReact.ReactNodeContent of the back facerequired
flippedbooleanControlled flipped stateundefined
defaultFlippedbooleanInitial state when uncontrolledfalse
onFlippedChange(flipped: boolean) => voidCalled whenever the card flipsundefined
axis'x' | 'y'Rotation axis (horizontal / vertical)'y'

Circle Reveal

A clip-path transition that reveals a view as an expanding circle starting from the tapped point. Pass the click coordinates as origin (any CSS units) and toggle open — the overlay animates from 0% to 150% radius at that spot.

EEuMotta
Explore

Props Reference

PropTypeDescriptionDefault
openbooleanWhether the reveal overlay is expandedrequired
origin{ x: string; y: string }Circle origin (CSS units, e.g. '24px', '50%'){ x: '50%', y: '50%' }
durationnumberAnimation duration in seconds0.5
classNamestringAdditional CSS classesundefined

Card Stack

Depth-stacked cards, iOS-sheets style: cards behind the front peek out scaled and offset. Drag the front card down past the threshold to dismiss it — with recycle it springs to the back of the stack.

EEuMotta
Detail 01
Drag me down to dismiss
Detail 02
Drag me down to dismiss
Detail 03
Drag me down to dismiss

Props Reference

PropTypeDescriptionDefault
items{ id: React.Key; content: ReactNode }[]Cards to stack, in front-to-back orderrequired
visibleCountnumberHow many cards render in the stack3
dismissOffsetnumberDrag distance (px) that dismisses the front card100
dismissVelocitynumberFlick velocity (px/s) that dismisses500
recyclebooleanSend dismissed card to the back vs. remove ittrue
onDismiss(id: React.Key) => voidCalled with the dismissed card's idundefined

v2.2.14