You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
Optional. Sets the elements inside the scroll content element to be aligned to the start of the scroll content element.
mdc-tab-scroller--align-end
Optional. Sets the elements inside the scroll content element to be aligned to the end of the scroll content element.
mdc-tab-scroller--align-center
Optional. Sets the elements inside the scroll content element to be aligned to the center of the scroll content element.
NOTE: The align modifier classes are only applicable when the contents do not meet or exceed the width of the Tab Scroller and Tab Bar (i.e., most commonly, when mdc-tab--min-width is used on each tab).
Sass Mixins
Mixin
Description
transition($duration-ms, $timing-function)
Sets the scroll animation duration and, optionally, the timing function.
MDCTabScroller Methods
Method Signature
Description
scrollTo(scrollX: number) => void
Scrolls to the scrollX value.
incrementScroll(scrollX: number) => void
Increments the current scroll value by the scrollX value using animation.
incrementScrollImmediate(scrollX: number) => void
Increments the current scroll value by the scrollX value without animation.
getScrollPosition() => number
Returns the current visual scroll position.
getScrollContentWidth() => number
Returns the width of the scroll content element.
Usage within Web Frameworks
If you are using a JavaScript framework, such as React or Angular, you can create a Tab Scroller for your framework. Depending on your needs, you can use the Simple Approach: Wrapping MDC Web Vanilla Components, or the Advanced Approach: Using Foundations and Adapters. Please follow the instructions here.