Help the user picking beautiful colors!


Keywords
vuejs, color-picker, color, picker, color-palette, component, swatches, ui-components, vue, vue-components, vuejs-components, vuejs2
License
MIT
Install
npm install vue-swatches@2.1.1

Documentation


Vue Swatches

Travis CI npm version Coverage Status license Jest

NOTICE

Vue Swatches recently reached version 2. If you were using v1 please consider reading the Migration Guide or you can check v1 here

Demo And Documentation

https://saintplay.github.io/vue-swatches/

Table of Contents

Introduction

Vue Swatches is a UI Component for Vue that allows the user to choose colors.

Unlike classic color pickers, where all colors are available (167 77 216 colors), Vue Swatches only shows a bunch of predefined colors.

More decisions require more effort

With fewer options, the user experience will be improved

Features

Install

npm install --save vue-swatches

or

yarn add vue-swatches

Basic Usage

<!-- Vue component -->
<template>
  <div>
    <swatches v-model="color"></swatches>
  </div>
</template>

<script>
  import Swatches from 'vue-swatches'

  // Import the styles too, globally
  import "vue-swatches/dist/vue-swatches.min.css"

  export default {
    components: { Swatches }, // window.VueSwatches.default - from CDN
    data () {
      return {
        color: '#1CA085'
      }
    }
  }
</script>

Contributing

# serve with hot reload at localhost:8080
npm run dev

# distribution build with minification
npm run bundle

# build the documentation into docs
npm run docs

# run unit tests
npm run test

Browser Compatibility

This component has the same support than Vue itself

Vue does not support IE8 and below, because it uses ECMAScript 5 features that are un-shimmable in IE8. However it supports all ECMAScript 5 compliant browsers.

However if you want to use this with IE9, you will probably need to work on the CSS styles. IE10 should be fine

Awesome Contributors

License

MIT