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

[Feature Request] vBtn could have wrap-text props #11357

Closed
sinh117801 opened this issue May 9, 2020 · 7 comments
Closed

[Feature Request] vBtn could have wrap-text props #11357

sinh117801 opened this issue May 9, 2020 · 7 comments

Comments

@sinh117801
Copy link

Problem to solve

Should allow the button to wrap the text

Codepen link: https://codepen.io/sinh117801/pen/dyYmEXx

Proposed solution

the solution i use is to custom .v-btn__content

.v-btn__content { width: 100%; white-space: normal; }

@ghost ghost added the S: triage label May 9, 2020
@ElijahKotyluk ElijahKotyluk added the C: VBtn VBtn label May 10, 2020
@phiter
Copy link
Contributor

phiter commented May 13, 2020

I understand the issue but I think it's important to note that the Material Design spec is against this.

Material Design - Buttons Anatomy.

image

The button text should be in a single line and also it should be short, which would make buttons less prone to need line breaking.

image

@sinh117801
Copy link
Author

Thank for explanation and ref. I got the point now.

@Blindpupil
Copy link

This is unavoidable when you have to cater for other languages. I'm currently working on a German client and the words are just too long to avoid this issue.

@bmikaili
Copy link

bmikaili commented Mar 7, 2023

How do people handle long text in buttons?

@tarreislam
Copy link

How do people handle long text in buttons?

I ended up creating my own custom component

@arturslab
Copy link

This is my simple solution for wrapping long text in buttons
https://codepen.io/melma-pl/pen/jOXgoLr

obraz

@hanamurayuki
Copy link

hanamurayuki commented Jan 22, 2024

I ended up below way.

<v-btn>
  <span>
    1st line<br />
    <span class="text-caption" style="line-height: unset">2nd line</span>
  </span>
</v-btn>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants