For some fields, users need the ability to provide text values that span multiple lines. The multiline property helps accomplish this goal.
Multiline input
How to do it...
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...