@itwin/itwinui-react
Version:
A react component library for iTwinUI
50 lines (49 loc) • 1.44 kB
TypeScript
import * as React from 'react';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
type CheckboxProps = {
/**
* Text that will be shown next to the checkbox.
*/
label?: React.ReactNode;
/**
* Allow checkbox to be indeterminate.
* @default false
*/
indeterminate?: boolean;
/**
* Status of checkbox.
*/
status?: 'positive' | 'warning' | 'negative';
/**
* Type of checkbox, regular or eyeball checkbox that is used for visibility.
* @default 'default'
*/
variant?: 'default' | 'eyeball';
/**
* Display a loading state.
* @default false
*/
isLoading?: boolean;
/**
* Passes properties for checkbox wrapper.
*/
wrapperProps?: React.ComponentProps<'label'>;
/**
* Passes properties for checkbox label.
*/
labelProps?: React.ComponentProps<'span'>;
};
/**
* Simple input checkbox
* @example
* <Checkbox />
* <Checkbox label='Basic Checkbox' />
* <Checkbox label='Disabled Checkbox' disabled />
* <Checkbox label='Checked' checked />
* <Checkbox label='Positive Checkbox' status='positive' />
* <Checkbox label='Warning Checkbox' status='warning' />
* <Checkbox label='Negative Checkbox' status='negative' />
* <Checkbox label='Visibility Checkbox' variant='eyeball' />
*/
export declare const Checkbox: PolymorphicForwardRefComponent<"input", CheckboxProps>;
export {};