At the moment, the button is outputting on the top left corner. How to bring the button to the middle of the page?
import {Button} from '@mui/material';
function App() {
return (
<Button variant="contained">Hello World</Button>
);
}
export default App;
Tried the above code but obviously requires more changes to centre it
2
Answers
You can use the
Box
tag:You have to use Grid, if you don’t want to add custom styles