Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-movable

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-movable

Action to move node on mousedown & mousemove

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Svelte Action - use:movable

# remove svelte-movable from your package.json

npm install -D @svelte-put/movable
yarn add -D @svelte-put/movable
pnpm add -D @svelte-put/movable

npm.badge bundlephobia.badge semantic-release.badge MIT

github.actions.release.badge github.release.badge

demo

Table of Contents

Show / hide

Changelog

Installation

npm install -D svelte-movable
yarn add -D svelte-movable
pnpm add -D svelte-movable

Usage

See example for typical usage here.

Documentation

Typescript support

app.d.ts: show / hide
/// <reference types="@sveltejs/kit" />
/// <reference types="svelte" />

// Typescript support in svelte-kit, see
// https://github.com/sveltejs/language-tools/blob/master/docs/preprocessors/typescript.md#im-using-an-attributeevent-on-a-dom-element-and-it-throws-a-type-error

declare namespace svelte.JSX {
  interface HTMLAttributes<T> {
    // on:movablestart
    onmovablestart?: (event: CustomEvent<import('svelte-movable').MovableEventDetails>) => void;
    // on:movableend
    onmovableend?: (event: CustomEvent<import('svelte-movable').MovableEventDetails>) => void;
  }
}

For detailed documentation, see the extracted API.

Quick access to the parameter interface accepted by the action: MovableParameters.

Note: MovableParameters has properties that are all optional. By default you don't need to provide any parameter to the action.

Contributing

Read Contribution Guide

Todos

  • separate helper methods & implement unit tests

  • add field test for svelte kit (integration)

  • CI workflow (github action)

buy vnphanquang a coffee

Keywords

FAQs

Package last updated on 13 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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