Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vue-color-picker-wheel

stijlbreuk1.5kMIT0.4.3

A Vue color picker component based on the Farbtastic jQuery Color Picker plug-in

vue, vue.js, color picker, color, picker, component, farbtastic

readme

Vue Color Picker Wheel

Example

Version Downloads License

A Vue color picker component based on the Farbtastic jQuery Color Picker plug-in.

Demo

Basic

Basic CodePen demo

Installation

npm install --save vue-color-picker-wheel

Usage

ES6 modules

<template>
    <div id="app">
        <color-picker v-model="color"></color-picker>
        <p>
            Color:
            <input v-model="color" type="text">
        </p>
    </div>
</template>
<script>
    import ColorPicker from 'vue-color-picker-wheel';

    export default {
        name: 'App',
        components: {
            ColorPicker
        },
        created() {
        },
        data() {
            return {
                color: '#ffffff'
            };
        },
    };
</script>

CommonJS

const ColorPicker = require('vue-color-picker-wheel');

In a script tag, this loads the component using the global Vue instance.

<script src="https://unpkg.com/vue-color-picker-wheel"></script>

Properties

Property Description Type Default Example
width The width of the color picker Number 300 :width="400"
height The height of the color picker Number 300 :height="400"
disabled Whether or not the color picker should be disabled Boolean false :disabled="false"
v-model v-model to create two-way data binding for color String (hex color code) none v-model="color"
startColor The color that is selected when opening the colorpicker String (hex color code) none startColor="#ffffff"

Events

Event Description Event parameters
color-change Is fired after the selected color has changed color: String (hex color code)

Contributing

Checkout GitHub issues for any issues we need some help with.

# Serve with hot reload (default at localhost:8080)
vue serve --open src/color-picker.vue

# Build all variants
npm run build

Changelog

Changelog on Github

License

MIT

changelog

Changelog

All changes to Vue Color Picker Wheel will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.4.2] - 16-01-2019

Fixed

  • Color selection (circle) widget not following mouseclicks and touches on mobile correctly (fixes issue #9)

[0.4.1] - 16-11-2018

Fixed

  • Prevent color picker from being highlighted (showing a black overlay) on touch devices when tapping (and holding)

[0.4.0] - 15-11-2018

Fixed

  • Misalign issues when using CSS rules like 'text-align: center' or 'margin: 0 auto' on the parent element of the color picker

Deprecations

  • Using the 'colorChange' event is deprecated, will be removed in 1.0.0. Use 'v-model' or the 'color-change' event instead.

[0.3.0] - 15-11-2018

Added

  • v-model support