An open API service indexing awesome lists of open source software.

https://github.com/jackchoumine/petite-vue-hooks

A tiny vue hooks
https://github.com/jackchoumine/petite-vue-hooks

Last synced: 2 months ago
JSON representation

A tiny vue hooks

Awesome Lists containing this project

README

        

# petite-vue-hooks

A tiny vue hooks as its name.

> It is wip. Don't use it in production.

## Features

## Installation

```bash
npm i petite-vue-hooks
# or yarn
yarn add petite-vue-hooks
# or pnpm
pnpm add petite-vue-hooks
```

## Usage

### useDraggable

Make an element draggable.

#### base usage

Drag element in the whole window.

```html

import { useDraggable } from 'petite-vue-hooks'

const { setDragEle } = useDraggable()

Drag me

```

#### set a drag area

You can set a drag area by `setExtentEle`

```html

import { useDraggable } from 'petite-vue-hooks'

const { setDragEle, setExtentEle } = useDraggable()


Drag me only in extent-draggable div

```