Library / SDK
cocopon/tweakpane avatar
cocopon/tweakpane

Tweakpane: a dependency-free GUI pane for tuning parameters in the browser

:control_knobs: Compact GUI for fine-tuning parameters and monitoring value changes

4,751 stars143 forksTypeScriptMIT

At a glance

What is it?
Tweakpane is a compact TypeScript pane library for fine-tuning parameters and watching values change, inspired by dat.GUI. It is aimed at creative coding and demos where a full settings UI would be overkill, and it ships as ES modules from version 4 onward.
Who is it for?
Adopt Tweakpane when you need a small in-page pane for numbers, strings, booleans, colors and points, and you are building with ES modules or a bundler that handles them. Skip it if you need a CommonJS build (stay on 3.x) or a framework-native component library with its own state model.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 8 months ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • cocopon/tweakpane4,751 ★ · +154
Star history
Repository2026-09-232026-11-22
cocopon/tweakpane4.6k4.8k

154 Stars in the last 60 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What Tweakpane solves, and for whom

Every interactive sketch eventually needs a row of sliders. You want to change a spring constant, a blur radius, a color, and see the result immediately, without rebuilding the page or editing source. Tweakpane exists for that job. It is a pane library for fine-tuning parameters and monitoring value changes, and the README names dat.GUI as its inspiration. The stated traits are a clean and simple design, no dependencies, and extensibility. The audience is people writing creative coding, generative art, Three.js scenes, shader playgrounds and internal demos in the browser. It is not a form builder for end users and not an application settings screen. It is a developer tool that lives next to the thing you are tuning, and that assumption shapes every design decision in the library.

Bindings, readonly monitors and the pane model

The core abstraction is a binding: you attach a pane control to a value and the control reads and writes it. The README lists bindings for Number, String, Boolean, Color, and Point 2D, 3D and 4D. Alongside those are readonly bindings for Number, String and Boolean, which display a value without letting the user edit it. That split matters in practice. A readonly monitor is how you show a frame counter, a measured distance or a computed state while the editable controls sit above it. On top of the controls, the README lists UI components: Folder, Tab, Button and Separator. Folders and tabs are the only structure the library offers for grouping, so a pane with fifty parameters becomes a scrolling column unless you organize it yourself. There is no layout engine beyond that. Theming is documented as a feature, and plugins are documented as a feature, which is the extension path when the built-in bindings do not cover your type. The README also lists mobile support, TypeScript type definitions, and JSON import and export under misc. JSON export is the quiet win here: it lets you capture a tuned set of parameters and paste it back later, which turns a session of slider dragging into a reproducible configuration.

Installing Tweakpane and adding a first control

The README does not print install commands itself. It points to the Getting Started section of the documentation for concrete steps, and adds one instruction that is easy to miss: install @tweakpane/core if you are developing with TypeScript. So the package name to look up is tweakpane, and the companion package for TypeScript work is @tweakpane/core. The repository package.json shows a monorepo with packages/core and packages/tweakpane as workspaces, version 4.0.5, and an MIT licence. If you want to build the library from source rather than consume the published package, the README gives this sequence, which starts a web server for the document, builds the source files and watches for changes:

bash
$ npm ci
$ npm run setup
$ cd packages/tweakpane
$ npm start

After that the README says to open http://localhost:8080/ to browse the document. For normal use you would install the published package into your own project and import Pane, then add a binding for the value you want to tune. The exact import and binding call belongs to the Getting Started page, which the README treats as the authoritative source; check it there rather than copying a snippet from a blog post, because the version 4 migration changed the module format. The repository layout confirms where the two packages live: packages/core and packages/tweakpane, with the root package.json marked private and used only to orchestrate setup, lint and coverage across the workspaces.

Version 4 dropped CommonJS, and that is a real constraint

The README states plainly that from version 4 Tweakpane migrated to ES modules, and that anyone needing a CommonJS version of the package should use version 3.x. This is the single most consequential limitation for adopters. If your build pipeline is an older CommonJS setup with no ESM interop, or a tool that cannot resolve ES module packages, Tweakpane 4 is not a drop-in. You either pin to 3.x and accept that you are on the previous major line, or you change your build. The release history reinforces the point that 4.x is the current line: 4.0.5 arrived on 2024-11-03, 4.0.4 on 2024-06-30 and 4.0.3 on 2023-12-22. Note the spacing. The 4.x releases are not frequent, and the last push to the repository was on 2026-03-15, so this is a library that moves in small, occasional steps rather than a fast-churning dependency. That is fine for a self-contained GUI widget, and it also means you should not expect a stream of new bindings. The other limitation is structural: the README documents no rollback or undo, no persistence layer of its own beyond JSON import and export, and no documented accessibility story. If your pane is a user-facing control surface rather than a developer tool, those gaps matter.

Tweakpane versus dat.GUI and framework component libraries

The README itself names dat.GUI as the inspiration, and it offers a migration guide for dat.GUI users, so that is the honest comparison. dat.GUI is the older, widely copied pane library; Tweakpane is the newer take on the same idea, with the README claiming a clean and simple design, no dependencies, and extensibility as the differences. The practical distinction to verify is the binding and plugin surface: Tweakpane documents a plugin mechanism and a Design Kit Figma file for building your own plugin, and it ships TypeScript type definitions. The second alternative is a framework component library, the kind you get by wiring a React or Vue control panel around your state. That approach buys you the framework's reactivity, component composition and the ability to style controls with your existing design system. It costs you a dependency tree and a state model you now have to reconcile with your render loop. Tweakpane takes the opposite position: it is dependency-free, it owns its own small DOM tree, and it does not care what framework you use, which is why people reach for it inside a Three.js scene where a React re-render would be unwelcome. If your parameters already live in a framework store and you want them bound two ways, the component library is the better fit. If you have a plain object of numbers and want sliders in ten minutes, Tweakpane is the shorter path.

Maintenance, licence and what upgrading costs

The repository is not archived, and the last push was on 2026-03-15. The 4.x release cadence is slow: three releases between 2023-12-22 and 2024-11-03, with nothing in the release list after that. Read that as a stable, low-churn library rather than an abandoned one, and plan accordingly: pin your version, and do not assume fixes will arrive quickly. The licence is MIT, stated in the README and in the root package.json, and the README points to LICENSE.txt for the full text. MIT is permissive, which means the usual obligations apply: keep the copyright notice and the licence text with any distribution. That is a summary of what the repository says, not legal advice; read LICENSE.txt yourself if you are shipping the library inside a product. The upgrade cost is concentrated at the major version boundaries. The 3.x to 4.x move is the module format change described above, and it is the one that will touch your build configuration rather than your pane code. The README also links a migration guide for dat.GUI users, so if you are coming from dat.GUI there is a documented path rather than a rewrite from scratch. Within 4.x, the patch releases suggest incremental fixes rather than API breaks, though the README does not publish a compatibility policy, so verify against the changelog before bumping.

Editorial conclusion

Adopt Tweakpane when you need a small in-page pane for numbers, strings, booleans, colors and points, and you are building with ES modules or a bundler that handles them. Skip it if you need a CommonJS build (stay on 3.x) or a framework-native component library with its own state model. Before wiring it into a project, confirm the exact install and binding syntax on the Getting Started page, since the README defers to it, and check that @tweakpane/core is installed if you are writing TypeScript against the core package.

Frequently asked questions

Does Tweakpane work with React?

The README does not document a React integration. It describes Tweakpane as a dependency-free pane library, so using it alongside React means mounting the pane yourself and keeping it out of React's render cycle. The documentation is the place to check for any official guidance.

Why can't I import Tweakpane in my CommonJS project?

Because from version 4 the package was migrated to ES modules. The README says that if you are looking for a CommonJS version of the package, you should use version 3.x instead.

Do I need to install @tweakpane/core to use Tweakpane?

The README says to remember to install @tweakpane/core if you are developing with TypeScript. For plain JavaScript use, the README only directs you to the Getting Started section of the documentation for concrete install steps.

What kinds of values can Tweakpane bind to?

The README lists bindings for Number, String, Boolean, Color, and Point 2D, 3D and 4D, plus readonly bindings for Number, String and Boolean. UI components cover Folder, Tab, Button and Separator.

Can I save and restore a set of tuned parameters in Tweakpane?

The README lists JSON import and export under misc features. That is the mechanism it documents for moving parameter values in and out of a pane.

Official sources

  1. cocopon/tweakpane on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/cocopon-tweakpane.svg)](https://hysenlabs.com/projects/cocopon-tweakpane)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/cocopon-tweakpane.svg)](https://hysenlabs.com/projects/cocopon-tweakpane)

Was this useful?