Gathering detailed insights and metrics for @material/mwc-tab-bar
Gathering detailed insights and metrics for @material/mwc-tab-bar
Gathering detailed insights and metrics for @material/mwc-tab-bar
Gathering detailed insights and metrics for @material/mwc-tab-bar
npm install @material/mwc-tab-bar
Typescript
Module System
Node Version
NPM Version
TypeScript (55.5%)
SCSS (42.02%)
JavaScript (1.33%)
CSS (0.72%)
HTML (0.44%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
10,161 Stars
4,998 Commits
976 Forks
204 Watchers
22 Branches
131 Contributors
Updated on Jul 16, 2025
Latest Version
0.27.0
Package Id
@material/mwc-tab-bar@0.27.0
Unpacked Size
43.78 kB
Size
11.81 kB
File Count
15
NPM Version
lerna/3.22.1/node@v18.6.0+arm64 (darwin)
Node Version
18.6.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
<mwc-tab-bar>
IMPORTANT: The Material Web Components are a work in progress and subject to major changes until 1.0 release.
Tabs organize content across different screens, data sets, and other interactions.
Material Design Guidelines: tabs
1npm install @material/mwc-tab-bar
NOTE: The Material Web Components are distributed as ES2017 JavaScript Modules, and use the Custom Elements API. They are compatible with all modern browsers including Chrome, Firefox, Safari, Edge, and IE11, but an additional tooling step is required to resolve bare module specifiers, as well as transpilation and polyfills for IE11. See here for detailed instructions.
1<mwc-tab-bar> 2 <mwc-tab label="Tab one"></mwc-tab> 3 <mwc-tab label="Tab two"></mwc-tab> 4 <mwc-tab label="Tab three"></mwc-tab> 5</mwc-tab-bar> 6 7<script type="module"> 8 import '@material/mwc-tab-bar/mwc-tab-bar.js'; 9 import '@material/mwc-tab/mwc-tab.js'; 10</script>
1<mwc-tab-bar activeIndex="1"> 2 <mwc-tab label="Tab one"></mwc-tab> 3 <mwc-tab label="Tab two"></mwc-tab> 4 <mwc-tab label="Tab three"></mwc-tab> 5</mwc-tab-bar>
1<mwc-tab-bar> 2 <mwc-tab label="Tab one" icon="accessibility"></mwc-tab> 3 <mwc-tab label="Tab two" icon="exit_to_app"></mwc-tab> 4 <mwc-tab label="Tab three" icon="camera"></mwc-tab> 5</mwc-tab-bar>
1<mwc-tab-bar> 2 <mwc-tab label="Tab one" hasImageIcon> 3 <!-- margin bottom is (24px - height) / 2 --> 4 <svg 5 slot="icon" 6 width="10px" 7 height="10px" 8 style="margin-bottom:7px;"> 9 <circle 10 r="5px" 11 cx="5px" 12 cy="5px" 13 color="red"> 14 </circle> 15 </svg> 16 </mwc-tab> 17 <mwc-tab label="Tab two" hasImageIcon> 18 <svg 19 slot="icon" 20 width="10px" 21 height="10px" 22 style="margin-bottom:7px;"> 23 <rect 24 width="10px" 25 height="10px" 26 color="green"> 27 </rect> 28 </svg> 29 </mwc-tab> 30 <mwc-tab label="Tab three" hasImageIcon> 31 <svg 32 slot="icon" 33 width="14.143px" 34 height="14.143px" 35 style="margin-bottom:4.928px;"> 36 <rect 37 width="10px" 38 height="10px" 39 color="blue" 40 y="2.071px" 41 x="2.071px" 42 style="transform:rotate(45deg);transform-origin:center;"> 43 </rect> 44 </svg> 45 </mwc-tab> 46</mwc-tab-bar>
1<mwc-tab-bar> 2 <mwc-tab label="tab one" icon="accessibility" stacked></mwc-tab> 3 <mwc-tab label="tab two" icon="exit_to_app" stacked></mwc-tab> 4 <mwc-tab label="tab three" icon="camera" stacked></mwc-tab> 5</mwc-tab-bar>
1<mwc-tab-bar> 2 <mwc-tab 3 label="tab one" 4 icon="accessibility" 5 stacked 6 isMinWidthIndicator> 7 </mwc-tab> 8 <mwc-tab 9 label="tab two" 10 icon="exit_to_app" 11 stacked 12 isMinWidthIndicator> 13 </mwc-tab> 14 <mwc-tab 15 label="tab three" 16 icon="camera" 17 stacked 18 isMinWidthIndicator> 19 </mwc-tab> 20</mwc-tab-bar>
1<mwc-tab-bar> 2 <mwc-tab 3 icon="camera" 4 indicatorIcon="donut_large"> 5 </mwc-tab> 6 <mwc-tab 7 icon="accessibility" 8 indicatorIcon="donut_large"> 9 </mwc-tab> 10 <mwc-tab 11 icon="exit_to_app" 12 indicatorIcon="donut_large"> 13 </mwc-tab> 14</mwc-tab-bar>
When the contents of mwc-tab-bar
exceed its width, the overflow tabs are made
scrollable along the x axis.
1<style> 2 mwc-tab-bar { 3 border: solid black 1px; 4 } 5</style> 6<mwc-tab-bar> 7 <mwc-tab label="Tab one"></mwc-tab> 8 <mwc-tab label="Tab two"></mwc-tab> 9 <mwc-tab label="Tab three"></mwc-tab> 10 <mwc-tab label="Tab four"></mwc-tab> 11 <mwc-tab label="Tab five"></mwc-tab> 12 <mwc-tab label="Tab six"></mwc-tab> 13 <mwc-tab label="Tab seven"></mwc-tab> 14 <mwc-tab label="Tab eight"></mwc-tab> 15 <mwc-tab label="Tab nine"></mwc-tab> 16 <mwc-tab label="Tab ten"></mwc-tab> 17 <mwc-tab label="Tab eleven"></mwc-tab> 18 <mwc-tab label="Tab twelve"></mwc-tab> 19</mwc-tab-bar>
Note: example is in the state of hovering over the first tab.
1<style> 2 mwc-tab-bar { 3 --mdc-theme-primary: red; 4 --mdc-text-transform: none; 5 --mdc-tab-color-default: green; 6 --mdc-tab-text-label-color-default: green; 7 --mdc-tab-stacked-height: 100px; 8 } 9</style> 10<mwc-tab-bar> 11 <mwc-tab 12 label="tab one" 13 icon="accessibility" 14 stacked 15 isMinWidthIndicator> 16 </mwc-tab> 17 <mwc-tab 18 label="tab two" 19 icon="exit_to_app" 20 stacked 21 isMinWidthIndicator> 22 </mwc-tab> 23 <mwc-tab 24 label="tab three" 25 icon="camera" 26 stacked 27 isMinWidthIndicator> 28 </mwc-tab> 29</mwc-tab-bar>
Name | Description |
---|---|
default | mwc-tab elements to display. |
Name | Type | Default | Description |
---|---|---|---|
activeIndex | number | 0 | Index of tab that is active. |
Name | Description |
---|---|
scrollIndexIntoView(index:number) => void | For long, scrollable tab-bar s, scrolls the tab at the given index into view. |
Event Name | Target | Detail | Description |
---|---|---|---|
MDCTabBar:activated | mwc-tab-bar | {index: number} | Emitted when a tab selection has been made. |
Inherits CSS Custom properties from:
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
25 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 11/18 approved changesets -- score normalized to 6
Reason
SAST tool is not run on all commits -- score normalized to 6
Details
Reason
6 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More