Socket
Socket
Sign inDemoInstall

@angular-material-gesture/mat-tab-group-gesture

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @angular-material-gesture/mat-tab-group-gesture

An angular directive to add gesture behaviors to @angular/material mat-tab-group component


Version published
Weekly downloads
167
increased by13.61%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Angular Material TabGroup Gesture

This library provide a simple directive to enable gesture behaviors for the MatTabGroup component on top of @angular/material library.

####Gesture features :

  • Scroll tab header with your finger IF there are too much tabs to show it all on your screen
  • Swipe between tabs by swiping the tab content from left to right (or right to left)

Demo

Live demo on Stackblitz

Getting started

Install the library from npm

npm i --save @angular-material-gesture/mat-tab-group-gesture

Next, import the MatTabGroupGestureModule in your app's module

app.module.ts

import { MatTabGroupGestureModule } from 'mat-tab-group-gesture';
...
@NgModule({
  ...
  imports: [
    ...
    MatTabGroupGestureModule,
  ],
  ...
})
export class AppModule { }

After that, you will be able to add gesture directive to mat-tab-group :

<mat-tab-group matTabGroupGesture [swipeLimitWidth]="80" [connectEdges]="true">
    ...
</mat-tab-group>

API Documentation

MatTabGroupGesture

Directive responsible for managing gesture behaviors

Selector: matTabGroupGesture

Properties
NameDefault valueDescription
swipeLimitWidth80The minimum length of the "swipe" gesture to trigger the tabs navigation
connectEdgestrueIf true, the first tab and the last tab are connected (swiping for next tab on last tab will swipe to the first tab & vice-versa)

Keywords

FAQs

Last updated on 13 Feb 2023

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