vue-color-picker-board

Vue color picker component for humans
1,624 11
Install
npm install vue-color-picker-board
Latest Version:1.1.1
Vue:2
License:MIT
Last Updated:Jan 3, 2023
Links: GitHub  ·  npm
Maintainer: shlomnissan

Color picker board for Vue.js

A Vue.js color picker component designed for humans.

Inspired by Svbtle.

Color picker board example

Installation

npm i --save-dev vue-color-picker-board

Browser

Include the script file, then install the component with Vue.use(VueColorPickerBoard); e.g.:

<script type="text/javascript" src="node_modules/vuejs/dist/vue.min.js"></script>
<script type="text/javascript" src="node_modules/vue-color-picker-board/dist/vue-color-picker-board.min.js"></script>
<script type="text/javascript">
  Vue.use(VueColorPickerBoard);
</script>

Module

import VueColorPickerBoard from 'vue-color-picker-board';

Usage

Once installed, it can be used in a template as simply as:

<color-picker-board default-color="#00AAFF"
                    :width="800"
                    :height="100"
                    @onSelection="colorSelection">
</color-picker-board>

Properties

default-color | optional | string
The default color that will be shown once the component is mounted.
Example: default-color="#00AAFF"

width | optional | number | default: 800
The width of the color picker board in pixels.
Example: :width="800"

height | optional | number | default: 100
The height of the color picker board in pixels.
Example: :height="600"

Version History

Version Released Vue License
1.1.1 ^2.2.1 MIT
1.1.0 ^2.2.1 MIT
1.0.3 ^2.2.1 MIT
1.0.2 ^2.2.1 MIT
1.0.1 ^2.2.1 MIT