Replies: 3 comments 2 replies
-
Your example should work just fine. What issue do you experience with it? |
Beta Was this translation helpful? Give feedback.
-
@rtivital I want it to have two different modes based on if using mobile device or wider devices. If on wider devices, there should be no ability to close the drawer; it should permanently be on the left side of the screen always visible, and the burger should not exist/be rendered. If on mobile device, it should behave as the code example currently has it; you can close the drawer with the x, and open it up again with the burger. |
Beta Was this translation helpful? Give feedback.
-
If anyone still interested, try this:
though when close, the layout is changing only after the close animation ends, so you can keep the drawer And with this code, there is a wrapping the drawer, and I have no idea how to remove the div,
so to style the wrapper, add another wrapper to the drawer and style with .wapper > div {} |
Beta Was this translation helpful? Give feedback.
-
I am currently using the Drawer component combined with a Burger for a sidebar, with the sidebar being hidden by default and popping up from the left when burger is clicked. I only want this behavior on mobile, and want the drawer to persistently be on the left when on larger devices like desktops.
I do not see any examples on how to do this. I am sure it is quite trivial to an experienced frontend react dev. Most of my googling just results Material UI tutorials. I am not primarily a web developer, I'm using a UI library specifically get this sort of GUI functionality out of the box instead of having to implement much myself. But it looks like Mantine wants me to do a bit of manual work to get this behavior.
Here's what I've got so far
Anyone have any easy approaches?
Beta Was this translation helpful? Give feedback.
All reactions