In this section we will see how to typography text center in mui 5 using react js. There is three way you can center text in mui 5 first you can use inline react css and second using mui 5 props and third way you can use mui sx props.
React MUI 5 Typography Text Align Center
1. MUI 5 text center using Inline react css.
import { Typography } from '@mui/material';
export default function Home() {
return (
<>
<Typography variant="h5" style={{ textAlign: 'center' }}>
React MUI 5 Text Align Center Using Inline CSS
</Typography>
</>
);
}
2. MUI 5 text center using React MUI 5 Props.
import { Typography } from '@mui/material';
export default function Home() {
return (
<>
<Typography variant="h5" align="center">
React MUI 5 Text Align Center
</Typography>
</>
);
}
3. MUI 5 text center using React MUI 5 sx props.
<Typography variant="h5" sx={{ textAlign: 'center' }}>
Related Posts
create a chat ui in react with mui 5
create a blog section in react mui 5
create a footer in react mui 5
create a responsive navbar in react with mui 5
react mui 5 search bar example
react mui 5 login page example
react mui 5 image list example
react mui 5 toggle switch example
react mui 5 registration form example
react mui 5 contact us page example
react mui 5 loading skeleton example
react mui 5 gradient button example
react mui 5 social media icons example
react mui 5 snackbar toast notification example
how to use autocomplete react mui 5
dynamically multiple input fields in react mui 5
how to use dropdown menu in react mui 5
how to use background image in react mui 5
how to use pricing table in react mui 5
how to use dark mode in react mui 5
how to use file upload in react mui 5
how to use sticky navbar in react mui 5
how to use box shadow in react mui 5
how to use multi step form in react mui 5
how to use loading button in react mui 5