![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Guify is a runtime JS library that gives you a simple way to build a GUI for your JS projects. It pairs very well with three.js and p5.js. Consider it an opinionated take on dat.GUI.
Here are the big features:
var someVariable = 0;
guify.Register([{
{
type: 'range',
object: this, property: 'someProperty',
label: 'Some Property',
min: 0, max: 20, step: 1
},
}])
Below are some common ways to integrate Guify with your setup.
To integrate on an existing page, you can use the transpiled version in /lib
, either by including it with your files or using a CDN:
<script src="https://unpkg.com/guify@0.15.1/lib/guify.min.js"></script>
This adds a guify
function at the global level, which you can use to construct the GUI. For example:
<script src="https://unpkg.com/guify@0.15.1/lib/guify.min.js"></script>
<script>
var gui = new guify({ ... })
gui.register([ ... ])
</script>
See the Usage guide below for more details. example.html also demonstrates this pattern.
First, install with NPM: npm install --save guify
Then you can import using either require
or import
depending on your preference:
// ES6
import guify from 'guify'
// Require
let guify = require('guify');
Then you can make a quick GUI this way:
var gui = new guify({ ... });
gui.Register([ ... ]);
See the Usage guide below for more details.
Check out the unofficial React port.
Once you have Guify available to construct in your project, make a guify
instance:
var gui = new guify({
title: "Some Title",
});
The various controls in Guify are called "components". You can feed component definitions to Guify as follows:
gui.Register([
{ // A slider representing a value between 0 and 20
type: 'range', label: 'Range',
min: 0, max: 20, step: 1,
onChange: (value) => {
console.log(value);
}
},
{
type: 'button', label: 'Button',
action: () => {
console.log('Button clicked!');
}
},
{
type: 'checkbox', label: 'Checkbox',
onChange: (value) => {
console.log(value);
}
}
]);
You can also bind components representing a value to your JS variables instead of using an onChange()
handler. For example:
var someNumber = 10;
gui.Register([
{ // A slider representing `someNumber`, constrained between 0 and 20.
type: 'range', label: 'Range',
min: 0, max: 20, step: 1,
object: this, property: 'someNumber'
},
There are many points of customization here. See the docs at /docs/api.md. A much more robust example can also be found at example.html.
If you want to build this package, you can run npm install
and then npm run build:prod
, which will create /lib/guify.min.js
.
NPM commands:
build:prod
: Creates /lib/guify.min.js
, the default script used by this package.build:dev
: Creates /lib/guify.js
.develop
: Runs build:dev
and serves the /example
directory as a static web page.See changelog.md.
MIT license. See license.md for specifics.
This package is largely based on control-panel. For setting this up, I used webpack-library-starter.
0.15.1
Remove()
.FAQs
A simple GUI for inspecting and changing JS variables
The npm package guify receives a total of 168 weekly downloads. As such, guify popularity was classified as not popular.
We found that guify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.