DocSpace-client/packages/shared/components/checkbox
2024-01-10 11:01:43 +03:00
..
Checkbox.stories.tsx Shared:Components:Checkbox: delete useless code 2023-12-06 10:58:03 +03:00
Checkbox.styled.ts Shared:Components:Checkbox: rewrite to typescript 2023-12-05 20:43:04 +03:00
Checkbox.test.tsx Shared:Components:Checkbox: rewrite to typescript 2023-12-05 20:43:04 +03:00
Checkbox.tsx Client: fix after rewrite to typescript 2023-12-28 11:46:16 +03:00
Checkbox.types.ts Client: fix after rewrite to typescript 2023-12-27 18:13:56 +03:00
index.tsx Shared:Components:Checkbox: rewrite to typescript 2023-12-05 20:43:04 +03:00
README.md Client: fix wrong import - export for shared components 2024-01-10 11:01:43 +03:00

Checkbox

Custom checkbox input

Usage

import { Checkbox } from "@docspace/shared/components/checkbox";
<Checkbox
  id="id"
  name="name"
  value="value"
  label="label"
  isChecked={false}
  isIndeterminate={false}
  isDisabled={false}
  onChange={() => {}}
/>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
id string - - - Used as HTML id property
isChecked bool - - false The checked property sets the checked state of a checkbox
isDisabled bool - - - Disables the Checkbox input
isIndeterminate bool - - - If true, this state is shown as a rectangle in the checkbox
label string - - - Label of the input
name string - - - Used as HTML name property
onChange func - - Will be triggered whenever an CheckboxInput is clicked
style obj, array - - - Accepts css style
value string - - - Value of the input
title bool - - - Title
truncate bool - - false Disables word wrapping
color string - - #FFFF Makes the checkbox a different color