Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
gooey
A modern gui library for typescript and javascript (yet another web gui).
Work in progress..
Features
- Flexible API
- Thoroughly Typed
- Zero Dependencies
- Preset Manager
- Theme Manager
- Undo History
- Draggable / Resizable
-
addMany
for Bulk Generation - Strong Type Inference
- Reset to Default buttons
- Monitors
- LFO / Envelope manager
- Curve Editor
- Plugins
- Svelte Components
Inputs
Status | Feature | Primitive |
---|---|---|
✅ | Number | number |
✅ | Color | Color | ColorRepresentation |
✅ | Select | Array<any> |
✅ | Switch | boolean |
✅ | Text | string |
🚧 | Textarea | string |
🚧 | Range | { min, max } |
🚧 | Vector3 | { x, y, z } |
🚧 | Vector2 | { x, y } |
Installation
NPM
pnpm install gooey
or, JSR
jsr add @braebo/gooey
Usage
Create a new Gooey
.
import { Gooey } from 'gooey' const gui = new Gooey()
Inputs
The add
method takes a title
string and an options
object. It will infer the type of the input from the value
property
and generate the appropriate input.
const input = gui.add('count', 1) // ^? InputNumber // Pass in options. const input = gui.add('count', 1, { min: 0, max: 10, step: 1 })
Add multiple inputs at once with addMany
.
gooey.addMany({ number: 0, color: '#ff0000', select: ['a', 'b', 'c'], switch: true, text: 'hello' })
You can use each individual adder methods directly to create a specific input:
gui.addNumber('count', 1) gui.addText('name', 'John Doe') gui.addColor('fav color', '#00FFFF') gui.addSelect('type', ['a', 'b', 'c']) gui.addButton('log', () => console.log('clicked')) gui.addSwitch('enabled', true) gui.addButtonGrid('playback', TODO) numberInput.on('change', console.log)
Folder
TODO - More docs...
About
tweakpane was the main inspiration for this project. I recommend it over gooey
-- it's a more lightweight solution with more features and an awesome, highly active developer!
I started this to scratch an itch, and pave the way for more advanced features related to 3D / audio / audio-reactivity in the future.
Other, similar projects:
Add Package
deno add jsr:@braebo/gooey
Import symbol
import * as gooey from "@braebo/gooey";
Import directly with a jsr specifier
import * as gooey from "jsr:@braebo/gooey";
Add Package
pnpm i jsr:@braebo/gooey
pnpm dlx jsr add @braebo/gooey
Import symbol
import * as gooey from "@braebo/gooey";
Add Package
yarn add jsr:@braebo/gooey
yarn dlx jsr add @braebo/gooey
Import symbol
import * as gooey from "@braebo/gooey";
Add Package
vlt install jsr:@braebo/gooey
Import symbol
import * as gooey from "@braebo/gooey";
Add Package
npx jsr add @braebo/gooey
Import symbol
import * as gooey from "@braebo/gooey";
Add Package
bunx jsr add @braebo/gooey
Import symbol
import * as gooey from "@braebo/gooey";