Skip to main content

ElementCheckbox

Namespace for creating DOM checkboxes.

Index

Interfaces

Interfaces

Options

Options:

Various options that can be passed along to ElementCheckbox.Create

optionalchecked

checked?: boolean

Whether the checkbox is checked by default or not

optionaldisabled

disabled?: boolean

Whether the checkbox should be disabled or not

optionalname

name?: string

The name of the input.

Particularly important when a radio Options.type is specified, as all radios with the same name define a group of options.

optionalrequired

required?: boolean

If a radio Options.type is specified, this mandates that a radio must be selected within its Options.name-defined group

optionaltype

type?: radio | checkbox

Whether the checkbox should serve as a checkbox or radio button

optionalvalue

value?: string | number

The HTMLInputElement.value/HTMLInputElement.valueAsNumber associated with the checkbox when checked.

Defaults to "on" if not specified.

Page Options