Seed Bible extension API (v1.19.0) / seed-bible/components / CheckboxProps
Type Alias: CheckboxProps
type CheckboxProps = Omit<
JSX.InputHTMLAttributes<HTMLInputElement>,
| "type"
| "checked"
| "onChange"
| "indeterminate"
| "class"
| "className"
| "children"
> & {
checked: boolean;
class?: string;
className?: string;
indeterminate?: boolean;
inputRef?: Ref<HTMLInputElement>;
label?: ComponentChild;
onToggled: (checked: boolean) => void;
};Type Declaration
checked
checked: boolean;class?
class?: string;className?
className?: string;Extra classes, for placement, on the outer element (the label when there is one). class and className both work.
indeterminate?
indeterminate?: boolean;Some but not all of what it stands for are ticked (a "Select all" over a partly ticked list): shows a dash, and screen readers hear "mixed".
inputRef?
inputRef?: Ref<HTMLInputElement>;The <input> element, for code that has to focus it.
label?
label?: ComponentChild;The text beside the box; clicking it ticks the box too. Without one, give the checkbox an aria-label.
onToggled
onToggled: (checked: boolean) => void;Called with the new value when it's ticked or unticked.
Parameters
| Parameter | Type |
|---|---|
checked | boolean |
Returns
void