Skip to content

Commit

Permalink
Add constants/animations.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gg-1414 committed Nov 13, 2024
1 parent bdd3202 commit f547136
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/constants/animations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
export const animations = {
fadeScaleSlideIn: {
opacity: 1,
y: 0,
scale: 1,
},
fadeScaleSlideOut: {
opacity: 0,
y: 25,
scale: 0.98,
},
fadeScaleSlideInFromRight: {
opacity: 1,
x: 0,
scale: 1,
},
fadeScaleSlideOutFromRight: {
opacity: 0,
x: 25,
scale: 0.98,
},
fadeScaleSlideInFromLeft: {
opacity: 1,
x: 0,
scale: 1,
},
fadeScaleSlideOutFromLeft: {
opacity: 0,
x: -25,
scale: 0.98,
},
};

// https://easings.net/
export const easeFunctions = {
easeInQuart: [0.25, 1, 0.5, 1],
easeOutQuad: [0.5, 1, 0.89, 1],
standard: [0.25, 1, 0.5, 1],
};

export const durations = {
instant: 0.05,
shortest: 0.15,
shorter: 0.2,
short: 0.25,
standard: 0.4,
slow: 0.5,
slower: 0.75,
slowest: 0.85,
};

0 comments on commit f547136

Please sign in to comment.