https://github.com/dz8540/custom-select
DZ's custom select library component.
https://github.com/dz8540/custom-select
html javascript js lib library ts typescript
Last synced: about 2 months ago
JSON representation
DZ's custom select library component.
- Host: GitHub
- URL: https://github.com/dz8540/custom-select
- Owner: DZ8540
- Created: 2021-08-19T16:47:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-23T12:40:16.000Z (about 4 years ago)
- Last Synced: 2025-02-01T03:34:03.589Z (over 1 year ago)
- Topics: html, javascript, js, lib, library, ts, typescript
- Language: TypeScript
- Homepage: https://dz8540.github.io/Custom-select/
- Size: 479 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DZ Custom-select
In order to use, it is enough to find the element you need, and then pass it to the class.
## Installation
1. Via npm
```cmd
npm i @dz8540/custom-select
```
1. Manually - all you need is in the "Dist" folder. If you need to use only multiple select, all you need is in the "Multiple-select" folder. If you need to use only select, all you need is in the "Select" folder.
```html
```
## Instruction:
1. Don't remove all data attributes.
2. Your value could has a data-checked attribute.
3. Your values should be in the data-value attribute.
4. Your values could has a data-disabled attribute.
5. Component maintains data-name attribute, to you can set component name.
## Example
### HTML
```html
▼
-
Text 1
-
Text 2
-
Text 3
-
Text 4
▼
-
Text 1
-
Text 2
-
Text 3
-
Text 4
```
### JS
```js
let el = document.querySelector(el);
new Select(el);
// If multiple
new MultipleSelect(el);
```
## End
That's all! Enjoy this (☞゚ヮ゚)☞ ☜(゚ヮ゚☜)