mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-10 14:13:19 +00:00
42 lines
984 B
TypeScript
42 lines
984 B
TypeScript
|
import type { Variants } from 'framer-motion';
|
||
|
|
||
|
export const fadeIn: Variants = {
|
||
|
initial: { opacity: 0 },
|
||
|
animate: { opacity: 1 },
|
||
|
exit: { opacity: 0 },
|
||
|
};
|
||
|
|
||
|
export const slideIn: Variants = {
|
||
|
initial: { opacity: 0, y: 20 },
|
||
|
animate: { opacity: 1, y: 0 },
|
||
|
exit: { opacity: 0, y: -20 },
|
||
|
};
|
||
|
|
||
|
export const scaleIn: Variants = {
|
||
|
initial: { opacity: 0, scale: 0.8 },
|
||
|
animate: { opacity: 1, scale: 1 },
|
||
|
exit: { opacity: 0, scale: 0.8 },
|
||
|
};
|
||
|
|
||
|
export const tabAnimation: Variants = {
|
||
|
initial: { opacity: 0, scale: 0.8, y: 20 },
|
||
|
animate: { opacity: 1, scale: 1, y: 0 },
|
||
|
exit: { opacity: 0, scale: 0.8, y: -20 },
|
||
|
};
|
||
|
|
||
|
export const overlayAnimation: Variants = {
|
||
|
initial: { opacity: 0 },
|
||
|
animate: { opacity: 1 },
|
||
|
exit: { opacity: 0 },
|
||
|
};
|
||
|
|
||
|
export const modalAnimation: Variants = {
|
||
|
initial: { opacity: 0, scale: 0.95, y: 20 },
|
||
|
animate: { opacity: 1, scale: 1, y: 0 },
|
||
|
exit: { opacity: 0, scale: 0.95, y: 20 },
|
||
|
};
|
||
|
|
||
|
export const transition = {
|
||
|
duration: 0.2,
|
||
|
};
|