From 985fb4bc41b44935861637ba96b428893c27178e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Wed, 26 Nov 2025 13:51:17 +0100 Subject: [PATCH] Add smooth open/close animation to InfoBox component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements a slide-down fade-in animation when the InfoBox expands, improving the user experience with smooth visual transitions. Changes: - Add animateDown keyframe animation to Tailwind config - Apply animation to InfoBox content div when opened - Animation includes opacity fade, vertical slide, and max-height transition - Update InfoBox width to use responsive sizing (17rem on mobile, 28rem on larger screens) - Change icon color to green for better visual consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/ui/InfoBox.tsx | 4 ++-- tailwind.config.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/ui/InfoBox.tsx b/app/ui/InfoBox.tsx index c101ee5..2380761 100644 --- a/app/ui/InfoBox.tsx +++ b/app/ui/InfoBox.tsx @@ -10,13 +10,13 @@ export const InfoBox: FC<{ const t = useTranslations("info-box"); return ( -
+
{title ?? t("default-title")} -
{children}
+
{children}
) } diff --git a/tailwind.config.ts b/tailwind.config.ts index 2586424..2889b2d 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -25,6 +25,18 @@ const config: Config = { transform: 'translateX(100%)', }, }, + animateDown: { + '0%': { + opacity: '0', + transform: 'translateY(-15px)', + maxHeight: '0px', + }, + '100%': { + opacity: '1', + transform: 'translateY(0)', + maxHeight: '200px', + }, + }, }, }, plugins: [