Skip to content

Button splits label on more lines #526

Answered by gabro
mperrando asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mperrando, yes this is due to how flexbox works in relation to Button. When writing <Column width='content'> we mean "whatever width fits the content and nothing more".

Now, the minimum width of a Button is essentially the width of the longest word of the label (plus padding). This is because <button> defaults to wrapping its content.

Now, back to your problem, one possible workaround is to add this CSS rule:

button {
  white-space: nowrap
}

which prevents button labels from wrapping.

Bento-wise, this is something we may consider doing ourselves and limit Button to have one-line labels. I'll discuss it with the team.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
Answer selected by mperrando
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants