{"id":20649259,"url":"https://github.com/repalash/uiconfig-tweakpane","last_synced_at":"2025-06-12T04:10:52.666Z","repository":{"id":138763471,"uuid":"609795302","full_name":"repalash/uiconfig-tweakpane","owner":"repalash","description":"Tweakpane theme/wrapper library for uiconfig.js: A UI renderer framework to dynamically generate website/configuration UIs from a JSON-like configurations and/or typescript decorators.","archived":false,"fork":false,"pushed_at":"2025-01-05T10:46:33.000Z","size":460,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T18:11:25.633Z","etag":null,"topics":["interfaces","javascript","json","library","tweakpane","tweakpane-plugin","typescript","ui"],"latest_commit_sha":null,"homepage":"http://repalash.com/uiconfig-tweakpane/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/repalash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-05T09:03:27.000Z","updated_at":"2025-02-06T14:43:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a7e8b29-c3e5-42e3-869d-e418e08dfebc","html_url":"https://github.com/repalash/uiconfig-tweakpane","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fuiconfig-tweakpane","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fuiconfig-tweakpane/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fuiconfig-tweakpane/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repalash%2Fuiconfig-tweakpane/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/repalash","download_url":"https://codeload.github.com/repalash/uiconfig-tweakpane/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249295970,"owners_count":21246227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interfaces","javascript","json","library","tweakpane","tweakpane-plugin","typescript","ui"],"created_at":"2024-11-16T17:13:25.804Z","updated_at":"2025-04-17T00:58:29.675Z","avatar_url":"https://github.com/repalash.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UiConfig Tweakpane\n\n[![NPM Package](https://img.shields.io/npm/v/uiconfig-tweakpane.svg)](https://www.npmjs.com/package/uiconfig-tweakpane)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nTweakpane theme/wrapper library for [uiconfig.js](https://github.com/repalash/uiconfig.js): A UI renderer framework to dynamically generate website/configuration UIs from a JSON-like configurations and/or typescript decorators. \n\nIt includes several components for editor-like user interfaces like folders, sliders, pickers, inputs for string, number, file, vector, colors, etc.\n\nThe UI components are bound to javascript/typescript objects and properties through a JSON configuration.\n\n### Examples\n\nBasic Examples: https://repalash.com/uiconfig.js/examples/index.html\n\nThreepipe Basic UI: https://threepipe.org/examples/#tweakpane-ui-plugin/\n\nThreepipe Editor: https://threepipe.org/examples/#tweakpane-editor/\n\n## Installation and Usage\n\n### npm package\n\nInstall the `uiconfig-tweakpane` package from npm.\n```bash\nnpm install uiconfig-tweakpane\n```\n\nUse in any javascript/typescript file.\n```typescript\nimport { UI } from 'uiconfig-tweakpane';\n\nconst config = {\n    type: \"slider\",\n    label: \"slider\",\n    value: 0.5,\n    bounds: [0, 1],\n    onChange: () =\u003e {\n        console.log(\"changed\", config.value);\n    },\n}\n\nconst ui = new UI();\nui.appendChild(config);\n```\n\n### CDN link\n\nThe module can be imported to HTML/JS a CDN link using [unpkg](https://unpkg.com/) or [jsdelivr](https://www.jsdelivr.com/).\n\n```html\n\u003cscript src=\"https://unpkg.com/uiconfig-tweakpane\"\u003e\u003c/script\u003e\n\u003c!--or--\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/uiconfig-tweakpane\"\u003e\u003c/script\u003e\n```\n\nThe module can be accessed with the short-form `tpui`\n```html\n\u003cscript\u003e\n    const config = {\n        type: \"button\",\n        label: \"click me\",\n        onClick: () =\u003e {\n            console.log(\"clicked\");\n        },\n    }\n    \n    const ui = new tpui.UI()\n    ui.appendChild(config)\n\u003c/script\u003e\n```\n\n## Configuration\n\nCheck the documentation at [uiconfig.js](https://github.com/repalash/uiconfig.js) on how to create a configuration for the UI.\n\n## Components\n\n1. `folder/panel` - A folder that can be collapsed and expanded. It can have other components as children.\n2. `input` - A text input field for any kind of primitive types. The type is determined automatically from initial value.\n3. `number` - A number input field for numbers.\n4. `slider` - A slider for numbers. \n5. `dropdown` - A dropdown. Options can be specified in children with label and optional value properties.\n6. `checkbox/toggle` - A checkbox for boolean values.\n7. `button` - A button that can trigger a function, `onClick` or bound property/value function.\n8. `color` - A color picker for colors.\n9. `vector/vec2/vec3/vec4` - Multiple number input fields in a row for vectors.\n\n## Three.js integration\n\nSet the three.js classes for Color, Vector2, Vector3, Vector4 in the renderer and the color and vector components will automatically use them.\n\n```typescript\nimport { UI } from 'uiconfig-tweakpane';\nimport { Color, Vector4, Vector3, Vector2 } from 'three';\n\nconst ui = new UI();\nui.THREE = {Color, Vector4, Vector3, Vector2}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepalash%2Fuiconfig-tweakpane","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frepalash%2Fuiconfig-tweakpane","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepalash%2Fuiconfig-tweakpane/lists"}