Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gnob

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gnob

Simple, mouse-wheelable, text-input-changeable, dependency-free knob

  • 0.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Gnob

Simple, mouse-wheelable, text-input-changeable, dependency-free knob

demo

Vanilla

<input id="range" type="range" data-gnob/>

var ranges = document.querySelectorAll('[data-gnob]');

Array.prototype.slice.call(ranges).forEach(function(range) {
  new Gnob(range);
});

document.getElementById('range').onchange = function(value) { console.log(value); }

React

<Gnob min={0} max={10} onChange={React.PropTypes.func.isRequired} />

Usage

  • Scroll wheel to change value
  • Double click a gnob to input value (supports up and down arrows)

#Options

  • (data-gnob-)max: The max value of the knob (default 0)
  • (data-gnob-)min: The min value of the knob (default 10)
  • (data-gnob-)initial: The initial value of the knob (default 0)
  • (data-gnob-)size: The size of the knob as small, medium, or large (default medium)
  • (data-gnob-)indicator: The CSS color of the indicator (default #E8E15A)

TODO

  • Support stepping by any number. Currently only steps by 1.
  • Angular.js directive
  • Different theming options (light, dark, gray, custom css?)

Keywords

FAQs

Package last updated on 03 May 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc