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

Create checkbox button with or without label. Checkbox is a component that allows the user to make a choice between one of two possible mutually exclusive options such as ‘yes’ or ‘no’ to a question. With checkbox, user can check or uncheck in one box. How to import your theme: Legion iOS UIKit offers four themes: ThemeAGR, ThemeEazy, ThemeIHS, ThemeLGN, and ThemeMyTEnS.

import ThemeLGN

The checkbox can be used without any parameter

LGNCheckbox()

Variant

LGNButton have 2 checkbox variants:

CheckMin

Check

let checkbox = LGNCheckbox()
checkbox.variant = .check
checkbox.size = .lg
checkbox.checked = true
checkbox.textLabel = "Label"

Min

let checkbox2 = LGNCheckbox()
checkbox2.variant = .min
checkbox2.size = .lg
checkbox2.checked = true
checkbox2.textLabel = "Label"

Size

You can customize the size of the button via the size enum, where BaseCheckbox.Size includes lg, md and sm.

LargeMediumSmall

Large

let checkbox = LGNCheckbox()
checkbox.variant = .check
checkbox.size = .lg
checkbox.checked = true
checkbox.textLabel = "Label"

Medium

let checkbox2 = LGNCheckbox()
checkbox2.variant = .check
checkbox2.size = .md
checkbox2.checked = true
checkbox2.textLabel = "Label"

Small

let checkbox3 = LGNCheckbox()
checkbox3.variant = .check
checkbox3.size = .sm
checkbox3.checked = true
checkbox3.textLabel = "Label"

Disabled

You can also disable user interaction on LGNCheckbox

CheckedUnchecked

Checked

let checkbox = LGNCheckbox()
checkbox.variant = .check
checkbox.size = .lg
checkbox.checked = true
checkbox.textLabel = "Label"
checkbox.disable = true

Unchecked

let checkbox2 = LGNCheckbox()
checkbox2.variant = .check
checkbox2.size = .lg
checkbox2.checked = false
checkbox2.textLabel = "Label"
checkbox2.disable = true

Properties

PropertyDescriptionDefault Value
checkedThe state of checkbox.false
disableDetermine if the checkbox disabled or not.false
sizeThe size of the checkbox..md
textLabelThe label for the checkbox that describes it.nil
variantVariation of checkbox image..check