import type React from 'react'; import type { BaseInputProps, GlobalHTMLAttributes } from './types'; export interface CheckboxProps extends GlobalHTMLAttributes, BaseInputProps { /** * The name of the input to use when submitting the form. */ name: string; /** * Concise label for the checkbox. * * Labels should not contain HTML, add any required links in the `hint` instead. */ label: string; /** * The value of the checkbox that will be submitted with the form data. * * @default on * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#value */ value?: string; /** * Makes the checkbox required. */ required?: boolean; /** * Set the error message of a checkbox and mark it invalid. */ errorMessage?: string; /** * Force the checkbox to be invalid. * * @default false */ 'aria-invalid'?: boolean; /** * Whether the checkbox is checked. * Makes the input controlled. */ checked?: boolean; /** * Fires when the input is checked or unchecked. */ onChange?: React.ChangeEventHandler; /** * Whether an (uncontrolled) checkbox is checked by default. */ defaultChecked?: boolean; /** * Indicates if the checkbox is in an indeterminate state, often used * to show a "partially selected" state (e.g., when some child checkboxes * are selected). This state is visual-only and does not affect the * checkbox's submitted value. * * @default false */ indeterminate?: boolean; } /** * Checkboxes should be used for selecting one or more of many options, or as a toggle with a favourable option. */ export declare const Checkbox: React.ForwardRefExoticComponent>;