Socket
Socket
Sign inDemoInstall

ngx-mat-timeline

Package Overview
Dependencies
63
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ngx-mat-timeline

Timeline component for Angular Material


Version published
Weekly downloads
450
decreased by-10%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

NgxMatTimeline

Timeline component for Angular Material

w3soto

StackBlitz Demo

Screenshot

Features

  • Vertical and Horizontal orientation
  • Left, Center and Right position
  • Reversed direction
  • Support for Google Material Icons (including SVG) and images
  • Custom icon and label directives

Installation

npm -i ngx-mat-timeline

Example

Fro more details see projects/demo application

import { NgxMatTimelineModule } from "ngx-mat-timeline";
...

@NgModule({
  imports: [
    ...,
    NgxMatTimelineModule,
  ],
  ...
})
class AppModule { ... }

Basic template

<ngx-mat-timeline 
  position="center" 
  orientation="horizontal">

  <ngx-mat-timeline-item
    *ngFor="let item of timelineItems"
    [icon]="item.icon"
    [label]="item.label">

    {{ item.content }}
    
  </ngx-mat-timeline-item>

</ngx-mat-timeline>

Custom template

<ngx-mat-timeline 
  position="center" 
  orientation="horizontal">

  <ngx-mat-timeline-item
    *ngFor="let item of timelineItems; let idx = index;">

    <ng-template ngxMatTimelineItemIcon>
      <div class="custom-icon">{{ idx + 1 }}</div>
    </ng-template>

    <ng-template ngxMatTimelineItemLabel>
      <div class="custom-label">{{ item.label }}</div>
    </ng-template>

    <div class="custom-content">
      <img [src]="'./assets/image' + (idx + 1) + '.jpg'"> 
      {{ item.content }}
    </div>
    
  </ngx-mat-timeline-item>

</ngx-mat-timeline>

Components

  • ngx-mat-timeline
@InputTypeAvailable valuesDefault
orientationstringvertical, horizontalvertical
positionstringstart, center, center-alt, endstart
reversebooleanfalse
  • ngx-mat-timeline-item
@InputTypeAvailable valuesDefault
iconstringStandard MatIcon value
svgIconstringStandard MatIcon value (svgIcon)
iconUrlstringImage url
labelstringText

Note: If multiple icons are defined, only first one is displayed (icon or svgIcon or iconUrl).

Directives

Use with ng-template.

  • ngxMatTimelineItemIcon

  • ngxMatTimelineItemLabel

Keywords

FAQs

Last updated on 03 Apr 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc