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
Copy file name to clipboardExpand all lines: docusaurus/docs/introduction.mdx
+42-3Lines changed: 42 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ sidebar_label: Getting started
6
6
7
7
importExamplefrom'./examples/'
8
8
import { EasterDiv } from'./examples/examples'
9
-
importTabsfrom'@theme/Tabs';
10
-
importTabItemfrom'@theme/TabItem';
9
+
importTabsfrom'@theme/Tabs'
10
+
importTabItemfrom'@theme/TabItem'
11
11
12
12
React-use-gesture is a set of hooks that let you bind mouse and touch events to any React component. With the data you receive, it becomes easy to set up complex gestures like dragging and pinching with a few lines of code.
The following example makes a <EasterDiv><div/></EasterDiv> draggable so that it follows your mouse or finger on drag, and returns to its initial position on release.
46
46
47
+
> All examples in this documentation use React-spring v9, that you can install with the `next` tag: `react-spring@next`. v9 api is more convenient and allows for more compact, less distracting code. The following example is the only one available with React-spring v8.
48
+
49
+
<Tabs
50
+
defaultValue="v9"
51
+
values={[
52
+
{ label: 'With React-spring v9', value: 'v9', },
53
+
{ label: 'With React-spring v8', value: 'v8', },
54
+
]
55
+
}>
56
+
<TabItemvalue="v9">
57
+
47
58
```jsx {1-100}
48
59
import { useSpring, animated } from'react-spring'
49
60
import { useDrag } from'react-use-gesture'
@@ -61,7 +72,35 @@ function PullRelease() {
61
72
}
62
73
```
63
74
64
-
> All examples in this documentation use React-spring v9, that you can install with the `next` tag: `react-spring@next`. v9 api is more convenient and allows for more compact, less distracting code.
0 commit comments