Skip to content

Add scroll-reveal animation utility #18

Description

@Muneerali199

Summary

Create a reusable scroll-reveal component that animates elements into view as the user scrolls.

Tasks

  • Create components/reveal.tsx using Intersection Observer + framer-motion:
    • Configurable direction: fade-up, fade-left, fade-right, fade-down
    • Configurable delay and duration
    • Staggered children support
  • Create hooks/use-in-view.ts for the intersection observer logic
  • Add demo sections in app/page.tsx to showcase the reveal effects

Files to change

  • components/reveal.tsx (new, ~80 lines)
  • hooks/use-in-view.ts (new, ~30 lines)
  • app/page.tsx (~50 lines added for demo sections)

Acceptance criteria

  • Elements animate in when they enter the viewport
  • Works on mobile and desktop
  • npm run build succeeds

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions