Skip to content

fix(button): ensure consistent height across all button variants #7554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

VladimirKobranov
Copy link

What's the issue?

When using different button variants (like default and outline) together, they have slightly different heights because the outline variant has a border while others don't. This causes annoying layout shifts, especially noticeable in components like tabs where you switch between button states.

The fix
Added a transparent border to all button variants so they're all the same height. The outline variant still looks the same (it just overrides the transparent border with a visible one), but now all buttons have consistent dimensions.
Why this matters

Prevents layout jumps when switching between button variants

Copy link

vercel bot commented Jun 7, 2025

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

A member of the Team first needs to authorize it.

Copy link
Collaborator

@shadcn shadcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Agreed. Can you also make it in apps/v4/registry/new-york-v4/ui/button.tsx please?

@shadcn shadcn added component: button area: roadmap This looks great. We'll add it to the roadmap, review and merge. labels Jun 7, 2025
@VladimirKobranov
Copy link
Author

Added fix in v4 new-york

Copy link

vercel bot commented Jun 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Jun 9, 2025 0:21am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: roadmap This looks great. We'll add it to the roadmap, review and merge. component: button
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants