You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MdSidenav is the side navigation component for Material 2. It is composed of two components; `<md-sidenav-layout>` and `<md-sidenav>`.
4
+
5
+
## `<md-sidenav-layout>`
6
+
7
+
The parent component. Contains the code necessary to coordinate one or two sidenav and the backdrop.
8
+
9
+
### Properties
10
+
11
+
| Name | Description |
12
+
| --- | --- |
13
+
|`start`| The start aligned `MdSidenav` instance, or `null` if none is specified. In LTR direction, this is the sidenav shown on the left side. In RTL direction, it will show on the right. |
14
+
|`end`| The end aligned `MdSidenav` instance, or `null` if none is specified. This is the sidenav opposing the `start` sidenav. |
15
+
16
+
## `<md-sidenav>`
17
+
18
+
The sidenav panel.
19
+
20
+
### Inputs
21
+
22
+
| Name | Type | Description |
23
+
| --- | --- | --- |
24
+
|`align`| `"start"|"end"` | The alignment of this sidenav. In LTR direction, `"start"` will be shown on the left, `"end"` on the right. In RTL, it is reversed. `"start"` is used by default. |
25
+
|`mode`| `"over"|"push"|"side"` | The mode or styling of the sidenav, default being `"over"`. With `"over"` the sidenav will appear above the content, and a backdrop will be shown. With `"push"` the sidenav will push the content of the `<md-sidenav-layout>` to the side, and show a backdrop over it. `"side"` will resize the content and keep the sidenav opened. Clicking the backdrop will close sidenavs that do not have `mode="side"`. |
26
+
|`opened`|`boolean`| Whether or not the sidenav is opened. Use this binding to open/close the sidenav. |
27
+
28
+
### Outputs
29
+
30
+
| Name | Description |
31
+
| --- | --- |
32
+
|`open-start`| Emitted when the sidenav is starting opening. This should only be used to coordinate animations. |
33
+
|`close-start`| Emitted when the sidenav is starting closing. This should only be used to coordinate animations. |
34
+
|`open`| Emitted when the sidenav is done opening. Use this for, e.g., setting focus on controls or updating state. |
35
+
|`close`| Emitted when the sidenav is done closing. |
36
+
37
+
### Methods
38
+
39
+
| Signature | Description |
40
+
| --- | --- |
41
+
|`open(): Promise<void>`| Open the sidenav. Equivalent to `opened = true`. Returns a promise that will resolve when the animation completes, or be rejected if the animation was cancelled. |
42
+
|`close(): Promise<void>`| Close the sidenav. Equivalent to `opened = false`. Returns a promise that will resolve when the animation completes, or be rejected if the animation was cancelled. |
43
+
|`toggle(): Promise<void>`| Toggle the sidenav. This is equivalent to `opened = !opened`. Returns a promise that will resolve when the animation completes, or be rejected if the animation was cancelled. |
0 commit comments