프로젝트
GitHub에서 보기
bluzky/nice-select2
소개
가벼운 바닐라 JavaScript 라이브러리로, 기본 select 요소를 사용자 지정 가능한 드롭다운으로 대체합니다.
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalNice Select
A lightweight Vanilla JavaScript plugin that replaces native select elements with customizable dropdowns.
Install
npm i nice-select2
Usage
Include nice-select2 script.
<script src="path/to/nice-select2.js"></script>
Include the styles, either the compiled CSS...
<link rel="stylesheet" href="path/to/nice-select2.css" />
Or import nice-select2 using ES6 syntax
import NiceSelect from "nice-select2";
@import "~nice-select2/dist/css/nice-select2.css";
// or
@import "~nice-select2/src/scss/nice-select2.scss";
Finally, initialize the plugin.
Using the minimified file directly:
NiceSelect.bind(document.getElementById("a-select"), {searchable: true, placeholder: 'select', searchtext: 'zoek', selectedtext: 'geselecteerd'});
Using as import in webpack:
new NiceSelect(document.getElementById("a-select"), {searchable: true});
Instance method
update(): update nice-select items to match with source selectfocus(): open dropdown list and focus on the search box if search is enableddisable(): disable selectenable(): enable selectdestroy(): destroy NiceSelect2 instanceclear(): clear all selected options
Full documentation and examples at https://bluzky.github.io/nice-select2/.
관련 프로젝트 살펴보기
불러오는 중…