# useMousePressed

Reactive mouse pressing state. Triggered by on target element and released by on window.

**Package:** `@vueuse/core`
**Category:** Sensors

## Usage

```ts
import { useMousePressed } from '@vueuse/core'

const { pressed } = useMousePressed()
```

## Returns

| Name       | Type                                   |
| ---------- | -------------------------------------- |
| pressed    | `shallowRef`                           |
| sourceType | `shallowRef&lt;UseMouseSourceType&gt;` |

## Reference

[VueUse Docs](https://vueuse.org/core/useMousePressed/)
