Skip to content

Tabs title and icons #7296

@movrack

Description

@movrack

Hello,
This issues is more a feature request.

I thinks Tabs implementation should be different.
Actually, to create a tabs we have to write:

<ion-tabs>
  <ion-tab [root]="tab1Root" tabTitle="Tab1" tabIcon="home"></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="Tab2" tabIcon="information-circle"></ion-tab>
  <ion-tab [root]="tab3Root" tabTitle="Tab3" tabIcon="contacts"></ion-tab>
</ion-tabs>

But we want to set our personal icons using font-awesome.
Actually, we have to overwrite css style for ionic icon, to replace with the font-awesome icon picture.
So I thinks it should be easier to change the content and we should be able to define text or icons or badges or other element as html in value of ion-tab and not in argument of ion-tab.
So somethink like this:

<ion-tabs>
  <ion-tab [root]="tab1Root">Text I want</ion-tab>
  <ion-tab [root]="tab1Root">
        <span class="fa fa-icon fa-2x"></span>
        <ion-badge item-right>2</ion-badge>
  </ion-tab>
  <ion-tab [root]="tab1Root">
        <ion-icon name="heart"></ion-icon>
  </ion-tab>
</ion-tabs>

It look some other poeple have the same problem actually:
https://forum.ionicframework.com/t/anyway-to-custom-the-tabbars-icon-with-my-own-svg-file/46131/4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions