svelte-multiselect
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"type": "module", | ||
@@ -15,0 +15,0 @@ "svelte": "MultiSelect.svelte", |
@@ -0,1 +1,3 @@ | ||
<div class="maybe-hide"> | ||
<p align="center"> | ||
@@ -9,11 +11,15 @@ <img src="https://raw.githubusercontent.com/janosh/svelte-multiselect/main/site/static/favicon.svg" alt="Svelte MultiSelect" height=150> | ||
</div> | ||
Keyboard-friendly, zero-dependency `MultiSelect` Svelte component. | ||
## Key Features | ||
- **Single / multiple select**: pass `single` prop to only allow one selection | ||
- **Dropdowns**: scrollable lists for large numbers of options | ||
- **Searchable**: start typing to filter options | ||
- **Tagging**: selected options are recorded as tags within the text input | ||
- **Server-side rendering**: no reliance on browser objects like `window` or `document` | ||
- **Configurable** | ||
- **No dependencies**, needs only Svelte as dev dependency | ||
- **Single / multiple select:** pass `single` prop to only allow one selection | ||
- **Dropdowns:** scrollable lists for large numbers of options | ||
- **Searchable:** start typing to filter options | ||
- **Tagging:** selected options are recorded as tags within the text input | ||
- **Server-side rendering:** no reliance on browser objects like `window` or `document` | ||
- **Configurable:** see section [props](#props) | ||
- **No dependencies:** needs only Svelte as dev dependency | ||
- **Keyboard friendly** for mouse-less form completion | ||
@@ -33,15 +39,4 @@ | ||
const webFrameworks = [ | ||
`Svelte`, | ||
`React`, | ||
`Vue`, | ||
`Angular`, | ||
`Polymer`, | ||
`Ruby on Rails`, | ||
`ASP.net`, | ||
`Laravel`, | ||
`Django`, | ||
`Express`, | ||
`Spring`, | ||
] | ||
const webFrameworks = [`Svelte`, `React`, `Vue`, `Angular`, `Polymer`, `Ruby on Rails`, `ASP.net`, `Laravel`, `Django`, `Express`, `Spring`] | ||
const name = `webFrameworks` | ||
@@ -51,3 +46,3 @@ const placeholder = `Take your pick...` | ||
let input | ||
let selected | ||
</script> | ||
@@ -57,3 +52,3 @@ | ||
<MultiSelect bind:input {name} {placeholder} options={webFrameworks} {required} /> | ||
<MultiSelect bind:selected {name} {placeholder} options={webFrameworks} {required} /> | ||
``` | ||
@@ -76,2 +71,13 @@ | ||
## Want to contribute? | ||
Clone the repo, install dev dependencies and start the dev server to test your changes before submitting a PR. | ||
```sh | ||
git clone https://github.com/janosh/svelte-multiselect | ||
cd svelte-multiselect | ||
yarn | ||
yarn dev | ||
``` | ||
## Styling | ||
@@ -78,0 +84,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13534
116