Drawers
Different types of navigation drawers can be created with the mdcDrawer
directive.
API
Directive: MdcDrawerTitleDirective
Selector: [mdcDrawerTitle]
Directive for the title of a drawer. The use of this directive is optional.
If used, it should be placed as first element inside an mdcDrawerHeader
Directive: MdcDrawerSubtitleDirective
Selector: [mdcDrawerSubtitle]
Directive for the subtitle of a drawer. The use of this directive is optional.
If used, it should be placed as a sibling element of mdcDrawerTitle
inside an mdcDrawerHeader
Directive: MdcDrawerHeaderDirective
Selector: [mdcDrawerHeader]
A toolbar header is an optional first child of an mdcDrawer
.
The header will not scroll with the rest of the drawer content, so is a
good place to place titles and account switchers.
Directives that are typically used inside an mdcDrawerHeader
:
mdcDrawerTitle
, and mdcDrawerSubTitle
Directive: MdcDrawerContentDirective
Selector: [mdcDrawerContent]
Directive for the drawer content. You would typically also apply the mdcList
or mdcListGroup
directive to the drawer content (see the examples).
Directive: MdcDrawerScrimDirective
Selector: [mdcDrawerScrim]
Directive: MdcDrawerDirective
Selector: [mdcDrawer]
Directive for a (navigation) drawer. The following drawer types are supported:
permanent
: the default type if none was specified.dismissible
: the drawer is hidden by default, and can slide into view. Typically used when navigation is not common, and the main app content is prioritized.modal
: the drawer is hidden by default. When activated, the drawer is elevated above the UI of the app. It uses a scrim to block interaction with the rest of the app with a scrim.
Drawers may contain an mdcDrawerHeader
, and should contain an mdcDrawerContent
directive.
Property | Description |
---|---|
@Output()
openChange
EventEmitter<boolean>
|
Event emitted when the drawer is opened or closed. The event value will be
|
@Output()
afterOpened
EventEmitter<void>
|
Event emitted after the drawer has fully opened. When this event is emitted the full opening animation has completed, and the drawer is visible. |
@Output()
afterClosed
EventEmitter<void>
|
Event emitted after the drawer has fully closed. When this event is emitted the full closing animation has completed, and the drawer is not visible anymore. |
@Input()
mdcDrawer
'permanent' | 'dismissible' | 'modal'
|
Set the type of drawer. Either |
@Input()
open
boolean
|
Input to open (assign value |
Directive: MdcDrawerAppContent
Selector: [mdcDrawerAppContent]
Use this directive for marking the sibling element after a dismissible mdcDrawer
.
This will apply styling so that the open/close animations work correctly.
Property | Description |
---|---|
@Input()
mdcDrawerAppContent
boolean
|
Set this to false to disable the styling for sibbling app content of a dismissible drawer.
This is typically only used when your |