Skip to content

CoworkDialogField

One field of a CoworkDialog. Its answer is values[id]: a string for text, textarea, select and color; a number for number ("" while empty); a boolean for checkbox; a section has none.

id: string;

label?: string;

monospace?: boolean;

options?: CoworkDialogOption[];

select: the choices. color: the swatches, each value a hex color (#rgb … #rrggbbaa) or "" for no color — any other value is not drawn.


placeholder?: string;

For a section: its body text.


type:
| "number"
| "text"
| "textarea"
| "checkbox"
| "select"
| "section"
| "color";

value?: string | number | boolean;

The starting answer. Default: "" — false for a checkbox, the first option for a select.