Skip to content
Huey
GitHub

Hex Input

An input field for entering hexadecimal color values.

import { HexInput } from '@hueycolor/vue'
<script setup>
import { ref } from 'vue'
import { HueyRoot, HexInput, hueyColor } from '@hueycolor/vue'
const color = ref(hueyColor('#1A3263'))
</script>
<template>
<HueyRoot v-model="color">
<HexInput />
</HueyRoot>
</template>
Prop Type Default Description
alpha boolean true Whether to include the alpha channel in the hex value. Set to false to display only the 6-digit RGB hex.

Extends all standard HTML input attributes (id, placeholder, disabled, etc.).

Accepts both 3-digit and 6-digit hex values, with or without the # prefix. Use the up/down arrow keys to bump hex pair values. Hold Shift to bump by 10.