Socket
Socket
Sign inDemoInstall

vue-pick-colors

Package Overview
Dependencies
22
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-pick-colors

A Color picker for Vue.js 3


Version published
Weekly downloads
345
increased by8.83%
Maintainers
1
Install size
1.58 MB
Created
Weekly downloads
 

Readme

Source

vue-pick-colors

🎉 vue3 颜色拾取器

外观样式基于 vue-color-kit

English

Demo


安装

npm install vue-pick-colors

或者

yarn add vue-pick-colors

使用

<template>
  <pick-colors v-model:value="value"/>
</template>

<script lang="ts" setup>
  import PickColors from 'vue-pick-colors'
  const value = ref('#ff4500')
</script>

API

属性说明类型默认值版本
value(v-model)值,
支持hex、rgb、rgba、hsl、hsla、hsv、hsva
string | string[]
show-picker(v-model)控制拾取器隐藏或显示boolean1.5.0
size颜色块大小number | string20
width色块宽度
如果为空使用 size属性
number | string1.5.0
height色块高度
如果为空使用 size属性
number | string1.5.0
theme主题light | darklight
colors预留颜色组
支持hex、rgb、rgba、hsl、hsla、hsv、hsva
string []['#ff4500','#ff8c00','#ffd700', '#90ee90','#00ced1','#1e90ff', '#c71585','#ff4500','#ff7800', '#00babd','#1f93ff','#fa64c3']
format颜色值格式化hex | rgb | hsl | hsthex
show-alpha是否支持透明度选择booleanfalse
add-color是否支持添加颜色booleanfalse
popup-container定义拾取器的容器string | Vue.RendererElement| boolean'body'1.5.0
z-index拾取器的层级number10001.5.0
max添加颜色最大数number13

事件

事件名描述参数版本
change颜色值变化function(value: string|string [],color: string,index: number)
close-picker关闭拾取器function(value: string|string [])1.5.0
overflow-max颜色添加达到最大值

Keywords

FAQs

Last updated on 27 Mar 2024

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