tweakpane / use-tweaks

🎛️ Tweak React components with Tweakpane
https://codesandbox.io/s/use-tweaks-example-58e02
MIT License
768 stars 23 forks source link

Multiple panes on a page #42

Open tol-is opened 3 years ago

tol-is commented 3 years ago

Hi, I'm trying to add multiple tweak panes on a page, independent of each other, just separate demos stacked.

I figured I can pass a container via settings and this attaches the pane to a custom element, but what seems to happen is after the first instance, all tweak-panes are mounted to the same container regardless of their respective hook configuration.

I'm not sure if that's a bug, a feature or if I'm missing something, but I would certainly appreciate any help.

You can see a demo of the issue here: https://scramble-git-demos.a7sc11u.vercel.app/

And here's my repo (main.jsx and typewriter.jsx) are the layouts that use useTweaks https://github.com/a7sc11u/scramble-site/blob/demos/src/

Thanks in advance!

P.S. Thank you for putting this library together, I love it!