![]() ![]() The draggable component's `dragControls` prop. Might want to initiate dragging from a different component than the draggable one.īy creating a `dragControls` using the useDragControls hook, we can pass this into Use-cases, for instance clicking at an arbitrary point on a video scrubber, we Usually, dragging is initiated by pressing down on a component and moving it. See inertia for all properties you can use. This property allows you to customize it. The animation is based on your dragging velocity. When releasing a draggable Motion, an animation with type `inertia` starts. Any missing values will be set to `0`.Īpply momentum from the pan gesture to the component when draggingĪllows you to change dragging inertia parameters. * By passing an object of `top`/`right`/`bottom`/`left`, individual values can be set Can also be set as `false` to disable movement. The degree of movement allowed outside constraints. Of the component you want to use as constraints. ![]() This `ref` should be passed both to the draggable component's `dragConstraints` prop, and the `ref` This will define a distance the named edge of the draggable component.Īlternatively, it can accept an element node created by bind:this directive. ![]() It can accept an object of optional `top`, `left`, `right`, and `bottom` values, measured in pixels.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |