mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-20 06:26:36 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d6f34fc70e
22
README.md
22
README.md
|
@ -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);
|
||||
|
||||
|
@ -64,7 +71,7 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
|
|||
prependValue: null,
|
||||
appendValue: null,
|
||||
loadingText: 'Loading...',
|
||||
noResultsText: 'No results round',
|
||||
noResultsText: 'No results found',
|
||||
noChoicesText: 'No choices to choose from',
|
||||
itemSelectText: 'Press to select',
|
||||
classNames: {
|
||||
|
@ -101,7 +108,6 @@ A vanilla, lightweight (~15kb gzipped 🎉), configurable select box/text input
|
|||
callbackOnChange: null,
|
||||
callbackOnSearch: null,
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
## Terminology
|
||||
|
|
|
@ -68,7 +68,7 @@ class Choices {
|
|||
prependValue: null,
|
||||
appendValue: null,
|
||||
loadingText: 'Loading...',
|
||||
noResultsText: 'No results round',
|
||||
noResultsText: 'No results found',
|
||||
noChoicesText: 'No choices to choose from',
|
||||
itemSelectText: 'Press to select',
|
||||
classNames: {
|
||||
|
|
Loading…
Reference in a new issue