@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
25 lines (24 loc) • 942 B
TypeScript
import * as React from 'react';
import type { CheckboxRoot } from '../root/CheckboxRoot.js';
import type { BaseUIComponentProps } from '../../utils/types.js';
import { type TransitionStatus } from '../../utils/useTransitionStatus.js';
/**
* Indicates whether the checkbox is ticked.
* Renders a `<span>` element.
*
* Documentation: [Base UI Checkbox](https://base-ui.com/react/components/checkbox)
*/
declare const CheckboxIndicator: React.ForwardRefExoticComponent<CheckboxIndicator.Props & React.RefAttributes<HTMLSpanElement>>;
declare namespace CheckboxIndicator {
interface State extends CheckboxRoot.State {
transitionStatus: TransitionStatus;
}
interface Props extends BaseUIComponentProps<'span', State> {
/**
* Whether to keep the element in the DOM when the checkbox is not checked.
* @default false
*/
keepMounted?: boolean;
}
}
export { CheckboxIndicator };