Skip to content

ColorFieldProps beta ​

Interface of @v12-engine/client/kit

ts
export interface ColorFieldProps

What a ColorField is given: the colour, what to tell when it is picked, swatches, and where it opens

Members ​

alpha ​

ts
alpha?: boolean;

With how much of it is seen (its alpha): a slider over a checkerboard under the hue's, the swatch shown over one, a field of 0 to 1 beside the typed hex (typed), and the colour told as #rrggbbaa. No when left out: #rrggbb, whole

ark ​

ts
ark?: Partial<Omit<ArkColor.RootProps, 'value' | 'children' | 'class'>>;

The rest of Ark's colour picker, which it is (positioning, format...): Ark's own, not the kit's to promise

class ​

ts
class?: string;

CSS classes added to the field's element

disabled ​

ts
disabled?: boolean;

Whether it cannot be opened: dimmed

mount ​

ts
mount?: Element;

Where what opens goes: the place it is in (a game's element), or the page's body, when left out

onCommit ​

ts
onCommit?: (hex: string) => void;

Told once the picking is done, with where it was left

onValue ​

ts
onValue?: (hex: string) => void;

Told as it is picked

swatches ​

ts
swatches?: readonly string[];

Colours to pick at a press, under the rest

typed ​

ts
typed?: boolean;

With a field to type it in, next to what shows it. No when left out

value ​

ts
value: string;

The colour, as #rrggbb; #rrggbbaa where it says how much of it is seen (alpha)