@pikas-ui/checkbox

This package contains a checkbox component.

This library is based on Radix Ui.

Change Log

Requirements

To use this package, you must install the @pikas-ui/styles package.

Installation

You can install this package using npm, yarn, or pnpm.

npm install @pikas-ui/checkbox
yarn add @pikas-ui/checkbox
pnpm add @pikas-ui/checkbox

Usage

Checkbox

This component is a checkbox.

import { Checkbox } from '@pikas-ui/checkbox';

const Example: React.FC = () => <Checkbox />;

Props

PropDescriptionTypeDefault
defaultCheckedThe default checked of the checkbox.CheckboxValuefalse
onChangeThe callback when the checkbox is changed.(checked: CheckboxValue') => void-
onChangeEventThe callback when the checkbox is changed.(event: ChangeEvent<HTMLInputElement>) => void-
idThe id of the checkbox.string-
labelThe label of the checkbox.string or ReactNode-
backgroundColorNameThe background color of the checkbox.PikasColors"white-fixed"
backgroundColorNameCheckedThe background color of the checkbox when checked.PikasColors"primary"
textErrorThe error text of the checkbox.string-
boxShadowThe box shadow of the checkbox.PikasShadow or "none""inner-md"
borderColorNameThe border color of the checkbox.PikasColors-
borderWidthThe border width of the checkbox.number0
borderRadiusThe border radius of the checkbox.PikasRadius"md"
fontSizeThe font size of the checkbox.PikasFontSize"em-base"
sizeThe size of the checkbox.number24
checkedThe checked of the checkbox.CheckboxValue-
classNameThe class name of the checkbox.string-
disabledThe disabled of the checkbox.booleanfalse
requiredThe required of the checkbox.booleanfalse
nameThe name of the checkbox.string-
sideThe side of the checkbox."left" or "right""right"
outlineThe outline of the checkbox.booleantrue
cssThe css of the checkbox.CheckboxCSS-

Contributing

This documentation can be edited on GitHub here