Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-material-timeline

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-material-timeline

Angular library for timeline feature. This library includes various customisations for timeline feature in angular.

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
24
increased by20%
Maintainers
1
Weekly downloads
 
Created
Source

About

Angular library for timeline feature. This library includes various customisations for timeline feature in angular.

Timeline consist of timecards and each timecard can be customized.

This library works only with Angular Material.

Demo

Working Demo

Hands On Demo

Installation

npm install ngx-material-timeline

Usage

Import the NgxMaterialTimelineModule in your app.module.ts file of your angular application.


import { NgxMaterialTimelineModule } from 'ngx-material-timeline';


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    ...
    NgxMaterialTimelineModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Now you can use the selector in html file as required.

<!DOCTYPE html>
<html>
    <head>
        <mate charest="utf-8" />
        <title>Hello world!</title>
    </head>
    <body>
        <ngx-material-timeline
          [timeline]='timelineArray'
          [addTimecard]='true'
          [addTimecardPosition]='"bottom"'
          [enableFilter]='true'
          (actionEvent)='captureEvent($event)'
          [cardTitleFontSize]='"16px"'
          [cardTimestampFontSize]='"14px"'
          [cardDescriptionFontSize]='"14px"'>
        </ngx-material-timeline>
    </body>
</html>

In style.scss import the material theme.

@import "~@angular/material/prebuilt-themes/indigo-pink.css";

Setting up Global options for ngx-material-timeline selector.

Inputs[]
OptionTypeDefaultDescription
timelinearray[]Array of timecards to be displayed in timeline.
addTimecardbooleanfalseDisplay the add timeline button at the bottom of the timeline.
addTimecardPositionstringbottomDisplay the add timeline button at the bottom of the timeline.
expandAllbooleanfalseExpand descriptions of all the timecards.
enableFilterbooleantrueEnable the filter option to filter timecards in timeline.
defaultThemestring#004c88Default theme color for timeline. Accepts hex value or any color format.
cardTitleFontSizestring14pxChange the font-size of card title.
cardTimestampFontSizestring14pxChange the font-size of card timestamp.
cardDescriptionFontSizestring14pxChange the font-size of card description.
Output()
OptionDescription
actionEventEvent Emmiter for various event from timecards and timeline.

Following will help you understand the event types.

EventEventTypeDescription
actionEventfloatingIconClickEvent emmiter for click on floating icon in timecard.
actionEventtimecardIconClickEvent emmiter for click on timecard icon in timeline.
actionEventtimecardClosedEvent emmiter for close of particular timecard descripion.
actionEventtimecardOpenedEvent emmiter for open of particular timecard descripion.
actionEventaddtimecardClickEvent emmiter for add timecard button.
Timecard Model
{
    index = 0,  // timecard index
    title = '', // timecard title
    description = '', // timecard description
    timestamp = '', // timecard timestamp
    align = '', // time alignment
    timecardIcon = '', // timecard icon
    timecardIconColor = '', // timecard icon color
    timecardFloatingIcon = '', // timecard floating icon
    timecardFloatingIconColor = '', // timecard floating icon color
    timecardColor = '', // timecard color
    timecardTitleColor = '', // timecard title color
    timecardTextColor = '', // timecard description and timestamp color
}
OptionTypeDefaultDescription
indexnumberauto-incrementTimecard index (Auto-increment if not provided.)
titlestring''Timecard title.
descriptionstring''Timecard description.
timestampstring''Timecard timestamp.
alignstring''Align timecards. Accepts: left, right
timecardIconstring''Icon for timecard. Accepts Google Mat Icons.
timecardIconColorstringdefaultThemeColorColor for timecard icon. Accepts hex value or any color format.
timecardFloatingIconstring''Floating icon for timecard. Accepts Google Mat Icons.
timecardFloatingIconColorstringdefaultThemeColorColor for floating icon. Accepts hex value or any color format.
timecardColorstringdefaultThemeColorColor for timecard. Accepts hex value or any color format.
timecardTitleColorstringwhiteColor for timecard title. Accepts hex value or any color format.
timecardTextColorstringblackColor for timecard description and timestamp. Accepts hex value or any color format.

License

MIT

Help and Support

GitHub

Keywords

FAQs

Package last updated on 11 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc