Understanding the use case for text button #2006
Unanswered
joaomarcelofm
asked this question in
Figma UI Kit
Replies: 1 comment 3 replies
-
Hello, I understand the problems with the screenshots you've provided. However, if you have concerns about this alignment, they are likely due to misusing a text button. Personally, I wouldn't recommend removing the left padding just to achieve left alignment when the button is not in a hover state. In such cases, you should avoid using a text button. That's why there are numerous variations of the button component available. For instance, you can try the outlined button or the link button, which already has no padding. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone!
Our team is finding it hard to understand the use case for the
text
variant of buttons. The main issue is that most of the time, it requires custom styling to prevent the UI from looking misaligned.For instance, in the sample code:
In the example above, the UI looks buggy and misaligned until the user hovers and sees that some background is applied to the padding. This requires us to apply custom styles to make it look as our designers desire, but generally, how text buttons look everywhere, I think 🤔
Also, even if in the "good" example it looks aligned, then when the user hovers, it'd look strange if we used
pl-0
as one of the sides wouldn't have a background. Therefore, we often remove that style as well.Based on other discussions, this seems to be a common issue. Do you have any guidelines for best practices regarding the usage of this button?
Our team is resorting to the full ban on this button style as the custom styling hampers our ability to upgrade prime easily or introduces unintended bugs in the UI.
I understand the need for extra padding for icon-only buttons, as it increases the touch area for accessibility. Still, it generally requires a custom implementation to make it aligned (i.e., dynamically position the button beyond the box boundaries). This may be less of an issue, but it is also important to think about.
Beta Was this translation helpful? Give feedback.
All reactions