Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

Checkbox

Boolean or indeterminate checkbox.

Import

import { Checkbox } from "@dartwic/interface-sdk/ui";

Declaration

export const Checkbox: HostComponent<CheckboxProps>;

CheckboxProps

Props accepted by the host checkbox.

export interface CheckboxProps extends HostComponentProps {
    /** Controlled checked state. */
    checked?: boolean | "indeterminate";
    /** Initial uncontrolled checked state. */
    defaultChecked?: boolean;
    /** Called when the checked state changes. */
    onCheckedChange?: (checked: boolean | "indeterminate") => void;
    /** Disables interaction. */
    disabled?: boolean;
}
PropTypeRequirementDescription
checkedboolean | "indeterminate"OptionalControlled checked state.
defaultCheckedbooleanOptionalInitial uncontrolled checked state.
onCheckedChange(checked: boolean | "indeterminate") => voidOptionalCalled when the checked state changes.
disabledbooleanOptionalDisables interaction.