Props
| Name | Description |
|---|---|
alpha Type: booleanDefaultfalse | Enable the alpha channel. The palette shows an opacity slider and emits Enable it wherever eight-digit values can occur: without it an incoming |
disabled Type: booleanDefaultfalse | Takes every control out of the tab order and ignores every input. Takes every control out of the tab order. A |
eyeDropper Type: booleanDefaultfalse | Show an eyedropper button to sample any color on screen. Uses the native EyeDropper API — hidden automatically on unsupported browsers. The button renders only where the browser implements the native |
modelValue Type: string | null | v-model: the current color as a |
pt Type: (PtCompoundOf<"", { readonly parts: readonly ["root", "swatch"]; readonly states: readonly ["selected", "disabled"]; readonly wide: readonly ["disabled"]; readonly node: { readonly swatch: readonly ["selected"]; }; }> & { root?: PtValue | undefined; "root:disabled"?: PtValue | undefined; swatch?: PtValue | undefined; "swatch:disabled"?: PtValue | undefined; "swatch:selected"?: PtValue | undefined; }) | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
readonly Type: booleanDefaultfalse | The controls stay focusable and show the value, but nothing changes it. The controls stay focusable, so the colour stays readable, and nothing changes it. Prefer it to |
swatches Type: boolean | string[][] | Controls swatches display:
- Each inner array is a column of shades, so ramps are designed vertically. A row-wise |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: string | null | Seed it as |
Events
| Name | Description |
|---|---|
update:modelValue Type: (value: string): void | Emitted when a color is picked. Payload is a concrete Drag-frequency, not a commit: it fires on every frame while the square or a slider moves. Repaint from it, and save on |
value-commit Type: (value: string): void | Emitted once the user finishes changing the colour, after The event to save on: once a drag is released, and once per key step, swatch or eyedropper pick. Only when the colour changed, and never for a value you set from code. See example |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
activatorremovedfails silentlyThe popover is
BbColorPickernow (palm #27a):BbColorPaletteis the in-page panel; rename the tag toBbColorPicker.- slot
activatorremovedfails silentlyThe popover is
BbColorPickernow (palm #27a):BbColorPaletteis the in-page panel; rename the tag toBbColorPicker.