@@ -9,10 +9,11 @@ represents the added side content.
9
9
10
10
<!-- example(sidenav-overview) -->
11
11
12
- There are also drawer components, ` <mat-drawer-container> ` , ` <mat-drawer-content> ` , and
13
- ` <mat-drawer> ` , which are analogous to their sidenav equivalents. Rather than adding side content
14
- to the app as a whole, these are designed to add side content to a small section of your app. They
15
- support almost all of the same features, but do not support fixed positioning.
12
+ The drawer component is designed to add side content to a small section of your app. This is
13
+ accomplished using the ` <mat-drawer-container> ` , ` <mat-drawer-content> ` , and ` <mat-drawer> `
14
+ components, which are analogous to their sidenav equivalents. Rather than adding side content to the
15
+ app as a whole, these are designed to add side content to a small section of your app. They support
16
+ almost all of the same features, but do not support fixed positioning.
16
17
17
18
<!-- example(sidenav-drawer-overview) -->
18
19
@@ -25,7 +26,7 @@ of the container.
25
26
The side content should be wrapped in a ` <mat-sidenav> ` element. The ` position ` property can be used
26
27
to specify which end of the main content to place the side content on. ` position ` can be either
27
28
` start ` or ` end ` which places the side content on the left or right respectively in left-to-right
28
- languages. If the ` position ` is not set, the ` start ` end will be assumed. A
29
+ languages. If the ` position ` is not set, the default value of ` start ` will be assumed. A
29
30
` <mat-sidenav-container> ` can have up to two ` <mat-sidenav> ` elements total, but only one for any
30
31
given side.
31
32
@@ -39,13 +40,15 @@ of it.
39
40
The following are examples of valid sidenav layouts:
40
41
41
42
``` html
43
+ <!-- Creates a layout with a left-positioned sidenav and explicit content. -->
42
44
<mat-sidenav-container >
43
45
<mat-sidenav >Start</mat-sidenav >
44
46
<mat-sidenav-content >Main</mat-sidenav-content >
45
47
</mat-sidenav-container >
46
48
```
47
49
48
50
``` html
51
+ <!-- Creates a layout with a left and right sidenav and implicit content. -->
49
52
<mat-sidenav-container >
50
53
<mat-sidenav >Start</mat-sidenav >
51
54
<mat-sidenav position =" end" >End</mat-sidenav >
@@ -54,26 +57,30 @@ The following are examples of valid sidenav layouts:
54
57
```
55
58
56
59
``` html
60
+ <!-- Creates an empty sidenav container with no sidenavs and implicit empty content. -->
57
61
<mat-sidenav-container ></mat-sidenav-container >
58
62
```
59
63
60
64
And these are examples of invalid sidenav layouts:
61
65
62
66
``` html
67
+ <!-- Invalid because there are two `start` position sidenavs. -->
63
68
<mat-sidenav-container >
64
69
<mat-sidenav >Start</mat-sidenav >
65
70
<mat-sidenav position =" start" >Start 2</mat-sidenav >
66
71
</mat-sidenav-container >
67
72
```
68
73
69
74
``` html
75
+ <!-- Invalid because there are multiple `<mat-sidenav-content>` elements. -->
70
76
<mat-sidenav-container >
71
77
<mat-sidenav-content >Main</mat-sidenav-content >
72
78
<mat-sidenav-content >Main 2</mat-sidenav-content >
73
79
</mat-sidenav-container >
74
80
```
75
81
76
82
``` html
83
+ <!-- Invalid because the `<mat-sidenav>` is outside of the `<mat-sidenav-container>`. -->
77
84
<mat-sidenav-container ></mat-sidenav-container >
78
85
<mat-sidenav ></mat-sidenav >
79
86
```
0 commit comments