score:0
Accepted answer
try this code.
import react from "react";
import button from "@material-ui/core/button";
import grid from "@material-ui/core/grid";
function app() {
return (
<grid
container
spacing={0}
direction="column"
alignitems="center"
justify="center"
style={{ minheight: "100vh" }}
>
<grid item>
<button variant="contained" color="primary">
hello
</button>
</grid>
</grid>
);
}
export default app;
Source: stackoverflow.com
Related Query
- Align vertically in Grid of material-ui not works
- How to Align One Item Left, and Another Right using Material UI Grid Components
- How do I vertically align my items in a material-UI Grid row?
- How to align content differently for xs and md in material ui grid
- How to align items across nested Grid (React Material UI)
- React Material UI Grid Horizontally Align Items for Containers With Different Number of Items
- Material UI ListItemSecondaryAction vertically align in ListItem
- React - Material ui tooltip arrow is not align to the buttons/container
- Material UI Data Grid not working on adding column other than "ID"?
- How to align material-ui Grid items vertically centered?
- Material UI- Facing a problem to align the grid to float right
- Material UI Select component's customized icon do not vertically center
- Input & Label Do Not Vertically Align - Different Element Widths
- Material UI <TextField/> not Vertical Align with it's Label
- Nested grid containers and items are not fitting in the screen using material UI react
- Material UI Vertical Divider within Grid not showing
- How to align icon in material Grid item to the right always even screen change
- Material UI Grid not working properly with Paper Component for nested Grid
- Text not aligning vertically at the center of select dropdown in material UI core
- React Material UI Nested Grid - Not working
- Align Text Vertically on top material UI <Textfield />
- In material ui version 5 Grid component not stretching
- material UI Menu not appearing right place when button align right or left
- Material UI Grid Items not taking full width available
- Material UI: How to vertically centre align an icon button?
- Material UI data grid filter not working when using renderCell in a field
- React JSX background position not placing image to center right in Material UI Grid item
- React Material UI Grid align items conditionally to either left or right of screen
- How do I align two Grid items left and one right in Material UI when the first Grid item is a fixed width?
- Material UI: Grid does not put select in row
More Query from same tag
- creating a popup without onclick
- React Native TextInput: why does secureEntryText shift outside of input box and have ellipsis?
- Prevent React component re render when route change
- How does object spread notation transform react redux props?
- Hello, i use NextJs and i need to achieve url like page/[id]/[slug] from page
- redux practice for 2 frequent challenges
- React how to resume counter from the moment I stopped
- Updating State for changed item not displaying on react frontend
- Eslint configure for react
- How to fix amcharts zoom reset on data reload
- handleSubmit not accessing the value from input
- How to refresh Fabric-Ui DetailsList when updating a row
- I'm having trouble with my NEXTJS blog, Server Error TypeError: Only absolute URLs are supported when fetching data from graphql api
- React: Function call after render() and before child's constructor()
- React set state variable
- Explanation about Action Type
- Troubleshooting Typescript definition file for React Component
- Setting a state in react.js with two-way binding
- React component is declared but its value is never read BUT I HAVE "READ" IT
- Styling <Link> component from React-router-dom, doesnt work with styled components
- React lifecycle methods order
- Windows issue with symlinks in VBox shared folders
- TypeError: require(...) is not a function while Using sequalize with node js
- React search the text in an array of objects on Onchange of input
- Solve Jest test error from Webpack plugin
- request body is not passing from Next.js to Node.js server
- Handling Multiple Checkboxes with Material UI and Formik
- TypeError: state is not iterable
- How to suppress linting of valid useEffect instances?
- Graphcomment plugin - implementation with Gatsby