0.0.1 • Published 2 years ago
color-picker-fork v0.0.1
Vue 3 Color Picker
A colour selective component for Vue 3. Fast and with small package size. Gradient and Solid in one! No dependency! Fully customisable!
Install
NPM Install
npm i @cyhnkckali/vue3-color-picker
Yarn Install
yarn add @cyhnkckali/vue3-color-picker
Import
Import where you want to use it
import {Vue3ColorPicker} from '@cyhnkckali/vue3-color-picker';
Import the style file into your main.js file
import '@cyhnkckali/vue3-color-picker/dist/style.css'
Use/Examples
<script setup>
import {Vue3ColorPicker} from '@cyhnkckali/vue3-color-picker';
</script>
<template>
<Vue3ColorPicker v-model="value" mode="solid" :showColorList="false" :showEyeDrop="false" type="RGBA"/>
<Vue3ColorPicker v-model="value" mode="gradient" :showColorList="false" :showEyeDrop="false"/>
</template>
Options
Parameter | Type | Description |
---|---|---|
v-model | string | default '' |
mode | string | solid or gradient default gradient |
theme | string | light or dark default light |
type | string | Return colour value type HEX8 RGBA RGB HEX default HEX8 |
inputType | string | Input type of colour values RGB HSL HSV CMYK default RGB |
disabled | boolean | default false |
local | object | default { angle: '', positionX: '', positionY: '' } |
colorListCount | number | Determines how many colours to keep in the colour list default 18 |
showColorList | boolean | default true |
showEyeDrop | boolean | default true Supports Chrome and Edge only |
showAlpha | boolean | default true |
showInputMenu | boolean | default true |
showInputSet | boolean | default true |
iconClasses | object | default { linear: '', radial: '', ruler: '', eyeDroper: '', inputMenu: '', save: '', delete: '' } |
CSS Colour Variables
Variables Name | Hex | Dark Hex |
---|---|---|
--cp-container-bg | ||
--cp-ps-color | ||
--cp-act-color | ||
--cp-range-border | ||
--cp-input-menu-bg | ||
--cp-border-color | ||
--cp-range-shadow | ||
--cp-label-color | ||
--cp-container-shadow | ||
--cp-font-color | ||
--cp-button-color |
Roadmap
- Widget type to add
0.0.1
2 years ago