-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tabs): add the ability to customize the animation duration (#13505)
Adds the `animationDuration` input and the `MAT_TABS_CONFIG` injection token that can be used to configure the duration of the tab animation. Fixes #13428.
- Loading branch information
Showing
9 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/material-examples/tab-group-animations/tab-group-animations-example.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.mat-tab-group { | ||
margin-bottom: 48px; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/material-examples/tab-group-animations/tab-group-animations-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<h3>No animation</h3> | ||
|
||
<mat-tab-group animationDuration="0ms"> | ||
<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-group> | ||
|
||
<h3>Very slow animation</h3> | ||
<mat-tab-group animationDuration="2000ms"> | ||
<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-group> |
11 changes: 11 additions & 0 deletions
11
src/material-examples/tab-group-animations/tab-group-animations-example.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
/** | ||
* @title Tab group animations | ||
*/ | ||
@Component({ | ||
selector: 'tab-group-animations-example', | ||
templateUrl: 'tab-group-animations-example.html', | ||
styleUrls: ['tab-group-animations-example.css'], | ||
}) | ||
export class TabGroupAnimationsExample {} |