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

Button: Support "unstyled" usage #67320

Open
mirka opened this issue Nov 26, 2024 · 0 comments
Open

Button: Support "unstyled" usage #67320

mirka opened this issue Nov 26, 2024 · 0 comments
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@mirka
Copy link
Member

mirka commented Nov 26, 2024

What problem does this address?

There have been cases where the Button component is used with heavy style overrides. This can lead to subtle bugs and breakages down the line.

Although we should always first reconsider if one of the standard Button style variants can be used instead, in some cases heavy style customization is warranted. While styling a simple button element from scratch may seem like a valid alternative, that may also lead to developers overlooking subtle considerations (focus styles, accessibility, etc) that are already handled in Button.

What is your proposed solution?

We should audit the repo for the kinds of valid style overrides we have, and figure out how Button can support those use cases cleanly. Some possibilities include:

  • an unstyled variant
  • providing modular styles (focus styles, hover styles, etc) through something like a useButtonStyles hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

1 participant