material-components / material-components/material-web

Add auto expand to <mwc-textfield> and <mwc-textarea>

Open
#455 5 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Feature
Dominant language
SCSS
Stars
11.3k
Forks
1.1k
Avg merge
20h 28m
Merged PRs (30d)
13

Description

### I'm submitting a

- [ ] bug report
- [x] feature request

### Proposed Properties/Attributes

| Name | Type | Description
| ------------------- | ---------------- |------------
| `autoExpand` | `boolean` | Overflow text causes the input container to automatically expand by adding visible rows.
| `maxRows` | `number` | **Note: requires `autoExpand` to be set.** Maximum number of visible text lines.

### Example
```html

```
### Expected behaviour

### Other information

This behaviour is described under [multi-line fields](https://material.io/components/text-fields/#input-types) within the Material Design guidelines.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementations and tests for and , then compare their multiline behavior with the linked Material Design guidance. Done means both components support autoExpand and maxRows as described, including the example behavior shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.