|
@@ -13,10 +13,37 @@ thumbnail: /recipes/tweakpane.png
|
|
|
|
|
|
First, install Tweakpane v4 in your project:
|
|
|
|
|
|
-```bash
|
|
|
+::code-group
|
|
|
+```bash [npm]
|
|
|
npm install tweakpane@^4.0.0
|
|
|
```
|
|
|
|
|
|
+```bash [yarn]
|
|
|
+yarn add tweakpane@^4.0.0
|
|
|
+```
|
|
|
+
|
|
|
+```bash [pnpm]
|
|
|
+pnpm add tweakpane@^4.0.0
|
|
|
+```
|
|
|
+::
|
|
|
+
|
|
|
+Additionally, if you are working with TypeScript:
|
|
|
+
|
|
|
+::code-group
|
|
|
+```bash [npm]
|
|
|
+npm install --save-dev @tweakpane/core
|
|
|
+```
|
|
|
+
|
|
|
+```bash [yarn]
|
|
|
+yarn add --save-dev @tweakpane/core
|
|
|
+```
|
|
|
+
|
|
|
+```bash [pnpm]
|
|
|
+pnpm add --save-dev @tweakpane/core
|
|
|
+```
|
|
|
+::
|
|
|
+
|
|
|
+
|
|
|
::tip
|
|
|
Make sure to use Tweakpane v4 or higher, as this recipe uses the latest API which has breaking changes from v3.
|
|
|
::
|
|
@@ -166,6 +193,6 @@ onUnmounted(() => {
|
|
|
})
|
|
|
```
|
|
|
|
|
|
-::: tip
|
|
|
+:::tip
|
|
|
Always dispose of the pane instance to prevent memory leaks, especially in SPAs where components are frequently mounted/unmounted.
|
|
|
:::
|