A Sequence uses a data set to inflate a repeating set of components and display them in a long scrolling list. See Alexa Design Guide–Sequence for guidance on using sequences to develop a good user experience in Alexa skills.
You can also use a Sequence to allow ordinal and anaphor-based selection of items on the screen. See APL Support for Item Selection.
The Sequence component has the following properties in addition to the standard component properties. The default height and width properties are each set at 100dp.
|data||Data: Properties||No||No||Data to bind into this container.|
|scrollDirection||horizontal | vertical||Yes||No||The direction to scroll this sequence. Defaults to
|firstItem||Array of component or layouts||No||No||A component to include before all others.|
|item(s)||Array of component or layouts||Yes||No||The Component(s) used to lay out the data set.|
|lastItem||Array of component or layouts||No||No||A component to include after all others.|
|numbered||boolean||No||No||If true, assign ordinal numbers to children. Defaults to
The children of a sequence are laid out in a continuous strip (either left-to-right or top-to-bottom). The dimension of the child component along the scrolling axis is
auto, meaning that it wraps the content of the child by default.
To minimize visibility errors, the height of a vertical sequence and the width of a horizontal sequence are initialized to 100dp if they are not specified.
Any item template inside a vertical Sequence that has a height value must use absolute dimensions and cannot have height set as a percentage value. Any item inside a horizontal Sequence that has a width value must use absolute dimensions and cannot have width set as a percentage value.
An array of arbitrary data. If the data array is bound, the sequence uses the data array inflation method.
The scrollDirection is either
horizontal. Default is
true, set the data-binding ordinal for each of the items in the sequence. The ordinals start with "1" and
increment by one unless the numbering property in a child is set to "skip" or "reset". Note that the
lastItem do not participate in ordinal numbering. Default is
The children of a sequence lay out in a continuous strip (either left-to-right or top-to-bottom). The dimension of the child along the scrolling axis is auto; that is, it wraps the content of the child by default.
The children of a Sequence support the following additional properties.
|numbering||normal, skip, or reset||No||No||No||Control ordinal numbering of the next child. Defaults to
|spacing||Absolute dimension||No||No||No||Additional space to add between this component and the previous component in the layout.|
Controls the ordinal value when the parent has set numbered. This property controls how the ordinal value will be updated for the next child in the sequence, not the current child in the sequence.
- normal: The next child's ordinal = ordinal + 1.
- skip: The next child's ordinal = ordinal
- reset: The next child's ordinal = 1
An amount of spacing to add between this component and the previous component in the sequence. The first item in the sequence ignores spacing. The value must be expressed in absolute dimensions.