@@ -19,32 +19,32 @@ the header, usually through keyboard navigation.
19
19
20
20
If a tab's label is only text then the simple tab-group API can be used.
21
21
22
- <!-- example({"example":"tab-group-basic",
23
- "file":"tab-group-basic.html"}) -->
22
+ <!-- example({"example": "tab-group-basic",
23
+ "file": "tab-group-basic.html"}) -->
24
24
25
25
For more complex labels, add a template with the ` mat-tab-label ` directive inside the ` mat-tab ` .
26
26
27
- <!-- example({"example":"tab-group-custom-label",
28
- "file":"tab-group-custom-label-example.html",
29
- "region":"label-directive"}) -->
27
+ <!-- example({"example": "tab-group-custom-label",
28
+ "file": "tab-group-custom-label-example.html",
29
+ "region": "label-directive"}) -->
30
30
31
31
### Dynamic Height
32
32
33
33
By default, the tab group will not change its height to the height of the currently active tab. To
34
34
change this, set the ` dynamicHeight ` input to true. The tab body will animate its height according
35
35
to the height of the active tab.
36
36
37
- <!-- example({"example":"tab-group-dynamic-height",
38
- "file":"tab-group-dynamic-height-example.html",
39
- "region":"dynamic-height"}) -->
37
+ <!-- example({"example": "tab-group-dynamic-height",
38
+ "file": "tab-group-dynamic-height-example.html",
39
+ "region": "dynamic-height"}) -->
40
40
41
41
### Tabs and navigation
42
42
While ` <mat-tab-group> ` is used to switch between views within a single route, ` <nav mat-tab-nav-bar> `
43
43
provides a tab-like UI for navigating between routes.
44
44
45
- <!-- example({"example":"tab-nav-bar-basic",
46
- "file":"tab-nav-bar-basic-example.html",
47
- "region":"mat-tab-nav"}) -->
45
+ <!-- example({"example": "tab-nav-bar-basic",
46
+ "file": "tab-nav-bar-basic-example.html",
47
+ "region": "mat-tab-nav"}) -->
48
48
49
49
The ` tab-nav-bar ` is not tied to any particular router; it works with normal ` <a> ` elements and uses
50
50
the ` active ` property to determine which tab is currently active. The corresponding
@@ -63,26 +63,26 @@ to lazy load the tab's content.
63
63
Tab contents can be lazy loaded by declaring the body in a ` ng-template `
64
64
with the ` matTabContent ` attribute.
65
65
66
- <!-- example({"example":"tab-group-lazy-loaded",
67
- "file":"tab-group-lazy-loaded-example.html",
68
- "region":"mat-tab-content"}) -->
66
+ <!-- example({"example": "tab-group-lazy-loaded",
67
+ "file": "tab-group-lazy-loaded-example.html",
68
+ "region": "mat-tab-content"}) -->
69
69
70
70
### Label alignment
71
71
If you want to align the tab labels in the center or towards the end of the container, you can
72
72
do so using the ` [mat-align-tabs] ` attribute.
73
73
74
- <!-- example({"example":"tab-group-align",
75
- "file":"tab-group-align-example.html",
76
- "region":"align-start"}) -->
74
+ <!-- example({"example": "tab-group-align",
75
+ "file": "tab-group-align-example.html",
76
+ "region": "align-start"}) -->
77
77
78
78
### Controlling the tab animation
79
79
You can control the duration of the tabs' animation using the ` animationDuration ` input. If you
80
80
want to disable the animation completely, you can do so by setting the properties to ` 0ms ` . The
81
81
duration can be configured globally using the ` MAT_TABS_CONFIG ` injection token.
82
82
83
- <!-- example({"example":"tab-group-animations",
84
- "file":"tab-group-animations-example.html",
85
- "region":"slow-animation-duration"}) -->
83
+ <!-- example({"example": "tab-group-animations",
84
+ "file": "tab-group-animations-example.html",
85
+ "region": "slow-animation-duration"}) -->
86
86
87
87
### Accessibility
88
88
` <mat-tab-group> ` and ` <mat-nav-tab-bar> ` use different interaction patterns. The
0 commit comments