Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
control-panel
Advanced tools
Embeddable panel of inputs for adding parameter selection to your app or visualization. Modern and minimalist design. Fully encapsulated module including JS and CSS. Can easily be added to any app or page. Heavily inspired by dat-gui
, but streamlined, simplified, and written as a npm module for use with browserify.
Supports the following input types
range
•checkbox
•text
•color
Includes the following themes
dark
•light
Want to contribute a new theme or input type? Submit a PR!
Add to your project with
npm install control-panel
Create a panel with four elements and add to your page in the top right.
var control = require('control-panel')
var panel = control([
{type: 'range', label: 'my range', min: 0, max: 100, initial: 20},
{type: 'text', label: 'my text', initial: 'my cool setting'},
{type: 'checkbox', label: 'my checkbox', initial: true},
{type: 'color', label: 'my color', format: 'rgb', initial: 'rgb(10,200,0)'}
],
{theme: 'light', position: 'top-right'}
)
panel = control([input1, input2, ...], [opts])
The first argument is a list of inputs. Each one must have a type
and label
property, and can have an initial
property with an initial value. For example,
{type: 'checkbox', label: 'my checkbox', initial: true}
Each type
must be one of range
• input
• checkbox
• color
. Each label
must be unique.
Some types have additional properties:
range
can specify a min
, max
, and step
color
can specify a format
as either rgb
• hex
• array
The following optional parameters can also be passed as opts
root
root element to which to append the paneltheme
can specify light
• dark
or provide an object (see themes.js
for format)title
a title to add to the top of the panelwidth
width of panel in pixelsposition
where to place the panel as top-left
• top-right
• bottom-left
• bottom-right
, if undefined
will just use relative positioningpanel.on('input', cb(data))
This event is emitted every time any one of the inputs change. The callback argument data
will contain the state of all inputs keyed by label such as:
{'my checkbox': false, 'my range': 75}
FAQs
embeddable panel of inputs for parameter setting
The npm package control-panel receives a total of 25 weekly downloads. As such, control-panel popularity was classified as not popular.
We found that control-panel 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.