How to put Tabs at the top of the app

Asked

Viewed 202 times

1

I need my tabs to be at the top of the app, but it’s usually at the bottom, someone could help me?

html:

<ion-tabs #myTabs preloadTabs="false">
  <ion-tab [root]="tab1Root" tabTitle="Calculadora" tabIcon="ios-calculator"></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="Total" tabIcon="ios-cart"></ion-tab>
  <ion-tab [root]="tab3Root" tabTitle="Cadastro" tabIcon="ios-contacts"></ion-tab>
</ion-tabs>

1 answer

1


Hey, how you doing? If it’s Io, try this code

<ion-tabs #myTabs tabsPlacement="top">
  <ion-tab [root]="tab1Root" tabTitle="Calculadora" tabIcon="ios-calculator"></ion-tab>
  <ion-tab [root]="tab2Root" tabTitle="Total" tabIcon="ios-cart"></ion-tab>
  <ion-tab [root]="tab3Root" tabTitle="Cadastro" tabIcon="ios-contacts"></ion-tab>
</ion-tabs>
  • Cool Pettrin, would have some reference link on the positioning of Tabs?

  • Hello, Leandrade, yes I do! https://ionicframework.com/docs/api/components/tabs/Tabs/

  • Valeu man, thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.