mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
Updates the tab-bar to match the MD bottom navigation spec: https://material.io/design/components/bottom-navigation.html#specs Changes proposed in this pull request: - moved flex properties to host, inherit in child anchor element - this allows the user to customize the tab-button flex properties & fixes #16231 - increased letter spacing - removed transforms / transitions on active tab - decreased badge size, add badge styling when empty for MD - fix badge positioning on both iOS and MD - updates e2e tests, adds a preview test for tab-bar - updates documentation surrounding tabs fixes #16231 fixes ionic-team/ionic-docs#175 fixes ionic-team/ionic-docs#163
ion-tab
The tab component is a child component of tabs. Each tab can contain a top level navigation stack for an app or a single view. An app can have many tabs, all with their own independent navigation.
See the tabs documentation for more details on configuring tabs.
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
component |
component |
The component to display inside of the tab. | Function | HTMLElement | null | string | undefined |
undefined |
tab |
tab |
A tab id must be provided for each ion-tab. It's used internally to reference the selected tab or by the router to switch between them. |
string |
undefined |
Methods
setActive() => Promise<void>
Set the active component for the tab
Returns
Type: Promise<void>
Built with StencilJS