Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback

Components

Chips

Chips allow users to enter information, make selections, filter content, or trigger actions.

banner-Chips
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

Chips allow users to enter information, make choices, filter content, or trigger actions. While buttons are expected to appear consistently and with a familiar call to action, chips will appear dynamically as groups of multiple interactive elements.

Use Legion chips styles to modify chips with lots of attributes that make you easier.

ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy

LGNChips(label: "Label")

Variant

ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy

LGNChips(label: "Label", size: .medium)
LGNChips(label: "Label", size: .small)

Attribute

Legion Have 3 Attributes for Customize Chips :

Size

This size attribute for user to costumize size of chips

Small
Theme (ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy)
      
LGNChips(label: "Label", size: .small)
Medium
Theme (ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy)
      
LGNChips(label: "Label", size: .medium)

Active

This size attribute for user to costumize active of chips

Small
Theme (ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy)
      
LGNChips(label: "Label", isActive: true, size: .small)
Medium
Theme (ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy)
      
LGNChips(label: "Label", isActive: true, size: .medium)

Disable

This size attribute for user to costumize disable of chips

Small
Theme (ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy)
      
LGNChips(label: "Label", isDisabled: .constant(true), size: .small)
Medium
Theme (ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy)
      
LGNChips(label: "Label", isDisabled: .constant(true), size: .medium)

Properties

PropertiesDescriptionDefault Value
labelThe label for the chip’s label, that describes the purpose of the chips’ action.'nil'
sizeThe size of the chips. Either .medium or .small'nil'
isDisabledA binding boolean to enable disable the chips component'.constant(false)'
isActiveThe boolean state to enable active state to the chips component.'false'
fontFamilyA string of font family name""
actionThe action to perform when the user triggers the chips.{}
isHiddenBorderThe boolean state to hide the border when the state is active'false'
activeTextColorA text color to be used for the foregroundColor/textlabel when the state is active'.white'
disabledTextColorA text color to be used for the foregroundColor/textlabel when the state is disabled'Color.LGNTheme.tertiary400'
defaultTextColorA text color to be used for the foregroundColor/textlabel when the state is default'Color.LGNTheme.tertiary900'
activeBackgroundColorA background color to be used for the chips background when the state is active'Color.LGNTheme.tertiary900'
notActiveBackgroundColorA background color to be used for the chips background when the state is not active'.clear'

Example Project

ThemeLGN, ThemeAGR, ThemeMyTEnS, ThemeIHS & ThemeEazy

LGNChips(
label: "Hello",
isDisabled: .constant(false),
isActive: false,
size: .small,
fontFamily: "NunitoSans-Bold"
) {
print("hello")
}