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

butane-combobox

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

butane-combobox

An accessible combobox/autocomplete library

  • 1.0.0-5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

butane-combobox

An accessible combobox/autocomplete library

Install

$ npm install butane-combobox --save

Usage

<div class="combobox">
  <label for="combobox">Search</label>
  <select name="combobox" id="combobox">
    <option value="0">Red</option>
    <option value="1">Blue</option>
    <option value="2">Green</option>
    <option value="3">Purple</option>
  </select>
</div>
import ButaneCombobox from 'butane-combobox;
const element = document.querySelector('.combobox');
new ButaneCombobox(element);

Options

showOnClick

When the input is clicked, show options list immediately.

new ButaneCombobox(element, {
  showOnClick: true,
});

onSelectedOption

Returns the selected option.

new ButaneCombobox(element, {
  onSelectOption: option => console.log(option),
});

onShowMenu

Callback for when the menu is shown.

new ButaneCombobox(element, {
  onShowMenu: () => console.log('Menu shown'),
});

onHideMenu

Callback for when the menu is hidden.

new ButaneCombobox(element, {
  onHideMenu: () => console.log('Menu hidden'),
});

License

MIT License © Alex Carpenter

FAQs

Package last updated on 24 Oct 2019

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