ui
ui copied to clipboard
Add Sidebar component
Add a Sidebar component that opens the side of the screen on desktop and mobile in the bottom side of the screen, you should see a menu icon, and once opened you'll get 90-80% of the screen with a Drawer containing that sidebar. The behavior should be mostly exactly like the YouTube sidebar of subscriptions, my channel, watch later, etc.
@SilvianAchim
I hope that this will work fine. There is an example in the docs link: https://ui.shadcn.com/docs/components/drawer#responsive-dialog
Replace the Dialog components with the Sheet components
Note: link to the useMediaQuery hook used in the component
link: https://github.com/shadcn-ui/ui/blob/main/apps/www/hooks/use-media-query.tsx
@SilvianAchim
I hope that this will work fine. There is an example in the docs link: https://ui.shadcn.com/docs/components/drawer#responsive-dialog
Replace the
Dialogcomponents with theSheetcomponentsNote: link to the
useMediaQueryhook used in the component link: https://github.com/shadcn-ui/ui/blob/main/apps/www/hooks/use-media-query.tsx
what if i want to use the drawer as a sidebar? because i want to be able to swipe off the menu on mobile, and only a drawer can do that. i've built this. but then the biggest problem is scrolling.. scrolling within the navigation bar inside the drawer component doesnt work. either scrolling works but swiping off doesnt or vice versa
@MilanObrenovic
Refer to issue #2602
@MilanObrenovic
Refer to issue #2602
that is not a valid solution. notice how many times i said i need the SCROLLING, AND, SWIPING to work. not just scrolling. not just swiping. i want both. you provided a solution only for 1 to work.
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.