UNPKG

rsuite

Version:

A suite of react components

90 lines (89 loc) 2.39 kB
import React from 'react'; import { BoxProps } from '../internals/Box'; import type { Color, HTMLPropsWithoutChange } from '../internals/types'; export interface CheckboxProps<V = string | number> extends BoxProps, HTMLPropsWithoutChange<HTMLDivElement> { /** * The color of the checkbox when checked or indeterminate * * @version 5.56.0 */ color?: Color; /** * Whether to show checkbox * * @private Used in MultiCascader */ checkable?: boolean; /** * A checkbox can appear disabled and be unable to change states */ disabled?: boolean; /** * Make the control readonly */ readOnly?: boolean; /** * Render the control as plain text */ plaintext?: boolean; /** * Whether or not checkbox is checked. */ checked?: boolean; /** * The initial value of checked. */ defaultChecked?: boolean; /** * Whether or not checkbox is indeterminate. */ indeterminate?: boolean; /** * Attributes applied to the input element. */ inputProps?: React.HTMLAttributes<HTMLInputElement>; /** * Pass a ref to the input element. */ inputRef?: React.Ref<any>; /** * Inline layout * * @private Used in CheckboxGroup */ inline?: boolean; /** * The HTML input value. */ value?: V; /** * Used for the name of the form */ name?: string; /** * Whether the label is clickable * * @private Used in MultiCascader */ labelClickable?: boolean; /** * Called when the user attempts to change the checked state. */ onChange?: (value: V | undefined, checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void; /** * Called when the checkbox or label is clicked. */ onClick?: (event: React.SyntheticEvent) => void; /** * Called when the checkbox is clicked. * * @private Used in MultiCascader */ onCheckboxClick?: (event: React.SyntheticEvent) => void; } /** * The Checkbox component is used for selecting multiple options from a set. * @see https://rsuitejs.com/components/checkbox */ declare const Checkbox: import("../internals/types").InternalRefForwardingComponent<"div", CheckboxProps<string | number>, never> & Record<string, never>; export default Checkbox;