18.0.1 • Published 19 days ago

angular-overflow-indicator v18.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

angular-overflow-indicator

This library includes a simple and performant component that displays a given button if the content of the component overflows.

Features

Button that displays/hides accordingly

Overflow indicator example

Observe the scroll state

Overflow indicator example

Basic Usage

Step 1: Install the package

yarn add angular-overflow-indicator

or

npm install angular-overflow-indicator

Step 2: Install the package

import { ScrollViewWithIndicatorComponent } from 'angular-overflow-indicator';

Step 3: Create a container with a maximum/fixed size

<div [style]="{ height: '300px', width: '500px' }">
 // ...
</div>

Step 4: Add a template that includes the indicator-button

<div [style]="{ height: '300px', width: '500px' }">
  <ng-template #customButton>
    <button (click)="view.scrollToBottom()">There is more below <i>👇</i></button>
  </ng-template>
  
  // ...
</div>

Step 5: Add the overflow-indicator-component with a list larger than the outer container and pass the template reference of the indicator-button

<div [style]="{ height: '300px', width: '500px' }">
  <ng-template #customButton>
    <button (click)="view.scrollToBottom()">There is more below <i>👇</i></button>
  </ng-template>

  <ng-scroll-view-with-indicator #view [indicatorButton]="customButton">
    <ul>
      <li *ngFor="let item of items()">List item {{ item }}</li>
    </ul>
  </ng-scroll-view-with-indicator>
</div>
18.0.1

19 days ago

17.3.0

26 days ago

0.3.3

3 months ago

0.3.2

4 months ago

0.3.1

4 months ago

0.1.1

5 months ago

0.1.0

5 months ago