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

[Question] Conditionally render split pane without layout shift #439

Open
MartinXPN opened this issue Nov 27, 2024 · 0 comments
Open

[Question] Conditionally render split pane without layout shift #439

MartinXPN opened this issue Nov 27, 2024 · 0 comments

Comments

@MartinXPN
Copy link

MartinXPN commented Nov 27, 2024

Is there any way to:

  • Render a split pane for desktop (large) screens
  • Not render the split pane but rather place the left and right parts below each other

Without causing a layout shift on the client side.

Context

I'm using NextJS. So, the initial rendering happens on the server. After which, the client gets the rendered component and causes a layout shift on mobile devices when I conditionally render the right pane (either below or to the right of the left one).

Is there any way to do this with CSS or another way using this library that wouldn't cause a layout shift?

Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant