Skip to content

Components

Every Huey picker starts with HueyRoot, the context provider that holds the shared color state.

All other components must be descendants of a HueyRoot and automatically read from and write to its color state.

Every component’s prop type is exported alongside the component, so you can build typed wrappers without redeclaring its props. Each interface is named <Component>Props (e.g. HueSliderProps, ColorSwatchProps).

<script setup lang="ts">
import type { HueSliderProps } from '@hueycolor/vue'
import { HueSlider } from '@hueycolor/vue'
defineProps<HueSliderProps>()
</script>
<template>
<div class="my-hue-slider">
<HueSlider v-bind="$props" />
</div>
</template>