Skip to content

Commit 5993a7f

Browse files
committed
feat(view): apply spring-like easing to dialog animation
- Fine-tune zoom values from 95% to 96%/98% for more natural feel - Add slide-in-from-top/slide-out-to-top animation - Apply cubic-bezier(0.16, 1, 0.3, 1) easing for spring-like motion
1 parent b81ebe5 commit 5993a7f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/view/src/core/shadcn/dialog.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ function DialogContent({
8484
<CustomOverlay />
8585
<DialogPrimitive.Content
8686
className={cn(
87-
"bg-background text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
87+
"bg-background text-foreground fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg sm:max-w-lg",
88+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
89+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
90+
"data-[state=closed]:zoom-out-[0.98] data-[state=open]:zoom-in-[0.96]",
91+
"data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2",
92+
"duration-200 ease-[cubic-bezier(0.16,1,0.3,1)]",
8893
className
8994
)}
9095
data-slot="dialog-content"

0 commit comments

Comments
 (0)