Components
Checkbox
Allow users to select and deselect items in bulk
Component Status Details
Status component contains a list of checks and completeness that has been tested and owned by each component
We don't use color as the only visual tool to convey information.
The component’s structure and properties include relevant options such as variant, style, size, orientation, optional iconography, decorations, selection, error state, etc. The title is the component name that uses the frame base component template. The base component name contains: .Base & "Component Name" if there is more than one. All component properties use the Legion foundation.
We can change all the parts that are connected to the component base. The inside of the base component remains connected to the master component. All variant options are not damaged when we change from one to another. Overriding changes to components will not reset other variants.
Component's already has component specs documentation.
Usage
Checkboxes allow users to select one or more items from a set. Checkboxes can turn an option on or off.
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 componentconst 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
Parameter | Description | Type | Required |
---|---|---|---|
checked | Whether or not this checkbox is checked. | Boolean | true |
defaultChecked | Set default value for checkbox. | Boolean | false |
disabled | The Modifier to be applied to the checkbox. | Modifier | No |
label | Text label for this checkbox. | String? | No |
size | The size to be applied to the checkbox. | LgnCheckboxSize | No |
key | The key to be applied to the checkbox. | String | No |
onCheckedChange | Called 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 |
required | Set aria-required. | Boolean | No |
sizeAdjust | The size to be applied to the checkbox. | Number | No |
scaleIcon | The scale to be applied to the checkbox. | Number | No |
scaleSize | The scale to be applied to the checkbox. | Number | No |
labeledBy | Set aria-labeled-by.. | String | No |