Slow down the mobile nav drawer's close animation
The shared ease-out curve (fast start, slow finish) worked well for the open reveal but made the close shrink almost instantly then linger on a barely-visible sliver — read as abrupt. Gave exit its own longer, easeInOut transition instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -594,7 +594,14 @@ export function Navbar({ singleActiveProduct }: { singleActiveProduct: boolean }
|
||||
className="lg:hidden fixed inset-0 z-40 bg-bg-base overflow-y-auto"
|
||||
initial={{ clipPath: "circle(0vmax at 100% 0%)" }}
|
||||
animate={{ clipPath: "circle(150vmax at 100% 0%)" }}
|
||||
exit={{ clipPath: "circle(0vmax at 100% 0%)" }}
|
||||
// Own (slower, gentler) transition for the exit — the shared
|
||||
// ease-out curve above is front-loaded (fast start, slow
|
||||
// finish), which reads great for the reveal but meant the
|
||||
// close shrank most of the way almost immediately, then
|
||||
// lingered on a barely-visible sliver — felt abrupt rather
|
||||
// than smooth. easeInOut plus a longer duration spreads the
|
||||
// shrink evenly instead.
|
||||
exit={{ clipPath: "circle(0vmax at 100% 0%)", transition: { duration: 0.7, ease: "easeInOut" } }}
|
||||
transition={{ duration: 0.5, ease: [0.22, 1, 0.36, 1] }}
|
||||
>
|
||||
<div className="flex flex-col min-h-full pt-[6.25rem]">
|
||||
|
||||
Reference in New Issue
Block a user