How to align Text in React Material UI?
Last Updated :
23 Dec, 2020
The Typography component of Material UI is used to present your text and content as clearly and efficiently as possible.
Import:
import Typography from '@material-ui/core/Typography';
// OR
import { Typography } from '@material-ui/core';
Syntax: It sets the alignment property.
<object align="value"> Text </object>
Property Values:
- left: It aligns text along the left side of a page or containing element. It is the default value.
- right: It aligns text along the right side of a page or containing element.
- center: Text is aligned around a midpoint.
- justify: To make sure that both edges of each line are aligned with both margins, space is added between words. The last line in the paragraph is aligned left.
Return Value: It returns the aligned text according to the set value.
Example 1: This example describes the left alignment value.
Example 2: This example describes the right alignment value.
Example 3: This example describes the center alignment value.
Example 4: This example describes the justify alignment value.
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...