Skip to content

Commit

Permalink
💫 anm: set initial animation for scroll down
Browse files Browse the repository at this point in the history
  • Loading branch information
Bear29ers committed Jul 10, 2024
1 parent f858d4e commit 59395b2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/components/ui/gallery/ScrollDown/ScrollDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,26 @@ import type { FC } from 'react';

import { motion } from 'framer-motion';

const variants = {
initial: {
opacity: 0,
},
animate: {
opacity: 1,
transition: {
type: 'spring',
duration: 1.5,
},
},
};

const ScrollDown: FC = () => {
return (
<motion.div className="absolute bottom-0 left-1/2 z-40 h-40 w-full max-w-[337px] -translate-x-1/2 bg-gradient-to-transparent">
<motion.div
variants={variants}
initial="initial"
animate="animate"
className="absolute bottom-0 left-1/2 z-40 h-40 w-full max-w-[337px] -translate-x-1/2 bg-gradient-to-transparent">
<button type="button" className="absolute inset-x-0 bottom-10 mx-auto w-12 animate-down" aria-label="scroll-down">
<svg width="100%" height="100%" viewBox="0 0 310 177">
<path
Expand Down

0 comments on commit 59395b2

Please sign in to comment.