Shutter Reveal
An elegant physical shutter transition that splits the screen perfectly in half.
Installation
npx kinetic-ui-cli@latest add shutter-transitionArchitecture
The Shutter Transition is built for pure performance. Instead of animating height or width (which triggers expensive browser reflows), it relies entirely on hardware-accelerated CSS transforms.
When the transition triggers:
- Two
divelements (representing the two halves of the shutter) are mounted. - If
direction="vertical", the top panel animates fromtranslateY(-100%)to0%, and the bottom from100%to0%. - If
direction="horizontal", the left panel animates fromtranslateX(-100%)to0%, and the right from100%to0%.
This ensures 60fps performance on all devices.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { ShutterTransition } from "@/components/creative/shutter-transition";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { ShutterTransition } from "@/components/creative/shutter-transition";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<ShutterTransition
isActive{true}
color="example"
direction{/* value */}
>
<div>Content goes here</div>
</ShutterTransition>
</div>
);
}