0.0.5 • Published 1 month ago

@haysquare/svelte-multi-select v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

🌟 SvelteKit Custom MultiSelect Component 🌟

Hey there! Welcome to the SvelteKit Custom MultiSelect Component. This component is here to make your life easier when dealing with multiple selections in your SvelteKit projects. Let's dive in!

Installation

First things first, you'll want to install this nifty component. Open up your terminal and type:

npm install @haysquare/svelte-multi-select


And that's it! You're ready to roll!

Usage

Using the Custom MultiSelect component is a piece of cake! Just follow these simple steps:

Import the component into your SvelteKit project.
Include it in your components or pages.

Single Use
If you need only one Custom MultiSelect in your application, simply use it directly:


<script>
  import {MultiSelect} from '@haysquare/svelte-multi-select';
</script>

<MultiSelect
  {selectableItems}
  {initialSelectedItems}
  on:change={handleSelectionChange}
/>


Multi Use

If you need multiple instances of Custom MultiSelect, you can import and use it multiple times:

<script>
  import {MultiSelect} from '@haysquare/svelte-multi-select';
</script>

<MultiSelect
  {selectableItems1}
  {initialSelectedItems1}
  on:change={handleSelectionChange1}
/>

<MultiSelect
  {selectableItems2}
  {initialSelectedItems2}
  on:change={handleSelectionChange2}
/>

Props

`selectableItems`: An array of items that can be selected.
`initialSelectedItems`: An optional array of items that are initially selected.
`on:change`: An event that emits the selected items whenever the selection changes.

Example

Wanna see it in action? Sure thing!

<script>
  import {MultiSelect} from '@haysquare/svelte-multi-select';

  let selectableItems = ['Apple', 'Banana', 'Orange'];
  let selectedItems = [];

  function handleSelectionChange(selected) {
    selectedItems = selected;
  }
</script>

<MultiSelect
  {selectableItems}
  {initialSelectedItems}
  on:change={handleSelectionChange}
/>


License
This project is licensed under the MIT License. Feel free to use it however you like!


That's all there is to it! Thanks for checking out the SvelteKit Custom MultiSelect Component. Happy coding! ✨🚀


This README provides clear instructions for both single and multi-use cases of the component. Adjust the content as needed for your specific use case!
@sveltejs/packageacornansi-regexansi-stylesany-promiseanymatchargaria-queryaxobject-querybalanced-matchbinary-extensionsbrace-expansionbracesbrowserslistbuffer-crc32callsitescamelcase-csscaniuse-litechokidarcode-redcolor-convertcolor-namecommanderconcat-mapcookiecross-spawncss-treecssescdebugdeepmergedequaldetect-indentdevaluedidyoumeandlveastasianwidthelectron-to-chromiumemoji-regexes6-promiseesbuildescaladeesm-envestree-walkerfast-globfastqfill-rangeforeground-childfraction.jsfs.realpathfseventsfunction-bindglobglob-parentglobalyzerglobrexgraceful-fshasownimport-freshimport-meta-resolveinflightinheritsis-binary-pathis-core-moduleis-extglobis-fullwidth-code-pointis-globis-numberis-referenceisexejackspeakjitikleurlilconfiglines-and-columnslocate-characterlru-cachemagic-stringmdn-datamerge2micromatchmin-indentminimatchminimistminipassmkdirpmrimrmimemsmznanoidnode-releasesnormalize-pathnormalize-rangeobject-assignobject-hashonceparent-modulepath-is-absolutepath-keypath-parsepath-scurryperiscopicpicocolorspicomatchpifypiratespostcss-importpostcss-jspostcss-load-configpostcss-nestedpostcss-selector-parserpostcss-value-parserqueue-microtaskread-cachereaddirpresolveresolve-fromreusifyrimrafrolluprun-parallelsadesanderset-cookie-parsershebang-commandshebang-regexsignal-exitsirvsorcerysource-map-jsstring-widthstring-width-cjsstrip-ansistrip-ansi-cjsstrip-indentsucrasesupports-preserve-symlinks-flagsveltesvelte-hmrsvelte-preprocesssvelte2tsxthenifythenify-alltiny-globto-regex-rangetotalistts-interface-checkerupdate-browserslist-dbutil-deprecatevitefuwhichwrap-ansiwrap-ansi-cjswrappyyaml
0.0.5

1 month ago

0.0.4

1 month ago

0.0.3

1 month ago

0.0.2

1 month ago

0.0.1

1 month ago