2.3.0 • Published 2 months ago
vue3-colorpicker v2.3.0
colorpicker
A very beautiful color picker, supports input and output of multiple color formats, and supports gradient color selection.
Note: This document is for Vue3ColorPicker v2. If you are looking for an older versions, refer to the v1 branches.The v2 version is a destructive update, and some functions in v1 are no longer supported. Please use it with caution
Installation
yarn add vue3-colorpicker
OR
npm install vue3-colorpicker
How to use
The first step is global registration
import Vue3ColorPicker from "vue3-colorpicker";
import "vue3-colorpicker/style.css";
createApp(App)
.use(router)
.use(Vue3ColorPicker)
.mount("#app");
OR
import { ColorPicker } from "vue3-colorpicker";
import "vue3-colorpicker/style.css";
export default defineComponent({
components: { ColorPicker },
});
Usage
<template>
<div>
<color-picker v-model:pureColor="pureColor" v-model:gradientColor="gradientColor"/>
</div>
</template>
<script lang="ts">
import { ref } from "vue";
import { ColorInputWithoutInstance } from "tinycolor2";
export default defineComponent({
setup() {
const pureColor = ref<ColorInputWithoutInstance>("red");
const gradientColor = ref("linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 100%)");
return { pureColor, gradientColor }
}
});
</script>
2.3.0
2 months ago
2.2.3
5 months ago
2.2.1
9 months ago
2.2.0
9 months ago
2.1.4
11 months ago
2.2.2
9 months ago
2.1.3
11 months ago
2.1.6
10 months ago
2.1.5
11 months ago
2.1.2
1 year ago
2.1.1
1 year ago
2.0.11
1 year ago
2.0.7
1 year ago
2.0.6
1 year ago
2.0.9
1 year ago
2.0.10
1 year ago
2.0.8
1 year ago
2.1.0
1 year ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.4
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago