Apple-style motion design with Framer Motion - #1
Merged
Conversation
Reuses the shared spring presets and honors prefers-reduced-motion. Polyfills window.matchMedia in the vitest environment since jsdom doesn't provide it.
Extends the existing Tailwind fontSize theme rather than introducing a parallel CSS file; text-base/text-sm are left alone since they already match the intended body scale.
next build failed without "use client" since useReducedMotion uses useEffect/useState and is imported by Button, which landing page Server Components pull in transitively.
Swaps the page-local skeleton block for the shared component and adds a subtle spring-based stagger entrance to the projects grid and recent payments list, honoring prefers-reduced-motion.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
default/snappy/bouncy/smooth) matching Apple HIG valuesButton/LinkButtonspring-based hover/tap feedback (no new parallel component — the shared one across the app now animates)Modal,Toast, andSkeletoncomponents (Tailwind-styled, matching existing tokens — no CSS Modules introduced)fontSizetheme (display/heading/label/caption)useReducedMotionhook; every animated component respectsprefers-reduced-motionsrc/app/app/page.tsx) uses the sharedSkeletonand staggers the projects/payments lists inDeviated from a literal spec in a couple of places after inspecting the repo: this project uses Tailwind (not CSS Modules) with color tokens that already matched the requested hex values, and already has a
Buttoncomponent used throughout — so I extended those instead of creating disconnected duplicates.Test plan
npx tsc --noEmitpassesnpx eslintclean on all touched filesnpx vitest run— 78/78 tests pass (added amatchMediapolyfill tosrc/test/setup.ts, required by jsdom)npx next buildsucceeds/,/app/loginrender without server/runtime errors