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

docs: text area min / max rows #3945

Open
wants to merge 5 commits into
base: latest
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions articles/components/text-area/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,39 @@ include::{root}/frontend/demo/component/textarea/react/text-area-height.tsx[rend
endif::[]
--

[role="since:com.vaadin:vaadin@V24.6"]
=== Minimum & Maximum Rows

Alternatively, the minimum and maximum height can be constrained to a specific number of text rows like so:

[.example]
--
ifdef::lit[]
[source,html]
----
<source-info group="Lit"></source-info>
<vaadin-text-area min-rows="4" max-rows="8"></vaadin-text-area>
----
endif::[]

ifdef::flow[]
[source,java]
----
<source-info group="Flow"></source-info>
TextArea textArea = new TextArea();
textArea.setMinRows(4);
textArea.setMaxRows(8);
----
endif::[]

ifdef::react[]
[source,tsx]
----
<source-info group="React"></source-info>
<TextArea minRows={4} maxRows={8} />
----
endif::[]
--

// Basic Features

Expand Down
Loading