Gathering detailed insights and metrics for react-gui-controller
Gathering detailed insights and metrics for react-gui-controller
Gathering detailed insights and metrics for react-gui-controller
Gathering detailed insights and metrics for react-gui-controller
dis-gui-lifetoys
An extensible, styleable, & React-based controller library inspired by the venerable dat-gui.
dis-gui
An extensible, styleable, & React-based controller library inspired by the venerable dat-gui.
@loopmode/dis-gui
An extensible, styleable, & React-based controller library inspired by the venerable dat-gui.
🎛 Dat.gui like controller for React.js with Ease curve editor, Draggable placement and Stylable component's.
npm install react-gui-controller
Typescript
Module System
Node Version
NPM Version
JavaScript (99.51%)
HTML (0.49%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
14 Stars
130 Commits
1 Forks
1 Watchers
2 Branches
1 Contributors
Updated on Feb 16, 2025
Latest Version
1.0.4
Package Id
react-gui-controller@1.0.4
Unpacked Size
0.99 MB
Size
671.76 kB
File Count
89
NPM Version
6.4.1
Node Version
8.12.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
24
A graphical user interface for changing states in react. Inspired from Google's popular dat.GUI controller library. This library provides additional functionalities such as Ease curve editor, Draggable placement and Stylable component's. For styling this library uses Zeit styled-jsx.
1npm install react-gui-controller --save
1import React, { Component } from "react"; 2import Gui, { GuiString, GuiNumber, GuiColor } from "react-gui-controller"; 3class App extends Component { 4 state = { 5 data: { 6 text: "Some Awesome Val", 7 noise: 0.4, 8 background: "#dc6900", 9 foreground: "#b7c485" 10 } 11 }; 12 13 update = data => { 14 this.setState({ 15 data 16 }); 17 }; 18 19 render() { 20 const { data } = this.state; 21 return ( 22 <Gui data={data} theme="dark" onUpdate={this.update}> 23 <GuiString path="text" label="Head" /> 24 <GuiNumber path="noise" label="Noise" min={0} max={1} step={0.1} /> 25 <GuiColor path="background" label="Background" type="hex" /> 26 <GuiColor path="foreground" label="Foreground" type="hex" /> 27 </Gui> 28 ); 29 } 30} 31 32export default App;
Gui
is the wrapper component which will create a new gui container and will distribute the data
prop to other
child component's. This component will handle all the unidirectional data flow between the state data and child
component's with the help of onUpdate
functional prop.
data
- The data your Gui controller will mutate.onUpdate
- The method which will be called whenever an update is handled by the controller.children
- The dat.GUI components that make up the controller.theme
- The theme selector as light
or dark
, default is light
.1 ... 2 state = { 3 data: { 4 ... 5 } 6 }; 7 8 update = data => { 9 this.setState({ 10 data 11 }); 12 }; 13 14 render() { 15 const { data } = this.state; 16 return ( 17 <Gui data={data} theme="dark" onUpdate={this.update}> 18 ... 19 </Gui> 20 ); 21 } 22 ...
GuiString
is used to mutate any kind of string.
path
- The state data object key.1... 2 state = { 3 data: { 4 text: "Some Awesome Value" 5 } 6 }; 7 8 update = data => { 9 this.setState({ 10 data 11 }); 12 }; 13 14 render() { 15 const { data } = this.state; 16 return ( 17 <Gui data={data} theme="dark" onUpdate={this.update}> 18 <GuiString path="text" label="Head" /> 19 </Gui> 20 ); 21 } 22...
GuiNumber
provides a range slider to toggle between whole and decimal values.
path
- The state data object key, this will eventually going to be the initial value.min
- The minimum value of the slider.max
- The maximum value of the slider.step
- The change in value of the slider.1... 2 state = { 3 data: { 4 noise: 0.4 5 } 6 }; 7 8 update = data => { 9 this.setState({ 10 data 11 }); 12 }; 13 14 render() { 15 const { data } = this.state; 16 return ( 17 <Gui data={data} theme="dark" onUpdate={this.update}> 18 <GuiNumber path="noise" label="Noise" min={0} max={1} step={0.1} /> 19 </Gui> 20 ); 21 } 22...
GuiBool
provides a switch button to toggle between true
and false
.
path
- The state data object key, this will eventually going to be the initial value.1... 2 state = { 3 data: { 4 gravity: false 5 } 6 }; 7 8 update = data => { 9 this.setState({ 10 data 11 }); 12 }; 13 14 render() { 15 const { data } = this.state; 16 return ( 17 <Gui data={data} theme="dark" onUpdate={this.update}> 18 <GuiBool path="gravity" label="Gravity"/> 19 </Gui> 20 ); 21 } 22...
GuiButton
provides a button, under which you can specify the onClick
prop and mention the
funtion.
onClick
mention the method present on the parent component which you want to invoke.1... 2 state = { 3 data: { 4 ... 5 } 6 }; 7 8 update = data => { 9 this.setState({ 10 data 11 }); 12 }; 13 14 handleButton=()=>{ 15 console.log('Button click occured') 16 } 17 18 render() { 19 const { data } = this.state; 20 return ( 21 <Gui data={data} theme="dark" onUpdate={this.update}> 22 <GuiButton onClick={this.handleButton} label="Submit"/> 23 </Gui> 24 ); 25 } 26...
A select component for updating a value with one of the options supplied via the options
prop. The original value from the path
will always be added to the passed options array as the first item.
options
- In the options prop we need to proved an array of options.path
- The state data object key, this will eventually going to be the initial value.1... 2 state = { 3 data: { 4 framerate: '30fps' 5 } 6 }; 7 8 update = data => { 9 this.setState({ 10 data 11 }); 12 }; 13 14 render() { 15 const { data } = this.state; 16 return ( 17 <Gui data={data} theme="dark" onUpdate={this.update}> 18 <GuiSelect path='framerate' options={['25fps', '30fps', '40fps', '60fps']} label="Framerate"/> 19 </Gui> 20 ); 21 } 22...
A color picker component which can be used to mutate any specific colo type.
type
- Mention the type of color format you are using. hex
,rgb
& hsl
are the format's available.path
- The state data object key, this will eventually going to be the initial value.1... 2 state = { 3 data: { 4 background: '#b7c485' 5 // background: { 6 // r:255, 7 // g:0, 8 // b:0 9 // } 10 } 11 }; 12 13 update = data => { 14 this.setState({ 15 data 16 }); 17 }; 18 19 render() { 20 const { data } = this.state; 21 return ( 22 <Gui data={data} theme='dark' onUpdate={this.update}> 23 <GuiColor path='background' type='hex' label='Background' /> 24 </Gui> 25 ); 26 } 27...
In source folder:
1npm run lib:watch 2npm link
In project:
1npm link react-gui-controller
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Reason
124 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More