ui icon indicating copy to clipboard operation
ui copied to clipboard

Add Sidebar component

Open SilvianAchim opened this issue 1 year ago • 4 comments
trafficstars

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 avatar Jan 24 '24 18:01 SilvianAchim

@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

imopbuilder avatar Jan 25 '24 06:01 imopbuilder

@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

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 avatar Jan 28 '24 16:01 MilanObrenovic

@MilanObrenovic

Refer to issue #2602

imopbuilder avatar Jan 29 '24 05:01 imopbuilder

@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.

MilanObrenovic avatar Jan 30 '24 17:01 MilanObrenovic

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.

shadcn avatar Feb 22 '24 23:02 shadcn