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

select-pure

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

select-pure

Pure JavaScript select component.

  • 0.1.15
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
604
increased by45.89%
Maintainers
1
Weekly downloads
 
Created
Source

SelectPure JavaScript component

npm version npm bundle size (minified) npm Build Status codecov

Installation

NPM
npm i select-pure --save
Yarn
yarn add select-pure
CDN
<script src="https://unpkg.com/select-pure@latest/dist/bundle.min.js"></script>

Usage

import SelectPure from "select-pure";

new SelectPure(element, config);

`element` // Required. Either selector or HTML node.
`config` // Required. Configuration object.

Configuration

PropertyRequiredTypeDescription
optionstrueArrayCollection of options to be rendered. Each option consists of value, label and optional property disabled.
options[].valuetrueStringValue of an option.
options[].labeltrueStringLabel of an option.
options[].disabledfalseBooleantrue if option is disabled. false by default.
multiplefalseBooleantrue if multiple options can be selected.
autocompletefalseBooleanAdds autocomplete input. Disabled by default.
iconfalseStringIf specified - <i></i> will be inserted inside select-pure__selected-label. Works only with multiple option set to true.
onChangefalseFunctionReturn value on select. Return Array if multiple is true.
valuefalseString | ArrayInitially selected value. If not provided - first option will be selected. If multiple is true -- Array should be provided.

Example

const form = new FormPure(".form-wrapper", {});

Structure

select-pure/
└── lib/
    └── select-pure.min.js

License

MIT

Keywords

FAQs

Package last updated on 15 May 2018

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