Socket
Socket
Sign inDemoInstall

svelte-dragdroplist

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-dragdroplist - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

2

package.json

@@ -5,3 +5,3 @@ {

"svelte": "DragDropList.svelte",
"version": "1.0.2",
"version": "1.1.0",
"peerDependencies": {

@@ -8,0 +8,0 @@ "svelte": "^3.0.0"

# Svelte-DragDropList
Sortable lists with Svelte. [Try the REPL!](https://svelte.dev/repl/915db3b3ed704fddb7ddfb64bcbc2624?version=3.22.2)
Sortable lists [made with Svelte](https://madewithsvelte.com/svelte-dragdroplist).
[Try the REPL!](https://svelte.dev/repl/915db3b3ed704fddb7ddfb64bcbc2624?version=3.22.2)
[Available from NPM](https://www.npmjs.com/package/svelte-dragdroplist)

@@ -15,3 +17,3 @@ ### Why this component?

[Basic REPL](https://svelte.dev/repl/6fb61b9868734493aec65eb53dc1a4bd?version=3.22.2)
[REPL with data binding, multiple datasets, IDs, and HTML items.](https://svelte.dev/repl/915db3b3ed704fddb7ddfb64bcbc2624?version=3.22.2)
[REPL with every feature!](https://svelte.dev/repl/915db3b3ed704fddb7ddfb64bcbc2624?version=3.22.2)

@@ -29,2 +31,4 @@ The simplest way to use the component is to pass it an array of unique strings. If you `bind:data`, the source array will be updated as the user rearranges its items.

##### Unique IDs
If you aren't sure that your strings will be unique, you should instead pass an array of objects, each with a unique ID:

@@ -39,2 +43,4 @@

##### HTML
You can also include an "html" attribute instead of "text". It's up to you to make sure the html is clean.

@@ -49,4 +55,18 @@ If you want, you can even use both in one list.

##### Removable Items
A delete button can be added to each item with the `removesItems` prop:
```js
<script>
import DragDrop from "./DragDrop.svelte";
data = ["Adams", "Boston", "Chicago", "Denver"];
</script>
<DragDrop bind:data={data} removesItems={true}/>
```
Note: _adding_ items is as simple as adding them to the data array.
### In Progress
* Additional animations on drop

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc