Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback

Components

Checkbox

Allow users to select and deselect items in bulk

banner-Checkbox
Component Status Details

Status component contains a list of checks and completeness that has been tested and owned by each component

check-list-icon We don't use color as the only visual tool to convey information.
check-list-icon The component’s structure and properties include relevant options such as variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.check-list-icon The title is the component name that uses the frame base component template.check-list-icon The base component name contains: .Base & "Component Name" if there is more than one.check-list-icon All component properties use the Legion foundation.
check-list-icon We can change all the parts that are connected to the component base.check-list-icon The inside of the base component remains connected to the master component.check-list-icon All variant options are not damaged when we change from one to another.check-list-icon Overriding changes to components will not reset other variants.
check-list-icon Component's already has component specs documentation.

Status

Resources

Usage

Checkboxes allow users to select one or more items from a set. Checkboxes can turn an option on or off.

react native checkbox

Single Checkbox

The basic checkbox component is used for individual checkboxes or basic checkbox needs.

import { Checkbox } from "@legion-crossplatform/ui";
const Checkbox = () => {
return (
<Checkbox checked={true} label="Checkbox Label" defaultChecked={false} />
);
};

Multiple Checkboxes

Example use for component checkbox with multiple items

import { Checkbox } from "@legion-crossplatform/ui";
// Create a checkbox group component
const CheckboxGroup = () => {
const data = [
{ id: 1, label: "Checkbox 1", value: "Checkbox 1" },
{ id: 2, label: "Checkbox 2", value: "Checkbox 2" },
{ id: 3, label: "Checkbox 3", value: "Checkbox 3" },
{ id: 4, label: "Checkbox 4", value: "Checkbox 4" },

Properties

ParameterDescriptionTypeRequired
checkedWhether or not this checkbox is checked.Booleantrue
defaultCheckedSet default value for checkbox.Booleanfalse
disabledThe Modifier to be applied to the checkbox.ModifierNo
labelText label for this checkbox.String?No
sizeThe size to be applied to the checkbox.LgnCheckboxSizeNo
keyThe key to be applied to the checkbox.StringNo
onCheckedChangeCalled when this checkbox is clicked. If null, then this checkbox will not be interactable, unless something else handles its input events and updates its state.((Boolean) -> Unit)?No
requiredSet aria-required.BooleanNo
sizeAdjustThe size to be applied to the checkbox.NumberNo
scaleIconThe scale to be applied to the checkbox.NumberNo
scaleSizeThe scale to be applied to the checkbox.NumberNo
labeledBySet aria-labeled-by..StringNo