# vue-simple-selectbox

> Simple wrapper for select box to ease styling of the element

Latest version **1.0.5** (published 2019-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-simple-selectbox
pnpm add vue-simple-selectbox
yarn add vue-simple-selectbox
bun add vue-simple-selectbox
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-05-25 |
| First published | 2019-05-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 31.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dfgrd |
| Keywords | vue, select styling, dropdown |

## Links

- npm: https://www.npmjs.com/package/vue-simple-selectbox
- Homepage: https://github.com/MannyMannyManny/vue-simple-selectbox
- Issues: https://github.com/MannyMannyManny/vue-simple-selectbox/issues
- npm.io page: https://npm.io/package/vue-simple-selectbox

## Recent versions

- 1.0.5 (latest) — 2019-05-25
- 1.0.4 — 2019-05-19
- 1.0.3 — 2019-05-19
- 1.0.2 — 2019-05-18
- 1.0.1 — 2019-05-18
- 1.0.0 — 2019-05-16

## README

## Vue simple selectbox
[![License](https://img.shields.io/github/license/MannyMannyManny/vue-simple-selectbox.svg?style=popout)](https://github.com/MannyMannyManny/vue-simple-selectbox/blob/master/LICENSE)
[![License](https://img.shields.io/github/last-commit/MannyMannyManny/vue-simple-selectbox.svg)](https://github.com/MannyMannyManny/vue-simple-selectbox/commits/master)
[![License](https://img.shields.io/github/size/MannyMannyManny/vue-simple-selectbox/dist/vue-simple-selectbox.umd.js.svg)](https://github.com/MannyMannyManny/vue-simple-selectbox)
[![License](https://img.shields.io/npm/v/vue-simple-selectbox.svg)](https://www.npmjs.com/package/vue-simple-selectbox)
[![License](http://mannymanny.com/files/demo.png)](https://github.com/MannyMannyManny/vue-simple-selectbox)

Vue simple selectbox allows you to easy work and change the wrapper on top of the default select element.

#### Install

Install the dependency  with

```
yarn add vue-simple-selectbox
```

or for npm

```
npm install --save vue-simple-selectbox
```

In the Vue you can use it by simply importing it

```javascript
import SelectBox from "vue-simple-selectbox";

export default {
  components: { SelectBox },
  data: function() {
    return {
      options: [
        {value:"blue", text:"It's Blue"},
        {value:"yellow", text:"Well no, it's Yellow"},
        {value:"green", text:"Nice and cool Green"}
      ]
    }
  }
}
```

And use it like any other component
```html
<template>
  <div id="app">
    <SelectBox :placeholder="'Default placeholder...'" :options="options" :selected="'green'" :minWidth="190"></SelectBox>
  </div>
</template>
```

#### Props

| Option | Type | Required | Default | Info |
| --- | --- | --- | --- | --- |
| placeholder | string | false | 'Select item...' | Default placeholder |
| selected | string | false | - | Value of the selected element if none is selected(if not set, then placeholder is displayed) |
| minWidth | number | false | 160 | Min-width css property applied to the select container |
| options | array | true | - | Array of objects {value: 'value', text: 'text'} to be shown in the select box |

#### Getting the value
Selectbox emits event selectOption.
So one can call a method on change
```html
<SelectBox :options="options" v-on:selectOption="changeOption"></SelectBox>
```

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