Skip to main content

Checkbox

Import​

import { Checkbox } from '@resultadosdigitais/tangram-components'

Properties​

Note: we don't use the required props of context for checkbox, once it is applied can be a trouble for multiples elements. It must be controlled outside.

checked​

Typebool

Description​

Defines the Checkbox state. Used for Controlled component.

defaultChecked​

Typebool

Description​

Sets the Checkbox checked by default. Used for Uncontrolled component.

disabled​

Typebool
Defaultfalse

Description​

Disables the Checkbox.

id​

Typestring

Description​

Sets the id.

indeterminate​

Typebool
Defaultfalse

Description​

Switch Checkbox icon between checkmark and indeterminate.

error​

Typebool
Defaultfalse

Description​

Sets error style.

label​

Typenode

Description​

Sets the label.

onChange​

Typefunc
Default() => {}
Paramevent React.SyntheticEvent - The event source of the callback.
ParamnewStatus boolean - The new status about if is checked.

Description​

Callback fired when the pagination changes.

rootRef​

Typefunc | shape
Defaultnull

Description​

Pass a ref to the element wrapper.

size​

Type
Enum of:
  • Checkbox.sizes.md
  • Checkbox.sizes.lg
DefaultCheckbox.sizes.md

Description​

Sets the Checkbox size.

Feedback​