Checkbox

Exports

Import these components from @mbsw/ui.

Checkbox

Props

The tables list common props for each component. See the full types for supported prop combinations and inherited HTML and Radix props.

Checkbox

Checkbox props
PropTypeRequirement
shape'round' | 'square'Optional

Type reference

Show full types

Full TypeScript definitions, including prop combinations and inherited props.

import { type ComponentPropsWithoutRef } from 'react';

import { Checkbox as CheckboxPrimitive } from 'radix-ui';

export type CheckboxShape = 'round' | 'square';

type DataAttributes = {
    [key: `data-${string}`]: boolean | number | string | undefined;
};

type CheckboxPrimitiveProps = ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;

export type CheckboxProps = Omit<CheckboxPrimitiveProps, 'asChild' | 'children'> & DataAttributes & {
    shape?: CheckboxShape;
};

export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<CheckboxPrimitive.CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref">, "children" | "asChild"> & DataAttributes & {
    shape?: CheckboxShape;
} & import("react").RefAttributes<HTMLButtonElement>>;