cschroeter / park-ui

Beautifully designed components built on Ark UI that work for the JS and CSS frameworks of your choice.
https://park-ui.com
MIT License
1.47k stars 59 forks source link

Feature Request: Drawer(corvu) #302

Open FlatMapIO opened 2 months ago

FlatMapIO commented 2 months ago

The drawer is a complex component commonly used in mobile terminals. If 'park-ui' implements it, we would no longer need to make an effort to integrate third-party libraries.

links:

dannylin108 commented 1 month ago

https://park-ui.com/docs/panda/components/drawer

coopbri commented 1 month ago

Not sure why you gave @dannylin108 a thumbs down, he is correct. You can simply add a variant to the drawer that changes its position to the bottom of the screen, such as what my team implemented here: https://github.com/animareflection/ui/blob/master/src/components/core/Drawer/Drawer.recipe.ts#L107-L120

Demo (Storybook)

FlatMapIO commented 1 month ago

Not sure why you gave @dannylin108 a thumbs down, he is correct. You can simply add a variant to the drawer that changes its position to the bottom of the screen, such as what my team implemented here: https://github.com/animareflection/ui/blob/master/src/components/core/Drawer/Drawer.recipe.ts#L107-L120

Demo (Storybook)

These are two entirely different things, merely sharing the same name. You can refer to https://corvu.dev/docs/primitives/drawer/ for more details; it represents a mobile-native design. It is not a simple dialog.

coopbri commented 1 month ago

Thank you for removing the thumbs down, I did see that but it appears to be the same thing except adding draggability (which is easy to implement), even rendering as a div just the same. I understand you seem to be asking about not using other libraries for dragging though, it was just unclear from the OP

FlatMapIO commented 1 month ago

For the primary UI, the crucial aspects are anatomy and state machines part, while templates are not of significant importance. Otherwise, @corvu/drawer would not have so much code, even though it is built upon @corvu/dialog.