import {MatExpansionModule} from '@angular/material/expansion';
MatAccordion
extends
CdkAccordion
Directive for a Material Design Accordion.
Selector: mat-accordion
Exported as: matAccordionName | Description |
---|---|
@Input()
|
Display mode used for all expansion panels in the accordion. Currently two display modes exist: default - a gutter-like spacing is placed around any expanded panel, placing the expanded panel at a different elevation from the rest of the accordion. flat - no spacing is placed around expanded panels, showing all panels at the same elevation. |
@Input()
|
Whether the expansion indicator should be hidden. |
@Input()
|
Whether the accordion should allow multiple expanded accordion items simultaneously. |
|
A readonly id value to use for unique selection coordination. |
closeAll | |
---|---|
Closes all enabled accordion items in an accordion where multi is enabled. |
openAll | |
---|---|
Opens all enabled accordion items in an accordion where multi is enabled. |
MatExpansionPanel
extends
CdkAccordionItem
<mat-expansion-panel>
This component can be used as a single element to show expandable content, or as one of multiple children of an element with the MatAccordion directive attached.
Selector: mat-expansion-panel
Exported as: matExpansionPanelName | Description |
---|---|
@Input()
|
Whether the AccordionItem is disabled. |
@Input()
|
Whether the AccordionItem is expanded. |
@Input()
|
Whether the toggle indicator should be hidden. |
@Output()
|
An event emitted after the body's collapse animation happens. |
@Output()
|
An event emitted after the body's expansion animation happens. |
@Output()
|
Event emitted every time the AccordionItem is closed. |
@Output()
|
Event emitted when the AccordionItem is destroyed. |
@Output()
|
Event emitted every time the AccordionItem is opened. |
|
Optionally defined accordion the expansion panel belongs to. |
|
The unique AccordionItem id. |
close | |
---|---|
Sets the expanded state of the accordion item to false. |
open | |
---|---|
Sets the expanded state of the accordion item to true. |
toggle | |
---|---|
Toggles the expanded state of the accordion item. |
MatExpansionPanelActionRow
Selector: mat-action-row
MatExpansionPanelHeader
<mat-expansion-panel-header>
This component corresponds to the header element of an <mat-expansion-panel>
.
Selector: mat-expansion-panel-header
Name | Description |
---|---|
@Input()
|
Height of the header while the panel is collapsed. |
@Input()
|
Height of the header while the panel is expanded. |
|
MatExpansionPanelDescription
<mat-panel-description>
This directive is to be used inside of the MatExpansionPanelHeader component.
Selector: mat-panel-description
MatExpansionPanelTitle
<mat-panel-title>
This directive is to be used inside of the MatExpansionPanelHeader component.
Selector: mat-panel-title
MatExpansionPanelContent
Expansion panel content that will be rendered lazily after the panel is opened for the first time.
Selector: ng-template[matExpansionPanelContent]
MatExpansionPanelDefaultOptions
Object that can be used to override the default options for all of the expansion panels in a module.
Name | Description |
---|---|
|
Height of the header while the panel is collapsed. |
|
Height of the header while the panel is expanded. |
|
Whether the toggle indicator should be hidden. |
MatAccordionDisplayMode
MatAccordion's display modes.
type MatAccordionDisplayMode = 'default' | 'flat';
MatExpansionPanelState
MatExpansionPanel's states.
type MatExpansionPanelState = 'expanded' | 'collapsed';
MAT_ACCORDION
Token used to provide a MatAccordion
to MatExpansionPanel
.
Used primarily to avoid circular imports between MatAccordion
and MatExpansionPanel
.
const MAT_ACCORDION: InjectionToken<MatAccordionBase>;
MAT_EXPANSION_PANEL_DEFAULT_OPTIONS
Injection token that can be used to configure the defalt options for the expansion panel component.
const MAT_EXPANSION_PANEL_DEFAULT_OPTIONS: InjectionToken<MatExpansionPanelDefaultOptions>;
EXPANSION_PANEL_ANIMATION_TIMING
Time and timing curve for expansion panel animations.
const EXPANSION_PANEL_ANIMATION_TIMING: "225ms cubic-bezier(0.4,0.0,0.2,1)";