Skip to content

Form Controls

export function createFormField(
document: Document,
options: FormFieldOptions,
): HTMLLabelElement;

export function createTextControl(
document: Document,
placeholder: string,
): HTMLInputElement;

export function createSelectControl(
document: Document,
options: readonly { value: string; label: string }[],
): HTMLSelectElement;

interface FormFieldOptions {
readonly label: string;
readonly control: HTMLElement;
readonly hint?: string;
readonly className?: string
}