Class: Substitution

"montage/ui/substitution.reel"~ Substitution

A structural component that reveals one of its template arguments at a time.

Constructor

new Substitution()

The substitution is a structural component and it should be used when there are different types of content (e.g.: different panels) at the same time but only one of them is shown at a time. A possible use case for the substitution is the implementation of a Tab component content pane. The different types of content of a substitution are configured by declaring them in the template as the DOM content of the substitution. Each type of content is given to the substitution as a template argument. Template arguments are declared by assigning the attribute `data-arg` to an element that is the immediate child of the substitution. ##### Example - Declaring the substitution content ```html
``` `info`, `contacts` and `review` are the types of content declared and available as substitution content. The type of content displayed by the substitution is defined by the switchValue property. The available values of this property in this example are: `info`, `contacts` and `review`. ##### Example - Other substitution template configurations ```html
Name: John Doe
E-mail: ... Mobile: ...
...
```
Source:

Extends

  • Slot