Skip to content

Conversation

@Hamed-Ajaj
Copy link

@Hamed-Ajaj Hamed-Ajaj commented Dec 8, 2025

Description

Fixes #8975

This PR fixes the issue where SidebarMenuButton with size="lg" doesn't properly collapse to icon-only mode when the sidebar is in collapsible="icon" state.

Changes

  • Added group-data-[collapsible=icon]:size-8! to the lg size variant in sidebarMenuButtonVariants
  • Removed group-data-[collapsible=icon]:p-0!
  • This ensures lg buttons collapse to 32x32px (matching default and sm sizes)

Before

When sidebar was collapsed, size="lg" buttons retained their 48px height and text remained visible.

image

After

size="lg" buttons now properly collapse to 32x32px icon-only mode, with text hidden and tooltip displayed on hover.

image

Testing

  • Tested with size="lg" buttons in collapsed sidebar
  • Verified tooltip appears on hover when collapsed
  • Confirmed expand/collapse transitions work smoothly
  • Checked that default and sm sizes still work correctly

@vercel
Copy link
Contributor

vercel bot commented Dec 8, 2025

@Hamed-Ajaj is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@Hamed-Ajaj Hamed-Ajaj force-pushed the fix/issue-8975-sidebar-lg-collapse branch from 650ae65 to e8917ea Compare December 8, 2025 14:19
@Hamed-Ajaj Hamed-Ajaj changed the title Fix/issue 8975 sidebar lg collapse Fix(sidebar): /issue 8975 sidebar lg collapse Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: SidebarMenuButton size='lg' doesn't collapse properly to icon-only mode

1 participant