Concept

A layout combines components into a new custom component that you use in the mainTemplate of your APL document. You can use conditional logic in the layout to determine which components display. Layouts support parameters, so you can pass data to the layout when sidebar: alexa-voice-serviceyou place it in the template.

You define layouts in the layouts property of an APL document or package. This property takes a string/object map. You can then invoke the layout in your document by setting the type property of a component to the name of the layout.

For example, in the Tic-Tac-Toe skill, you can define a layout that displays a marker on the screen. You can use the same layout to display both the X and the O markers by defining the layout with parameters.