New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

styleselect-extended

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

styleselect-extended

- **Standalone** - runs on its own without any dependencies. If you're using vanilla JS and want to style a select box, you've come to the right place. - **Correct** - Triggers 'change' events on real select boxes so you won't have to modify your existi

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Style Select

Full styling for select boxes. No jQuery.

  • Standalone - runs on its own without any dependencies. If you're using vanilla JS and want to style a select box, you've come to the right place.
  • Correct - Triggers 'change' events on real select boxes so you won't have to modify your existing event listeners.
  • Usable with the keyboard - Appears in tab index, space shows and hides the options, up and down arrow changes the highlight option, enter selects the currently highlighted option.
  • Stylable - designed for easy incorporation into your own look and feel. SCSS, free of magic numbers, CSS 'triangles', images, and other hacks.
  • Accessable - people using screen readers simply experience the regular, unstyled select box.

Demo

There's a live demo at http://mikemaccana.github.io/styleselect/.

There's also a live demo of the code in this repo. Just run http-server (or whatever your preferred static webserver is) in the current directory.

Open the JavaScript console on the demo page for more instructions.

Note that since Android and iOS have specific touch-enabled features to ease their use on mobile, Style Select will not change select buttons on these platforms.

Usage:

SASS

Include styleselect.scss in your project.

JS

Import module

Style Select supports both AMD/require.js or npm/browserify modules:

For AMD/require.js users:

define('styleselect', function(styleSelect){
    ...
});

For npm/browserify users:

var styleSelect = require('styleSelect');
Style a select box

To style a select box:

styleSelect(selector);

or

styleSelect(element);

Where selector is a CSS selector and element is an HTML Element or NodeList.

That's all. From then on you'll probably want to tweak styling.

Credit

Style Select is based on VisualSelect, created for Multplx Attract platform.

Style Select adds lots of bugfixes, new SASS, docs and a demo, the license has also been changed from WTFPL to the MIT license.

FAQs

Package last updated on 30 Nov 2016

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