Update README.md

This commit is contained in:
Josh Johnson 2016-10-20 22:00:25 +01:00 committed by GitHub
parent 92a2c4ec96
commit 49ea948523

View file

@ -14,11 +14,15 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
* Custom templates
## Installation
`npm install choices.js --save`
## Setup
With [NPM](https://www.npmjs.com/package/choices.js):
```bash
npm install choices.js --save
```
With [Bower](https://bower.io/):
```bash
bower install choices.js --save
```
Or include Choices directly:
```html
<!-- Include base CSS (optional) -->
<link rel="stylesheet" href="assets/styles/css/base.min.css">
@ -26,7 +30,10 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
<link rel="stylesheet" href="assets/styles/css/choices.min.css">
<!-- Include Choices JavaScript -->
<script src="/assets/scripts/dist/choices.min.js"></script>
<script>
```
## Setup
```js
// Pass multiple elements:
const choices = new Choices(elements);
@ -101,7 +108,6 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
callbackOnChange: null,
callbackOnSearch: null,
});
</script>
```
## Terminology