1.1.5 • Published 5 years ago

ngx-accordion-from-object v1.1.5

Weekly downloads
63
License
-
Repository
github
Last release
5 years ago

Accordion From Object

Makes Accordions using Array of Object. It can assure multiple or single accordion be opened based on user input

Working Example

View Demo

Installation

npm i ngx-accordion-from-object

Usage

In App module import accordion module

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgxAccordionFromObjectModule } from 'ngx-accordion-from-object'
...

imports: [...
    BrowserAnimationModule
    NgxAccordionFromObjectModule
  ]

In the component

<accordion-from-object 
[heading]="'tabs'" 
[openMultiple]="false" 
[accordionObject]="this.object" 
[tabField]="'name'" 
[tabValue]="'data'"
[showContainerAccordion]="false"
[showArrows]="true"></accordion-from-object>

Sample Object for accordionObject

object = [{
    name: 'Heading1',
    data: 'This is sample accordion'
  },
  {
    name: 'Heading2',
    data: 'This is sample accordion'
  },
  {
    name: 'Heading3',
    data: 'This is sample accordion'
  }
]

Inputs

InputTypeDescription
accordionObjectArray of objects for accordion component
tabFieldStringKey value to be taken from Object as Accordion Title
tabValueStringKey value to be taken from Object as content of Accordion
openMultipleBooleanSet true to keep multiple tabs active. Default false
showContainerAccordionBooleanShow/hide the heading. Default true
showArrowsBooleanShow/hide arrow on accordion

Dependencies

The only dependency is Bootstrap 4 CSS

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago