diff --git a/docs/api/tabs.md b/docs/api/tabs.md index da6a3fb7e99..e743a541b80 100644 --- a/docs/api/tabs.md +++ b/docs/api/tabs.md @@ -48,6 +48,13 @@ Ionic has guides on best practices for routing patterns with tabs. Check out the ::: +## Programmatically Selecting Tabs + +Tabs can be selected programmatically using the `select` method. This is useful when tab changes need to be triggered from application logic, such as in response to a button click or after completing a form. The following example demonstrates using a button to call the `select` method to navigate to a different tab. + +import SelectMethod from '@site/static/usage/v8/tabs/select-method/index.md'; + + ## Interfaces diff --git a/static/usage/v8/tabs/basic/angular/example_component_html.md b/static/usage/v8/tabs/basic/angular/example_component_html.md index 9fa546d2bd3..703dde43d65 100644 --- a/static/usage/v8/tabs/basic/angular/example_component_html.md +++ b/static/usage/v8/tabs/basic/angular/example_component_html.md @@ -1,7 +1,7 @@ ```html -
+
Listen now @@ -13,7 +13,7 @@
-
+
Radio @@ -25,7 +25,7 @@
-
+
Library @@ -37,7 +37,7 @@
-
+
Search diff --git a/static/usage/v8/tabs/basic/demo.html b/static/usage/v8/tabs/basic/demo.html index 5a303b66cbb..cab067dd7b0 100644 --- a/static/usage/v8/tabs/basic/demo.html +++ b/static/usage/v8/tabs/basic/demo.html @@ -22,7 +22,7 @@ -
+
Listen now @@ -34,7 +34,7 @@
-
+
Radio @@ -46,7 +46,7 @@
-
+
Library @@ -58,7 +58,7 @@
-
+
Search diff --git a/static/usage/v8/tabs/basic/javascript/index_html.md b/static/usage/v8/tabs/basic/javascript/index_html.md index fa93db84956..9e6ef96fe26 100644 --- a/static/usage/v8/tabs/basic/javascript/index_html.md +++ b/static/usage/v8/tabs/basic/javascript/index_html.md @@ -1,7 +1,7 @@ ```html -
+
Listen now @@ -13,7 +13,7 @@
-
+
Radio @@ -25,7 +25,7 @@
-
+
Library @@ -37,7 +37,7 @@
-
+
Search diff --git a/static/usage/v8/tabs/basic/react/main_tsx.md b/static/usage/v8/tabs/basic/react/main_tsx.md index 84e01103947..f97e29769bd 100644 --- a/static/usage/v8/tabs/basic/react/main_tsx.md +++ b/static/usage/v8/tabs/basic/react/main_tsx.md @@ -1,15 +1,16 @@ ```tsx import React from 'react'; import { - IonTabs, + IonContent, + IonIcon, + IonHeader, IonTab, - IonToolbar, + IonTabs, IonTabBar, IonTabButton, - IonHeader, IonTitle, - IonContent, - IonIcon, + IonToolbar, + IonPage, } from '@ionic/react'; import { playCircle, radio, library, search } from 'ionicons/icons'; @@ -20,7 +21,7 @@ function Example() { return ( -
+ Listen now @@ -29,10 +30,10 @@ function Example() {
Listen now content
-
+
-
+ Radio @@ -41,10 +42,10 @@ function Example() {
Radio content
-
+
-
+ Library @@ -53,10 +54,10 @@ function Example() {
Library content
-
+
-
+ Search @@ -65,7 +66,7 @@ function Example() {
Search content
-
+
diff --git a/static/usage/v8/tabs/basic/vue.md b/static/usage/v8/tabs/basic/vue.md index 582d594dde9..95ab749c31a 100644 --- a/static/usage/v8/tabs/basic/vue.md +++ b/static/usage/v8/tabs/basic/vue.md @@ -1,18 +1,8 @@ ```html -