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>import { HexInput } from '@hueycolor/svelte'<script>import { HueyRoot, HexInput, hueyColor } from '@hueycolor/svelte'
let color = $state(hueyColor('#1A3263'))</script>
<HueyRoot bind:color> <HexInput /></HueyRoot>| 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.).
Format
Section titled “Format”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.