# v-dropdown

> A dropdown layer container component for vue3

Latest version **3.5.1** (published 2025-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install v-dropdown
pnpm add v-dropdown
yarn add v-dropdown
bun add v-dropdown
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.5.1 |
| Published | 2025-09-24 |
| First published | 2018-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 36.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 23 |
| Author | TerryZ |
| Maintainers | terryz |
| Keywords | javascript, vue, web, front-end, dropdown, popup, container |

## Links

- npm: https://www.npmjs.com/package/v-dropdown
- Repository: https://github.com/TerryZ/v-dropdown
- Homepage: https://github.com/TerryZ/v-dropdown#readme
- Issues: https://github.com/TerryZ/v-dropdown/issues
- npm.io page: https://npm.io/package/v-dropdown

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^3.5.21

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 3.5.1 (latest) — 2025-09-24
- 2.1.1 (vue-2) — 2019-08-25
- 3.5.0 — 2025-09-23
- 3.4.0 — 2025-03-14
- 3.3.0 — 2025-03-08
- 3.2.1 — 2025-03-05
- 3.2.0 — 2025-03-03
- 3.1.3 — 2025-02-23
- 3.1.2 — 2025-02-23
- 3.1.1 — 2025-02-23
- 3.1.0 — 2025-02-21
- 3.0.0 — 2023-09-16
- 3.0.0-beta.2 — 2023-09-15
- 3.0.0-beta.1 — 2023-02-08
- 2.1.0 — 2019-08-17
- … 16 more at https://npm.io/package/v-dropdown/versions

## README

# v-dropdown &middot; [![test](https://github.com/TerryZ/v-dropdown/actions/workflows/npm-publish.yml/badge.svg?branch=master)](https://github.com/TerryZ/v-dropdown/actions/workflows/npm-publish.yml) [![codecov](https://codecov.io/gh/TerryZ/v-dropdown/branch/master/graph/badge.svg?token=veg52RGaZg)](https://codecov.io/gh/TerryZ/v-dropdown) [![npm version](https://img.shields.io/npm/v/v-dropdown.svg)](https://www.npmjs.com/package/v-dropdown) [![npm downloads](https://img.shields.io/npm/dy/v-dropdown.svg)](https://www.npmjs.com/package/v-dropdown) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

A dropdown container for Vue3

If you are using vue `2.x` version, please use [v-dropdown 2.x](https://github.com/TerryZ/v-dropdown/tree/dev-vue-2) version instead

## Features

- Multiple drop-down bar triggering methods
- Built-in trigger button component for quick use
- When the position and size of the trigger and the drop-down bar content change, the drop-down bar content position is automatically adjusted to align - with the trigger
- Provide `Dropdown` status and tool functions for each slot
- Provide `useDropdown` utility functions
- Flexible style customization method

## Documentation and Examples

Documentation and examples please visit below sites

- [github-pages](https://terryz.github.io/docs-vue3/dropdown/)

## My repositories using `v-dropdown`

- [v-selectpage](https://github.com/TerryZ/v-selectpage)
- [v-selectmenu](https://github.com/TerryZ/v-selectmenu)
- [v-region](https://github.com/TerryZ/v-region)
- [v-suggest](https://github.com/TerryZ/v-suggest)

## Installation

[![https://nodei.co/npm/v-dropdown.png?downloads=true&downloadRank=true&stars=true](https://nodei.co/npm/v-dropdown.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/v-dropdown)

```sh
# npm
npm i v-dropdown
# yarn
yarn add v-dropdown
# pnpm
pnpm add v-dropdown
```

## Usage

### Quick dropdown

```vue
<template>
  <Dropdown>
    <DropdownContent>
      <div>some contents</div>
    </DropdownContent>
  </Dropdown>
</template>

<script setup>
import { Dropdown, DropdownContent } from 'v-dropdown'
</script>
```

### Custom trigger content

```vue
<template>
  <Dropdown>
    <template #trigger>
      <DropdownTrigger>Click me</DropdownTrigger>
    </template>

    <DropdownContent>
      <div>some contents</div>
    </DropdownContent>
  </Dropdown>
</template>

<script setup>
import { Dropdown, DropdownContent, DropdownTrigger } from 'v-dropdown'
</script>
```

## License

[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://mit-license.org/)

---
_Source: https://npm.io/package/v-dropdown · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
