Usage
Assemble the accordion directives in your template.API Reference
The following directives are available to import from the@ng-primitives/ng-primitives/accordion package:
NgpAccordionDirective
Define whether only one or multiple accordion items can be open at a time.
Define an accordion can be collapsed. This is only applicable when
ngpAccordionType is set to
single.Define the expanded accordion items. This should be a single value when
ngpAccordionType is set
to single and an array when set to multiple.Define whether the accordion is disabled.
Define the orientation of the accordion.
Emitted when the expanded accordion items change. This will be a single value when
ngpAccordionType is set to single and an array when set to multiple.NgpAccordionItemDirective
Define the value of the accordion item.
Define whether the accordion item is disabled.
NgpAccordionTriggerDirective
There are no inputs or outputs for this directive.NgpAccordionContentDirective
There are no inputs or outputs for this directive.Global Configuration
You can configure the default options for all accordions in your application by using theprovideNgpAccordionConfig function in a providers array.
NgpAccordionConfig
Define whether only one or multiple accordion items can be open at a time.
Define an accordion can be collapsed. This is only applicable when
type is set to single.Define the orientation of the accordion.
Schematics
You can use our schematic to generate a new accordion component.Options
The name of the component.
The name of the project to add the component to.
The path to create the component.