Skip to content

Checkbox

Render the shared native checkbox while keeping the caller’s renderer and event semantics. This works with both RevoGrid/Stencil templates and Preact.

export function renderCheckbox(h: PreactH, attributes?: SharedCheckboxAttributes): PreactVNode;;

Preact adapter for the shared checkbox presentation. The native input stays the interaction owner; the adapter only normalizes indeterminate state and optional label/description composition.

export function Checkbox({
checked,
indeterminate = false,
label,
description,
ariaLabel,
controlClassName = '',
inputRef,
onChange,
...attributes
}: CheckboxProps): any;

SHARED_CHECKBOX_CLASS: string;

SharedCheckboxAttributes (Extended from index.ts)

Section titled “SharedCheckboxAttributes (Extended from index.ts)”
export type SharedCheckboxAttributes = Record<string, unknown> & {
class?: string;
className?: string;
};

export type CheckboxProps = Omit<SharedCheckboxAttributes, 'onChange'> & {
checked?: boolean;
indeterminate?: boolean;
label?: any;
description?: any;
ariaLabel?: string;
controlClassName?: string;
inputRef?: (input: HTMLInputElement | null) => void;
onChange?: (checked: boolean, event: Event & { currentTarget: HTMLInputElement }) => void;
};