@htmlbricks/hb-input-color
v0.71.16
Published
Color input that normalizes named HTML colors and `rgb(...)` strings into a hex value for the native picker, with debounced syncing back to the bound value. Driven by `schemaentry` (including required and optional `validationTip` with `show_validation`).
Readme
hb-input-color — input-color
Category: inputs
Tags: inputs
What it does
Color input that normalizes named HTML colors and rgb(...) strings into a hex value for the native picker, with debounced syncing back to the bound value. Driven by schemaentry (including required and optional validationTip with show_validation). Dispatches setVal with the string value, valid, and id.
Styling (Bulma)
Shadow bundle: form/shared, form/input-textarea, form/tools. The native type="color" control uses host SCSS (border / outline with --bulma-*). Validation uses help is-danger. Theme variables on :host.
Custom element
hb-input-color
Attributes (snake_case; use string values in HTML)
id— optional stringstyle— optional stringschemaentry— required string (JSON:id,label?,required?,value?,validationTip?,placeholder?, …)show_validation— optional"yes"|"no"
Events
setVal—{ value: string; valid: boolean; id: string }
Usage notes
CSS parts: input, invalid-feedback.
Minimal HTML example
<hb-input-color
schemaentry="{"id":"accent","required":true,"value":"#07689f"}"
show_validation="no"
></hb-input-color>