Socket
Socket
Sign inDemoInstall

vue-swatches

Package Overview
Dependencies
0
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-swatches

Help the user picking beautiful colors!


Version published
Weekly downloads
8.8K
decreased by-16.09%
Maintainers
1
Install size
354 kB
Created
Weekly downloads
 

Readme

Source


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 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

Keywords

FAQs

Last updated on 21 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc