emilkowalski / vaul

An unstyled drawer component for React.
https://vaul.emilkowal.ski
MIT License
5.29k stars 170 forks source link

Fix Non-Dismissable Swiping #276

Closed keeganpotgieter closed 4 months ago

keeganpotgieter commented 4 months ago

Fix a UI issue where the user is unable to drag the drawer in the open direction—up is the default, for example—when the first snap point is active. The fix ensures the user cannot drag beyond the first snap point on close, but can drag open smoothly. It also removes the issue/bug where the user can drag beyond the first snap point when another snap point is active.

Examples

Before Fix

After Fix

Example Drawer.Root props

<Drawer.Root dismissible={false} snapPoints={[0.2, 1]} modal={false}>
    ...
</Drawer.Root>
vercel[bot] commented 4 months ago

@keeganpotgieter is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.