TColorPicker / 色彩选择器
ColorPicker provides a full color picking experience with a popover panel. Supports alpha channel, predefined colors, multiple format output, and label display. / 色彩选择器通过弹出面板提供完整的颜色选取体验,支持 Alpha 通道、预设色、多格式输出和标签展示。
Props / 属性
| Prop | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
colorFormat | 'hex' | '#hex' | 'rgb' | 'hsv' | 'hsl' | '#hex' | Output format |
showAlpha | boolean | false | Show alpha slider |
predefine | string[] | — | Preset colors |
disabled | boolean | false | Disabled |
showValue | boolean | true | Show color value text |
size | 'sm' | 'md' | 'lg' | 'md' | Input size |
label | string | — | Label text |
Basic Usage / 基础用法
vue
<script setup lang="ts">
import { TColorPicker } from '@gulcc/tabler-vue'
const color = ref('#206bc4')
</script>
<template>
<TColorPicker v-model="color" label="Pick color / 选择颜色" />
</template>