You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`closeThreshold`: Number between 0 and 1 that determines when the drawer should be closed. Example: threshold of 0.5 would close the drawer if the user swiped for 50% of the height of the drawer or more.
62
62
63
-
`scrollLockTimeout`: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms
63
+
`scrollLockTimeout`: Duration for which the drawer is not draggable after scrolling content inside of the drawer. Defaults to 500ms.
64
64
65
-
`snapPoints`: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Example `[0.2, 0.5, 0.8]`. You can also use px values, which doesn't take screen height into account.
65
+
`snapPoints`: Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Example [0.2, 0.5, 0.8]. You can also use px values, which doesn't take screen height into account.
66
66
67
-
`fadeFromIndex`: Index of a `snapPoint` from which the overlay fade should be applied. Defaults to the last snap point.
67
+
`fadeFromIndex`: Index of a snapPoint from which the overlay fade should be applied. Defaults to the last snap point.
68
68
69
-
`direction`: Direction of the drawer. Can be `top`, `bottom`, `left`, or `right`. Defaults to `bottom`.
69
+
`modal`: When false it allows to interact with elements outside of the drawer without closing it. Defaults to true.
70
70
71
-
`backgroundColor`: Background color of the body when the drawer is open and `shouldScaleBackground` is true. Defaults to black.
71
+
`handleOnly`: When true only allows the drawer to be dragged by the <Drawer.Handle /> component. Defaults to false.
72
+
73
+
`direction`: Direction of the drawer. Can be top or bottom, left, right. Defaults to bottom.
74
+
75
+
`preventScrollRestoration`: When true it prevents scroll restoration when the drawer is closed after a navigation happens inside of it. Defaults to true.
76
+
77
+
`disablePreventScroll`: When true scroll prevention mechanism will be disabled. Scroll prevention ensures that page will not scroll on mobile when opening drawer. However this mechanism gets confused when drawer has an input with autofocus and therefore opens simulataneosly with touch keyboard. Defaults to true. modal set to false also disables it.
78
+
79
+
`noBodyStyles`: When true the body doesn't get any styles assigned from Vaul.
80
+
81
+
`setBackgroundColorOnScale`: When false we don't change body's background color when the drawer is open. true by default.
72
82
73
83
`[data-vaul-no-drag]`: When interacting with an element with this data attribute, the drawer won't be dragged.
0 commit comments