[[using-shell-components-ui-multiselect]]
==== Multi Select
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]

The multi select component asks a user to select multiple items from a list.
The following listing shows an example:

====
[source, java, indent=0]
----
include::{snippets}/UiComponentSnippets.java[tag=snippet7]
----
====

The following image shows a typical multi-select component:

image::images/component-multi-select-1.svg[text input]

The context object is `MultiItemSelectorContext`. The following table describes its context variables:

[[multiitemselectorcontext-template-variables]]
.MultiItemSelectorContext Template Variables
|===
|Key |Description

|`values`
|The values returned when the component exists.

|`rows`
|The visible items, where rows contain maps of name, selected, on-row, and enabled items.

|`model`
|The parent context variables (see <<selectorcomponentcontext-template-variables>>).
|===
