Animation Wrapper
CSS-only animation primitives. Wrap any element to apply pulse, float, rotate, fade, slide, draw, or shimmer effects with zero JavaScript overhead.
Preview
Pulse
pulseFloat
floatRotate
rotateFade Up
fade-upFade In
fade-inSlide In Right
slide-in-rightHover Lift
hover-liftHover Glow
hover-glowDraw
drawShimmer
shimmerWith Custom Duration
0.5s
2s (default)
5s
Usage
tsx
import { AnimationWrapper } from "zostel-ui";
<AnimationWrapper animation="pulse">
<Logo />
</AnimationWrapper>
<AnimationWrapper animation="fade-up" delay={200}>
<Card>...</Card>
</AnimationWrapper>
<AnimationWrapper animation="float" duration="5s">
<Icon />
</AnimationWrapper>Props
| Prop | Type | Default | Description |
|---|---|---|---|
animation | "pulse" | "float" | "rotate" | "fade-up" | "fade-in" | "slide-in-right" | "hover-lift" | "hover-glow" | "draw" | "shimmer" | "fade-up" | The CSS animation to apply. |
delay | number | - | Animation delay in milliseconds. |
duration | string | - | Custom animation duration CSS value (e.g. "2s", "500ms"). |
trigger | "always" | "hover" | "always" | When to trigger the animation. |
className | string | "" | Additional CSS classes. |
animationType:
"pulse" | "float" | "rotate" | "fade-up" | "fade-in" | "slide-in-right" | "hover-lift" | "hover-glow" | "draw" | "shimmer"Default: "fade-up"
The CSS animation to apply.
delayType:
numberDefault: -
Animation delay in milliseconds.
durationType:
stringDefault: -
Custom animation duration CSS value (e.g. "2s", "500ms").
triggerType:
"always" | "hover"Default: "always"
When to trigger the animation.
classNameType:
stringDefault: ""
Additional CSS classes.