March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's say that you have a field that could require multiple lines of text, provided by the user. You can specify the multiline property to allow for this:
import React, { useState } from 'react';import TextField from '@material-ui/core/TextField';export default function MultilineInput() { const [multiline, setMultiline] = useState(''); return ( <TextField multiline value={multiline} onChange={e => setMultiline(e.target.value)} /> );}
The text field looks like a normal field when the screen first loads, because it has one row by default:

You can enter as many lines as you need to in this text field. New lines are started by ...
Read now
Unlock full access