Angular Collapsible Component Styled with Materialize CSS

angular-material-collapse

angular2-collapsible is a materialized CSS Collapsible component that helps you create content switchers and accordion controls.

materialize collapsible not working, css collapse animation, angular material collapse, collapsible ui

How to make use of it:

Installation:

npm install materialize-css --save

1. Open src / styles.css and add the following line to enable Materialize CSS styles:

@import '~materialize-css/dist/css/materialize.min.css';

2. Then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; // <-- import required BrowserAnimationsModule
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { CollapsibleModule } from 'angular2-collapsible'; // <-- import the module

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,  // <-- include required BrowserAnimationsModule
    CollapsibleModule // <-- include angular2-collapsible module
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Options

OptionTypeDefault valueDescription
type{ ‘accordion’ | ‘expandable’ }‘accordion’The type of the collapsible list: ‘accordion’ or ‘expandable’

Collapsible list options

Collapsible table options

OptionTypeDefault valueDescription
borderedbooleanfalseMakes the table bordered
borderedHorizontallybooleanfalseMakes the table bordered horizontally only
borderedVerticallybooleanfalseMakes the table bordered vertically only
stripedbooleanfalseMakes the table striped
stripedOddColorstring‘rgba(242,242,242,0.8)’Color of an odd striped row
stripedOddTextColorstring‘black’Text color of an odd striped row
stripedEvenColorstring‘transparent’Color of an even striped row
stripedEvenTextColorstring‘black’Text color of an even striped row
highlightbooleanfalseHighlight table rows on mouse hover
highlightColorstring‘rgba(222,222,222, 0.8)’Color of a highlighted row
highlightTextColorstring‘black’Text color of a highlighted row
activeColorstring‘rgba(212,212,212, 0.8)’Color of an active row
activeTextColorstring‘black’Text color of an active row
centeredbooleanfalseCenter align all the text in the table
[ ] TODO: responsivebooleanfalseMakes the table horizontally scrollable on smaller screen widths
selectbooleanfalseAllows to select rows
selectMultipleRowsbooleanfalseAllows multiple rows
selectColorstring‘rgba(212,212,212, 0.8)’Allows multiple rows
selectTextColorstring‘black’Text color of a selected row
allowDeselectingRowsbooleanfalseAllows deselecting selected rows
allowKeyboardNavigationbooleantrueAllows navigation between table rows using arrow keys
noTextSelectbooleanfalseDisables user select within the table

angular 4 materialize css collapsible library plugin/github


See Demo And Download

Official Website(DmitriiSer): Click Here

This superior jQuery/javascript plugin is developed by DmitriiSer. For extra advanced usage, please go to the official website.