Skip to content

[FluentTextArea] Turn off text wrapping? #3842

Discussion options

You must be logged in to vote

Yes this can be achieved by CSS.

fluent-text-area::part(control) {
    white-space: nowrap;
}

You can also use a class for this like this:

fluent-text-area.nowrap::part(control) {
    white-space: nowrap;
}

And then in razor:

<FluentTextArea Class="nowrap" @bind-Value=value2 Label="With label:" />

@vnbaaij Stephen is right though there is an attribute called wrap which will only get applied to the fluent-text-area but not the actual textarea element itself. Is this something we should address or do we call it a day with the CSS approach?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MarvinKlein1508
Comment options

Answer selected by Stephen-Lamb
@vnbaaij
Comment options

@Stephen-Lamb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants