Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Instructions in Grid v1 not specified in Grid v2 #44759

Open
ccowen opened this issue Dec 13, 2024 · 1 comment
Open

[docs] Instructions in Grid v1 not specified in Grid v2 #44759

ccowen opened this issue Dec 13, 2024 · 1 comment
Labels
status: waiting for author Issue with insufficient information support: docs-feedback Feedback from documentation page

Comments

@ccowen
Copy link

ccowen commented Dec 13, 2024

Related page

https://mui.com/material-ui/react-grid2/

Kind of issue

Unclear explanations

Issue description

I'm having trouble with Grid2, with a couple of things. I want a container to take up 100% height of a page. I also want to create a Grid item that is centered vertically. I would easily be able to apply this in Grid1, which is on the documentation page, with

alignItems: "center", /* "center" to center elements vertically, or "stretch" to stretch the height to fill the space*/

I am unsure if i am supposed to accomplish this another way. In Grid v1 these instructions are specified, but I am unable to learn how to apply this for Grid v2. Heught is not meentioned on this page at all. I have looked into incorporating other components but am lost.

Context

I would like these features explained in v2 as they are presented in Grid v1.

Search keywords: Grid v2, height, stretch

@ccowen ccowen added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Dec 13, 2024
@siriwatknp
Copy link
Member

I would easily be able to apply this in Grid1, which is on the documentation page, with
alignItems: "center", /* "center" to center elements vertically, or "stretch" to stretch the height to fill the space*/

Can you point me to that section? I can add it to the Grid 2 docs if it's missing.

FYI, you can achieve the same with sx prop:

<Grid2 sx={{ alignItems: 'center' }}>

@siriwatknp siriwatknp added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for author Issue with insufficient information support: docs-feedback Feedback from documentation page
Projects
None yet
Development

No branches or pull requests

2 participants