WRNexus UI
Forms component

Color Picker

Theme-aware, responsive color picker component.

19 props0 slots4 outputsTheme readyResponsive
Interactive playground

Configure Color Picker

Change any prop and inspect the server-rendered component immediately.

Live preview
#8b5cf6
Component code
<ColorPicker
  name="brand-color"
  label="Brand color"
  value="#8b5cf6"
/>
Event outputInteract with the preview to inspect the typed payload.
Component props19 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
#8b5cf6
Component usage.wrn
<ColorPicker
  name="brand-color"
  label="Brand color"
  value="#8b5cf6"
/>
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
#14b8a6
Component usage.wrn
<ColorPicker
  name="brand-color"
  label="Brand color"
  value="#14b8a6"
/>
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
#3b82f6
Component usage.wrn
<ColorPicker
  name="brand-color"
  label="Brand color"
  value="#3b82f6"
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@inputFires as the editable value changes.
@changeFires when the component's committed value or selection changes.
@focusFires when the interactive control receives focus.
@blurFires when focus leaves the interactive control.
Declarative handlers.wrn
<ColorPicker
  @input='console.log(payload)'
  @change='console.log(payload)'
  @focus='console.log(payload)'
  @blur='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"ColorPicker\"], [data-component=\"ColorPicker\"]")

if (component) registerOutputHandler(component, "input", (payload) => {
  console.log("input", payload)
})

if (component) registerOutputHandler(component, "change", (payload) => {
  console.log("change", payload)
})

if (component) registerOutputHandler(component, "focus", (payload) => {
  console.log("focus", payload)
})

if (component) registerOutputHandler(component, "blur", (payload) => {
  console.log("blur", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
idstring""No
namestring""No
labelstring"Color"No
hiddenLabelbooleanfalseNo
placeholderstring""No
valuestring"#2563eb"No
iconstring""No
iconPositionstring"start"No
helperTextstring""No
cornerHintstring""No
errorstring""No
inlinebooleanfalseNo
variantstring"normal"No
readonlybooleanfalseNo
disabledbooleanfalseNo
requiredbooleanfalseNo
classstring""No