# vue-select-input-ui

> A select input component made with Vue JS

Latest version **1.0.6** (published 2020-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-select-input-ui
pnpm add vue-select-input-ui
yarn add vue-select-input-ui
bun add vue-select-input-ui
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2020-04-15 |
| First published | 2019-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 3 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Louis Mazel |
| Maintainers | louismazel |
| Keywords | vue, javascript, vue-component, select, input, selector, ui |

## Links

- npm: https://www.npmjs.com/package/vue-select-input-ui
- Repository: https://github.com/louismazel/vue-select-input-ui
- Issues: https://github.com/louismazel/vue-select-input-ui/issues
- npm.io page: https://npm.io/package/vue-select-input-ui

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.6.10
- [style-helpers](https://npm.io/package/style-helpers.md) ^1.0.2
- [color-transformer-ui](https://npm.io/package/color-transformer-ui.md) 0.0.6

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2020-04-15
- 1.0.5 — 2019-11-11
- 1.0.4 — 2019-11-11
- 1.0.3 — 2019-11-09
- 1.0.2 — 2019-11-08
- 1.0.1 — 2019-11-08
- 1.0.0 — 2019-11-08
- 0.0.6 — 2019-11-06
- 0.0.5 — 2019-11-05
- 0.0.4 — 2019-11-05
- 0.0.3 — 2019-11-04
- 0.0.2 — 2019-11-04
- 0.0.1 — 2019-11-04

## README

# VueSelectInputUi

> A vue component for select dates (range mode available) & time

![vue-select-input-ui](./assets/illu-animated.gif)

## Demo

[Enjoy](https://louismazel.github.io/vue-select-input-ui/)

## Installation

Yarn

```bash
yarn add vue-select-input-ui
```

NPM

```bash
npm i --save vue-select-input-ui
```

## Usage

### ES6 Modules / CommonJS

```js
import VueSelectInputUi from 'vue-select-input-ui';
import 'vue-select-input-ui/dist/vue-select-input-ui.css';

Vue.component('VueSelectInputUi', VueSelectInputUi);
```

```html
  <VueSelectInputUi
    v-model="yourValue"
    :options="[
      { label: 'First option', value: 'first' },
      { label: 'Second option', value: 'second' },
      { label: 'Third option', value: 'third' }
    ]"
  />
```

### UMD

```html
<link
  rel="stylesheet"
  type="text/css"
  href="${YOUR_PATH}/vue-select-input-ui.css"
/>

<div id="app">
  <VueSelectInputUi v-model="yourValue"></VueSelectInputUi>
</div>

<script src="https://unpkg.com/vue" charset="utf-8"></script>
<script
  src="${YOUR_PATH}/vue-select-input-ui.umd.min.js"
  charset="utf-8"
></script>

<script type="text/javascript">
  Vue.component('vue-select-input-ui', window['vue-select-input-ui']);
  new Vue({
    el: '#app',
    data() {
      return {
        yourValue: false
      };
    }
  });
</script>
```

## Props API

| Props           | Type                | Required | Default          |
|-----------------|---------------------|----------|------------------|
| v-model         | String              | yes      | -                |
| id              | String              | no       | VueSelectInputUi |
| name            | String              | no       | VueSelectInputUi |
| label           | String              | no       | Select option    |
| hint (1)        | String              | no       | -                |
| error (2)       | Boolean             | no       | false            |
| color (3)       | String (hex)        | no       | dodgerblue       |
| dark-color (4)  | String (hex)        | no       | #424242          |
| item-height (4) | Int                 | no       | 30               |
| list-height     | Int                 | no       | 210              |
| size            | String ['sm', 'lg'] | no       | null             |
| disabled        | Boolean             | no       | false            |
| required        | Boolean             | no       | false            |
| dark            | Boolean             | no       | false            |
| valid           | Boolean             | no       | false            |
| validColor      | String (hex)        | no       | false            |
| options (5)     | String (hex)        | no       | false            |
| border-radius   | Number              | no       | 8                |

(1) hint : Is a text that replaces the label/placeholder (Ex : Error designation)

(2) error : When is `true` --> Input border & label are red

(3) color: Replace color for the hint, the borders & picker color

(4) Height of items in option list

(5) Options should be an Array of object like that :

```js
[
  { label: 'None' },
  { label: 'First option', value: 'first' },
  { label: 'Second option', value: 'second' },
  { label: 'Third option', value: 'third' }
]
```

## Feature list

- You can search the option on taping the label
- Keyboard accessibilty
- Valid state ui
- Error state ui
- Message error state ui

## Events API

| Event | Return                                |
|-------|---------------------------------------|
| input | value (formatted with 'format' props) |
| click | when you click on the component       |
| focus | when the component is focused         |
| blur  | when the component is blur            |

## Keyboard Accessible

| Key        | Action          |
|------------|-----------------|
| Arrow Down | Next option     |
| Arrow Up   | Previous option |
| Escape     | Close list      |
| Enter      | Select option   |

## Upcoming features (Todo)

- Position list (left, right, top, bottom)

## Contribute

## Setting up development server

Ensure you have Node and npm in your machine. Minimal config is:

- node >= 6.0
- npm >= 3.0

> This project is built with `node@10.x`.

Install the development dependencies by running:

```bash
npm install
```

or

```bash
npm ci # Recommanded if you have node > 10.x
```

Once your dependencies are installed, start the development server with:

```bash
npm run serve
```

This will start the development server available at `http://localhost:8080`.

## Compiles and hot-reloads for development

```bash
npm run serve
```

## Linter

```bash
npm run lint
```

## Tests

Work in progress

## License

This project is licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License)

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