1.0.1 • Published 5 years ago

@dariustanhai/vue-dropdown v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

dropdown

VueJS lightweight dropdown component

Check out the live DEMO

Installation

$ npm install --save @dariustanhai/vue-dropdown

Usage

<template>
  <dropdown
    class="dropdown"
    :data="data"
    :current="current"
    identifier="countries"
    @propagate="setDropdown"
  />
</template>

<script>

export default {
  data() {
    return {
      data: ['Brazil', 'Canada', 'Japan'],
      current: 'Japan'
    }
  },
  components: {
    dropdown: () => import('@dariustanhai/vue-dropdown') 
  },
  methods: {
    setDropdown (identifier, value) {
      this.current = value
    }
  }
}
  
</script>

<style lang="scss">

.dropdown {
  width: 200px;
  height: 50px;
  margin: 20px auto;
  h5 {
    color: white;
    font-size: 15px;
    font-family: 'Arial';
  }
  .current {
    background-color: black;
    border-radius: 5px;
  }
  .subMenu {
    background-color: black;
    border-radius: 5px;
  }
  .icon {
    color: white;
  }
}
  
</style>

Props

PropType(s)Description
dataArrayOptions for dropdown
currentStringCurrent option
identifierStringUnique ID for multiple dropdowns

Author

Darius Tanhai

  • Checkout my Freelance Web Developer Portfolio Website
  • Lets Work Together.

License

MIT

1.0.1

5 years ago

1.0.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.5

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago