March 2019
Intermediate to advanced
534 pages
14h 52m
English
If you're trying to align your text horizontally to the left, right, or center, then you can use the align property of your Typography component, as demonstrated in the following code:
<Typography align="center">My Centered Text</Typography>
This is shorthand for using the text-align style, so that you don't have to keep adding CSS to your components for the more common alignment scenarios. However, sometimes you need the ability to align your text both horizontally and vertically.
For example, let's say that you have a 200x200 Paper element, and you need the ability to render text in the bottom-right corner. Let's illustrate this example with some code:
import React from 'react';import { withStyles } from '@material-ui/core/styles'; ...Read now
Unlock full access