Skip to main content

<ColorPickerComponent/>

A helper component that offers the ability to change color and keep a history of selected colors, for use with an InspectorComponent.

Usage​

If you haven't yet read the docs for InspectorComponent we'd recommend it.

This component is used in the template for an inspector. You need to pass in the name of the property to manage.


<script setup>
import { ref } from "vue"

const current = ref(null)

</script>
<template>
<InspectorComponent v-model="current">
<ColorPickerComponent propertyName="bgColor"/>
</InspectorComponent>
</template>

Inputs​

ColorPickerComponentProps
NameTypeDescription
maxColors?numberMaximum number of color swatches to show, defaults to 10
propertyNamestringThe name of the property to bind to.