vue-swatches

Help the user picking beautiful colors!
485,747 565
Install
npm install vue-swatches
Latest Version:2.1.1
Vue:2
License:MIT
Last Updated:Jun 29, 2021
Links: GitHub  ·  npm
Maintainer: saintplay

Notice

Vue Swatches recently reached version 2. If you were using v1 please consider reading the release notes 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>
    <v-swatches v-model="color"></v-swatches>
  </div>
</template>

<script>
  import VSwatches from 'vue-swatches'

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

  export default {
    components: { VSwatches }, // window['vue-swatches'] - from CDN
    data () {
      return {
        color: '#1CA085'
      }
    }
  }
</script>

Contributing

# serve with hot reload at localhost:8080
yarn serve

# distribution build with minification
yarn build

# build the documentation into docs
npm docs:dev

# run unit tests
yarn test:unit

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

Related Packages

vue-iro-color-picker

Vue color picker

1,764 9
vue-color-input

Slick and perfomant vue 3 color picker component whose goal is to replace

58,818 30
vue3-color-gradient-picker

Color and gradient picker for vue3.js

103,200 3
vue-channel-color-picker

A RGB, CMYK & Graytone color Picker

2,233 0

Version History

Version Released License
2.1.1 MIT
2.1.0 MIT
2.0.3 MIT
2.0.2 MIT
2.0.1 MIT
Pre-releases (13)
Version Released License
2.0.0-rc.3 MIT
2.0.0-rc.2 MIT
2.0.0-rc.1 MIT
1.0.0-rc.10 MIT
1.0.0-rc.9 MIT