Skip to content
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

[Bug]: Icon Alignment Issues in Large-Sized Button Components #18561

Open
2 tasks done
riddhybansal opened this issue Feb 12, 2025 · 0 comments
Open
2 tasks done

[Bug]: Icon Alignment Issues in Large-Sized Button Components #18561

riddhybansal opened this issue Feb 12, 2025 · 0 comments
Labels

Comments

@riddhybansal
Copy link
Contributor

Package

@carbon/react, @carbon/web-components

Browser

Chrome, Safari, Firefox, Edge

Package version

1.75.0

React version

No response

Description

When using icon-only buttons with sizes larger than lg:

  • Icons are not vertically centered
  • Inconsistent padding/spacing around the icon
  • Misalignment becomes more noticeable as button size increases

According to the Figma:

  • Icons should be perfectly centered within the button container
  • Consistent padding should be maintained proportionally across all button sizes
  • Icon alignment should remain consistent regardless of button size

This issue affects all icon-only button variants (primary, secondary, ghost, etc.)

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-button--icon-button&args=isExpressive:!false;isSelected:!false;kind:primary;size:2xl

Steps to reproduce

  • Go to storybook -> Button -> Icon Button
  • From Controls set size as xl/2xl
  • You can see Icons are not alligned in any of the variant (primary, secondary, danger) or (isSelected or Isexpressive) states

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant