Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Dependencies
node_modules/

# Build output
*.min.js.map

# OS files
.DS_Store
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ The **tail.select** script is back, rewritten in vanilla JavaScript and ready to

## Features

- **Beautiful**. 2 different designs (light and dark)
- **Extensive**.
- Search bar to find options quickly...
- All / None optgroup selection buttons...
- **Translatable**.
- **Zero dependencies**. And written in vanilla JavaScript...
- **Free to use**. Because it's MIT licensed <3
- **Beautiful**. 2 different designs (light and dark)
- **Extensive**.
- Search bar to find options quickly...
- All / None optgroup selection buttons...
- **Translatable**.
- **Zero dependencies**. And written in vanilla JavaScript...
- **Free to use**. Because it's MIT licensed <3

## Install & Embed

Expand All @@ -53,6 +53,23 @@ yarn add tail.select.js --save
bower install tail.select.js --save
```

### ES6 Module Usage

The library supports ES6 modules and can be imported directly:

```js
// Import the library
import tail from 'tail.select.js/js/tail.select.js';

// Initialize tail.select on elements
tail.select('.tail-select', {
placeholder: 'Select options...',
theme: 'light',
buttonAll: true,
buttonNone: true,
});
```

### Using a CDN

You can also use the awesome CDN services from jsDelivr or UNPKG.
Expand Down
3 changes: 3 additions & 0 deletions js/tail.select.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,3 +700,6 @@ const tail = {
});
}
};

export default tail;

12 changes: 11 additions & 1 deletion js/tail.select.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 130 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 35 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
{
"name": "tail.select.js",
"version": "1.1.0",
"description": "Create beautiful, functional and extensive (multi) select fields, written in Vanilla JavaScript without any dependencies!",
"keywords": [
"select",
"select2",
"select3",
"selection",
"selectable",
"dropdown",
"choose",
"vanilla",
"tail"
],
"author": "wolffe <getbutterfly@gmail.com> (https://getbutterfly.com)",
"license": "MIT",
"homepage": "https://getbutterfly.com/tail-select/",
"main": "js/tail.select.js",
"bugs": {
"url": "https://github.com/wolffe/tail.select.js/issues",
"email": "getbutterfly@gmail.com"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/wolffe/tail.select.js.git"
},
"reveal": true,
"browser": "js/tail.select.js",
"jsdelivr": "js/tail.select.js"
"name": "tail.select.js",
"version": "1.1.1-fix-import-tail",
"description": "Create beautiful, functional and extensive (multi) select fields, written in Vanilla JavaScript without any dependencies!",
"keywords": [
"select",
"select2",
"select3",
"selection",
"selectable",
"dropdown",
"choose",
"vanilla",
"tail"
],
"author": "wolffe <getbutterfly@gmail.com> (https://getbutterfly.com)",
"license": "MIT",
"homepage": "https://getbutterfly.com/tail-select/",
"main": "js/tail.select.js",
"bugs": {
"url": "https://github.com/wolffe/tail.select.js/issues",
"email": "getbutterfly@gmail.com"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/wolffe/tail.select.js.git"
},
"scripts": {
"minify": "terser js/tail.select.js -o js/tail.select.min.js --compress --mangle --source-map"
},
"devDependencies": {
"terser": "^5.36.0"
},
"reveal": true,
"browser": "js/tail.select.js",
"jsdelivr": "js/tail.select.js"
}