alfresco-ng2-components/docs/accordion.component.md
2017-09-27 15:21:06 -04:00

2.4 KiB

Accordion Component

Creates a collapsible accordion menu.

Accordion menu screenshot

Basic Usage

<adf-accordion>
    <adf-accordion-group [heading]="titleHeading" [isSelected]="true" [headingIcon]="'assignment'">
        <my-list></my-list>
    </adf-accordion-group>
</adf-accordion>
@Component({
    selector: 'my-component'
})
export class MyComponent implements OnInit {

    titleHeading: string;

    constructor() {
        this.titleHeading = 'My Group';
    }

}

Properties

Name Type Description
heading string The header title.
isSelected boolean Define if the accordion group is selected or not.
headingIcon string The material design icon.
hasAccordionIcon boolean Define if the accordion (expand) icon needs to be shown or not, the default value is true

Details

An accordion menu contains several panels of content, only one of which is visible at any time. The hidden panels are collapsed down to just the title and pushed together (like the bellows of an accordion) while the visible panel fills the remaining space in the menu.

Use one or more Accordion Group subcomponents to define the panels and set their properties (title, selection status, etc).

Example

You can use an accordion menu to wrap a process filter, as shown in the following example:

<adf-accordion>
    <adf-accordion-group 
        [heading]="'Processes'" 
        [isSelected]="true" 
        [headingIcon]="'assessment'">
        <adf-process-instance-filters
            [appId]="appId"
            (filterClick)="onProcessFilterClick($event)"
            (onSuccess)="onSuccessProcessFilterList($event)">
        </adf-process-instance-filters>
    </adf-accordion-group>
</adf-accordion>

how-create-accordion-menu

See also