question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello ant-design team,

Is the responsiveness subject covered in this library? I am asking this as I could not find any documentation or example and Layout component does not have any prop about it.

Thank you.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

0reactions
stevesworkcommented, Jul 4, 2019

Layout.Sider has onBreakpoint and breakpoint props which I use as a workaround to monitor breakpoint changes. This technique is a bit unwieldy most especially when monitoring changes between two or more specific breakpoints but it is quite fast and saves me the trouble of either introducing yet another npm package into the fray or hand-rolling a bespoke solution. At this point, I simply do something along the lines: <Layout.Sider breakpoint="xs" onBreakpoint={broken => setIsInXsWidth(broken)} />. The onBreakpoint handler could also be wrapped in useCallback hook. If ant design has provided a more dedicated solution to this issue as of today, I am yet to become aware of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Responsive grid in 2 minutes with CSS Grid Layout - Travis Horn
The modern solution is a responsive grid that changes based on the size of the screen viewing it. Many developers jump to a...
Read more >
Responsive Grid System
The Responsive Grid System isn't a framework. It's not a boilerplate either. It's a quick, easy & flexible way to create a responsive...
Read more >
Look Ma, No Media Queries! Responsive Layouts Using CSS ...
In this article, we'll start dipping our toes into the power of CSS Grid by building a couple of common responsive navigation layouts....
Read more >
Responsive Grid Design: Ultimate Guide | by Nitish Khagwal
This article highlights the most important aspect of the responsive grid and how product designers can adapt grids in their design workflow.
Read more >
Responsive CSS Grid Tutorial - YouTube
New to CSS Grid ? Watch the full Crash Course here: https://www.youtube.com/watch?v=yOPCQ5nD1VsAdd Google Fonts to your web design here: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found