Skip to content

Commit 86cf07d

Browse files
fix: fixed animations in navbar (#415)
This pull request makes a small UI improvement to the navigation buttons in the `ImageHeader` component. The change enhances the user experience by allowing button labels to expand smoothly when hovered, making longer labels more readable. - UI enhancement: * Updated the navigation button labels in `image-header.tsx` to truncate long labels by default and smoothly expand their width on hover for better readability.
1 parent e725276 commit 86cf07d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

components/image-header.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,17 @@ export default function ImageHeader({
8383
<li key={index}>
8484
<Button
8585
asChild
86-
className="rounded-full px-4 py-2 text-shade-dark transition-colors duration-300"
86+
className="group rounded-full px-4 py-2 text-shade-dark transition-colors duration-300"
8787
variant="ghost"
8888
>
89-
<Link href={href}>{label}</Link>
89+
<Link href={href}>
90+
<span
91+
className="block max-w-[10rem] truncate transition-all duration-300 ease-in-out group-hover:max-w-[20rem]"
92+
style={{ minWidth: '0' }}
93+
>
94+
{label}
95+
</span>
96+
</Link>
9097
</Button>
9198
</li>
9299
))}

0 commit comments

Comments
 (0)