Skip to content

TerryZ/v-dropdown

Repository files navigation

v-dropdown · CircleCI codecov npm version npm downloads JavaScript Style Guide

A dropdown container for Vue3

If you are using vue 2.x version, please use v-dropdown 2.x version instead

Documentation and Examples

Documentation and examples please visit below sites

Repositories using v-dropdown

Installation

https://nodei.co/npm/v-dropdown.png?downloads=true&downloadRank=true&stars=true

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

Usage

<template>
  <Dropdown @visible-change="change">
    <!-- dropdown trigger -->
    <template #trigger>
      <button
        type="button"
        class="btn"
      >
        click me
      </button>
    </template>

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

<script setup>
import Dropdown from 'v-dropdown'

function change (val) {
  console.log(val)
}
</script>

License

license