Options
All
  • Public
  • Public/Protected
  • All
Menu

Checkbox powered by Angular Material library.

Example of usage

export const component: DraymanComponent = async ({ forceUpdate }) => {

    let checked = false;

    const onValueChange = async ({ value }) => {
        checked = value;
        await forceUpdate();
    }

    return () => {
        return (
            <drayman-checkbox
                value={checked}
                label={checked ? `Uncheck me!` : `Check me!`}
                onValueChange={onValueChange}
            />
        );
    }
}

Hierarchy

Index

Properties

Optional disabled

disabled: boolean

Whether the control is disabled.

Optional label

label: string

The floating label for a field.

Optional onValueChange

onValueChange: ElementEvent<{ value: boolean }>

Executed with an input value from user.

Optional ref

ref: string

Optional style

style: CSS

Optional updateOnBlur

updateOnBlur: boolean

Wether value of the field should be emitted when user is blurred out of the control.

Optional value

value: boolean

Value of the input.