JKnorr91/ion-slide-box-tabs
关于
为 ion-slide-box 添加标签页的扩展指令,采用 Android Material Design 规范中的设计。
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文ion-slide-box-tabs
This Directive adds Tabs for the Ionic Slidebox with moving indicator at the bottom.
Preview & Demo

Installation
- Add the slidingTabsDirective.js to your Ionic Project and include it in your index.html.
Example: If you put the slidingTabsDirective.js to your js folder, you should paste the following line into your index.html anywhere after the ionic inclusion.
<script src="js/slidingTabsDirective.js"></script>
- Add the SCSS or the CSS code from slidingTabs.scss or slidingTabs.css to your project Styles.
Usage
In order to use the Tabs with an existing SlideBox, add the ion-slide-tabs Attribute to the ion-slide-box Element. To name the Tabs you should add the Attribute ion-slide-tab-label="yourLabel" to the slides of the Slidebox. You can paste in any HTML for the labels.
Example:
<ion-content scroll="false">
<ion-slide-box show-pager="false" ion-slide-tabs>
<ion-slide ion-slide-tab-label="test"><h1>Tab 1</h1></ion-slide>
<ion-slide ion-slide-tab-label="secondTest"><h1>Tab 2</h1></ion-slide>
<ion-slide ion-slide-tab-label="<b>boldTest</b>"><h1>Tab 3</h1></ion-slide>
</ion-slide-box>
</ion-content>
API
Currently there ist only one attribute to change the behaviour of the tabs:
| Attribute | Type | Default | Description |
|---|---|---|---|
| slide-tabs-scrollable | boolean | true | Wheter the tabs should be scrollable (true) or fill up the viewport width (false). In case of false, every tab will have the same size. |
Styling
I gave my best to give the tabs the look & feel of the Android Tabs, described in Google's Material Design specification. If you want to give the tabs your own look, feel free to edit the styles in slidingTabs.scss or slidingTabs.css.
Donate
If you like my work and want to say thanks, you can buy me a beer or a cup of coffe.
探索相关项目
加载中…