3

I am willing to reproduce tabs scrollable with a finger on mobile like Google page:

enter image description here

But with mat-tab (Material Design & Angular), I have two arrows displaying:

enter image description here

I managed to remove the arrows with disablePagination = true, however scrolling with finger is not working:

enter image description here

Anyone has a solution to make it work?

Code:

<mat-tab-group>
  <mat-tab label="First"> Content 1 </mat-tab>
  <mat-tab label="Second"> Content 2 </mat-tab>
  <mat-tab label="Third"> Content 3 </mat-tab>
  <mat-tab label="Fourth"> Content 4 </mat-tab>
  <mat-tab label="Fifth"> Content 5 </mat-tab>
  <mat-tab label="Sixth"> Content 6 </mat-tab>
  <mat-tab label="Seventh"> Content 7 </mat-tab>
  <mat-tab label="Eight"> Content 8 </mat-tab>
  <mat-tab label="Nineth"> Content 9 </mat-tab>
  <mat-tab label="Tenth"> Content 10 </mat-tab>
  <mat-tab label="Eleventh"> Content 11 </mat-tab>
  <mat-tab label="Twelves"> Content 12 </mat-tab>
  <mat-tab label="Thirteenth"> Content 13 </mat-tab>
  <mat-tab label="Forteenth"> Content 14 </mat-tab>
</mat-tab-group>
LoWay
  • 61
  • 1
  • 5

1 Answers1

1

I hope someone can use this:

::ng-deep.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination {
    display: none !important;
}
Maciej Wojcik
  • 2,115
  • 2
  • 28
  • 47