Tableau UI for Angular
Arrow Scroller
An arrow scroller scrolls its content with an arrow button at each end, in place of a scrollbar.
Import
Import TableauUiArrowScrollModule from tableau-ui-angular/arrow-scroll.
Vertical
scrollType="arrow" hides the scrollbar, and shows the arrows while the content overflows; an arrow is disabled once there is nothing more to scroll its way. scrollType="default" keeps the scrollbar and shows no arrows. The arrows are buttons, named Scroll back and Scroll forward for screen readers.
| Input | What it does |
|---|---|
scrollType | Required. arrow or default |
scrollDirection | Required. vertical or horizontal |
[buttonScrollAmount] | The pixels an arrow scrolls; 100 by default |
buttonsGap | The space between an arrow and the content; 0.25rem by default |
buttonsColor | The arrows' button colour: plain, the default, primary, secondary or error |
buttonsCssColor | A CSS colour for the arrows' icons |
backIcon, forwardIcon, [iconParams] | Other icons for the arrows, and their parameters, such as fontSize |
[showScrollButtonSeparator] | A line between each arrow and the content |
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { TableauUiArrowScrollModule } from 'tableau-ui-angular/arrow-scroll';
@Component({
selector: 'app-scroller-vertical-example',
imports: [TableauUiArrowScrollModule],
templateUrl: './scroller-vertical.example.html',
styleUrl: './scroller-vertical.example.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ScrollerVerticalExampleComponent {
protected readonly lines = Array.from({ length: 30 }, (_, index) => `Line ${index + 1} of the content`);
}Horizontal
A horizontal scroller also turns the mouse wheel's scroll sideways, whichever its scrollType.
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { TableauUiArrowScrollModule } from 'tableau-ui-angular/arrow-scroll';
@Component({
selector: 'app-scroller-horizontal-example',
imports: [TableauUiArrowScrollModule],
templateUrl: './scroller-horizontal.example.html',
styleUrl: './scroller-horizontal.example.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ScrollerHorizontalExampleComponent {
protected readonly items = Array.from({ length: 30 }, (_, index) => `Item ${index + 1}`);
}