Tab Bar

Navegación inferior de estilo móvil: enlaces o botones con iconos y la etiqueta de la pestaña activa, como una píldora flotante o una barra a todo el ancho que respeta el indicador de inicio.

Disponible en
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: disponible

Uso

Active tab: home

Importación

ts
import {
  SoneTabBarComponent,
} from "@surface-one/angular/tab-bar";

Referencia de la API

SoneTabBarComponentComponente

`<sone-tab-bar>` — mobile-style bottom navigation for the web (the twin of the React Native `SoneTabBar`): a `nav` of `items`, each a link (`href`, `aria-current="page"` while active) or a button (`aria-current="true"`), with an icon and the active tab's label (`labels="always"` shows every label; a hidden one still names the tab). The active tab is `[(value)]`. `floating` (the default) is a centred pill that sticks to the bottom of the scrolling page; without it a full-width bar with a top hairline. Both clear the home indicator (`env(safe-area-inset-bottom)`).

Selector
sone-tab-bar
Inputs
NombreTipo Predeterminado
itemsobligatorioreadonly TabBarItem[]—
valuebidireccional

The active tab's value — `[(value)]`.

string | nullnull
ariaLabel

Names the navigation landmark.

—$localize`:A bottom tab bar's navigation:Tab bar`
labels

`active` shows the active tab's label only; `always` every label.

TabBarLabels"active"
floating

A centred pill (the default); `false` is a full-width bar.

booleantrue