Components
Select
A Select component allows users to pick a value from predefined options.
Viewmodels
SelectVM
selectedItemIndexnumberThe index of the currently selected option in the Select.
optionslistContains a list of all available options in the Select.
controlArtboardartboardDetermines which artboard is used to visualize the component's state.
labelArtboardartboardDetermines which component is used for the Label.
labelstringSpecifies the localized strings that identifies the Select.
expandedbooleanDetermines whether the Select has been expanded.
disabledbooleanDetermines whether the Select is disabled.
hoverbooleanIndicates when the pointer overlaps with the Select.
directionEnumDetermines the Select's left-to-right alignment.
SelectOptionVM
controlArtboardartboardDetermines which artboard is used to visualize the component's state.
listIndexnumberThe index of the item.
itemPressedtriggerFires when the option has been chosen.
labelstringSpecifies the localized strings that identifies the option.
hoverbooleanIndicates when the pointer overlaps with the Select.
Hierarchical Structure
select_component
- Root - The Root of the component.
- Label - A Layout containing the Label Artboard.
- A component instance of labelArtboard.
- Control - A Layout containing the Control Artboard. Pointer functionality targets this layout.
- A component instance of controlArtboard.
- Options - A Layout containing the Select's options.
- An Artboard List of options. The artboard in use is option_item.
- Label - A Layout containing the Label Artboard.
- IndexManager - A script that manages selectedItemIndex. If (loopItems = true), selectedItemIndex will loop around once it goes beyond the range of itemCount. If (loopItems = false), selectedItemIndex will be clamped within the bounds of itemCount.
Animations
This artboard contains a pair of animations used in a corresponding state machine layer.
- Expanded
- ExpandedTrue - Sets the visibility of Body to "Show." Plays if (expanded = true).
- ExpandedFalse - Sets the visibility of Body to "Hide." Plays if (expanded = false).
select_arrow_control
- Root - The Root of the component.
- Value - A Layout containing an Artboard List.
- An Artboard List of options. The artboard in use is option_display_item.
- Icon - A Layout containing a group.
- A group containing a shape. This prevents the shape from being distorted by its parent layout.
- A shape representing an arrow.
- A group containing a shape. This prevents the shape from being distorted by its parent layout.
- Value - A Layout containing an Artboard List.
Animations
This component contains three pairs of animations, each on its corresponding layer.
- Disabled
- DisabledTrue - Indicates the Select cannot be interacted with. Plays if (disabled = true).
- DisabledFalse - Indicates the Select can be interacted with. Plays if (disabled = false).
- Hover
- HoverTrue - Indicates the pointer overlaps with the Select. Plays if (hover (SelectVM) = true) and (disabled (SelectVM) = false).
- HoverFalse - Indicates the pointer does not overlap with the Select. Plays if (hover (SelectVM) = false).
- Expanded
- ExpandedTrue - Indicates the Select has been expanded. Plays if (expanded = true) and (disabled = false).
- ExpandedFalse - Indicates the Select has not been expanded. Plays if (expanded = false).
text_label
- Root - The Root of the component.
- Text Layout - A Layout containing a Text Element.
- Text - A text element. The value of its Text Run is bound to label (SelectVM).
- Text Layout - A Layout containing a Text Element.
option_item
- Root - The Root of the component. Pointer functionality targets this Layout.
- A component instance of controlArtboard (SelectOptionVM).
option_control
- Root - The Root of the component.
- Label - A Text Layout containing a Text Element.
- Text - A text element. The value of its Text Run is bound to label (SelectOptionVM).
- Icon - A Layout containing a group.
- A group containing a shape. This prevents the shape from being distorted by its parent layout.
- A shape representing a checkmark.
- A group containing a shape. This prevents the shape from being distorted by its parent layout.
- Label - A Text Layout containing a Text Element.
Animations
This component contains two pairs of animations, each on its corresponding layer.
- SelectedIndex
- SelectedIndexTrue - Indicates the option has been selected (selectedItemIndex = listIndex).
- SelectedIndexFalse - Indicates the option has not been selected. Plays if (selectedItemIndex ≠ listIndex).
- Hover
- HoverTrue - Indicates the pointer overlaps with the Select. Plays if (hover (SelectOptionVM) = true).
- HoverFalse - Indicates the pointer does not overlap with the Select. Plays if (hover (SelectOptionVM) = false).
option_display_item
- Root - The Root of the component.
- A component instance of text_option_label.
Animations
This artboard contains a pair of animations used in a corresponding state machine layer.
- SelectedIndex
- SelectedIndexTrue - Sets the visibility of Root to "Show." Plays if (selectedItemIndex = listIndex).
- SelectedIndexFalse - Sets the visibility of Root to "Hide." Plays if (selectedItemIndex ≠ listIndex).
text_option_label
- Root - The Root of the component.
- Text Layout - A Layout containing a Text Element.
- Text - A text element. The value of its Text Run is bound to label (SelectOptionVM).
- Text Layout - A Layout containing a Text Element.
Best Practices
- If using this component on a platform without pointer input, you can increment or decrement selectedItemIndex to navigate between options. IndexManager was created to account for this use case.
