SPB Git

spb/spboucher.ai Public

spboucher.ai — personal website of Simon-Pierre Boucher.

TypeScript 93.4% HTML 5.5% CSS 1%
667 B · 33 lines tsx
Raw Blame History
1/*2  reveal.tsx3  spboucher.ai Web4  Author: Simon-Pierre Boucher5  Mail: contact@spboucher.ai6*/78"use client";910import * as React from "react";11import { motion } from "framer-motion";1213interface RevealProps {14  children: React.ReactNode;15  delay?: number;16  className?: string;17}1819export function Reveal({ children, delay = 0, className }: RevealProps) {20  return (21    <motion.div22      data-reveal23      className={className}24      initial={{ opacity: 0, y: 16 }}25      whileInView={{ opacity: 1, y: 0 }}26      viewport={{ once: true, margin: "-40px" }}27      transition={{ duration: 0.5, delay, ease: "easeOut" }}28    >29      {children}30    </motion.div>31  );32}33