- Autoprefixer is a tool that adds
- vendor-specific-prefixes to hand-written Sass/CSS code. This ensures that standardized CSS rules
+
+ Autoprefixer
+ {' '}
+ is a tool that adds vendor-specific-prefixes to hand-written Sass/CSS code. This ensures that standardized CSS rules
you write will be applied across all supporting browsers. For example, instead of having to know every flexbox
syntax used by various browsers, autoprefixer allows you to just write display: flex; and it'll
automatically plug in the correct CSS.
@@ -68,10 +82,13 @@ title: Glossary
Capacitor
- Capacitor is an open source cross-platform app runtime
- that allows web-based apps to run natively on iOS, Android, Electron, and the web. It's helpful to refer to these
- apps "Native Progressive Web Apps" and they represent the next evolution beyond the traditional Hybrid app mentality.
- Capacitor was created and is actively developed/supported by Ionic, the company.
+
+ Capacitor
+ {' '}
+ is an open source cross-platform app runtime that allows web-based apps to run natively on iOS, Android, Electron,
+ and the web. It's helpful to refer to these apps "Native Progressive Web Apps" and they represent the next evolution
+ beyond the traditional Hybrid app mentality. Capacitor was created and is actively developed/supported by Ionic, the
+ company.
@@ -85,9 +102,12 @@ title: Glossary
A CLI, or Command-Line Interface, is a text-based interface for
interacting with a program. The common command-line app for a Mac user is the Terminal app, and Windows users often
use Command Prompt. The Ionic community often uses this term to refer to
- Ionic's CLI. Ionic's CLI can be used for a number of things, such
- as creating production builds of an app, running the development server, and accessing
- Ionic commercial services.
+ Ionic's CLI. Ionic's CLI can be used for a number of things, such as
+ creating production builds of an app, running the development server, and accessing
+
+ Ionic commercial services
+
+ .
@@ -98,8 +118,11 @@ title: Glossary
CommonJS
- CommonJS is a group that defines
- standard formats for JavaScript APIs. They have defined standards for JavaScript modules and packages.
+
+ CommonJS
+ {' '}
+ is a group that defines standard formats for JavaScript APIs. They have defined standards for JavaScript modules and
+ packages.
@@ -108,10 +131,12 @@ title: Glossary
Cordova
- Apache Cordova is an open source mobile application
- development framework that transforms standard HTML/CSS/JS into full-fledged native apps. It provides a JavaScript
- API for accessing native device functionality, such as the camera or accelerometer. Cordova contains the necessary
- build tools for packaging webapps for iOS, Android, and Windows Phone.
+
+ Apache Cordova
+ {' '}
+ is an open source mobile application development framework that transforms standard HTML/CSS/JS into full-fledged
+ native apps. It provides a JavaScript API for accessing native device functionality, such as the camera or
+ accelerometer. Cordova contains the necessary build tools for packaging webapps for iOS, Android, and Windows Phone.
@@ -120,7 +145,9 @@ title: Glossary
CORS
- CORS
+
+ CORS
+
(Cross-Origin Resource Sharing) is a mechanism for servers to control client access to web assets. See the
CORS FAQs for more information.
@@ -132,7 +159,9 @@ title: Glossary
You may be familiar with variables from Sass.
- CSS Variables
+
+ CSS Variables
+
enable the same functionality but are built into the browser. CSS Variables are available in all evergreen browsers.
@@ -211,8 +240,11 @@ title: Glossary
Git
- Git is a distributed version control system for managing code.
- It allows development teams to contribute code to the same project without causing code conflicts.
+
+ Git
+ {' '}
+ is a distributed version control system for managing code. It allows development teams to contribute code to the
+ same project without causing code conflicts.
@@ -221,8 +253,11 @@ title: Glossary
Gulp
- Gulp is a tool for running tasks which can be used to build your app.
- Common build tasks include transpiling ES6 to ES5, turning
+
+ Gulp
+ {' '}
+ is a tool for running tasks which can be used to build your app. Common build tasks include transpiling{' '}
+ ES6 to ES5, turning
Sass into CSS, minifying code, and concatenating files.
@@ -232,10 +267,12 @@ title: Glossary
ES Modules
- ES Modules
- brings the concept of modules natively to JavaScript. With modules, classes and variables are no longer in the
- global scope and have to be explicitly imported into your project to be used. This makes it much easier to
- understand where your code is coming from and increases modularity and compartmentalization of functionality.
+
+ ES Modules
+
+ brings the concept of modules natively to JavaScript. With modules, classes and variables are no longer in the global
+ scope and have to be explicitly imported into your project to be used. This makes it much easier to understand where
+ your code is coming from and increases modularity and compartmentalization of functionality.
@@ -244,9 +281,12 @@ title: Glossary
Ionicons
- Ionicons is an open-source icon set used and created
- by Ionic. It includes 1:1 iOS and Material Design icons, as well as commonly used social/application icons.
- Ionicons is included by default in Ionic distributions, but they can also be used in any project.
+
+ Ionicons
+ {' '}
+ is an open-source icon set used and created by Ionic. It includes 1:1 iOS and Material Design icons, as well as
+ commonly used social/application icons. Ionicons is included by default in Ionic distributions, but they can also be
+ used in any project.
@@ -255,9 +295,11 @@ title: Glossary
Karma
- Karma is a test runner that
- will run an app's test inside a real browser. It executes test cases, written in any testing framework, in
- a real browser. Karma was originally written for use with Angular 1.
+
+ Karma
+ {' '}
+ is a test runner that will run an app's test inside a real browser. It executes test cases, written in any testing
+ framework, in a real browser. Karma was originally written for use with Angular 1.
@@ -287,8 +329,8 @@ title: Glossary
Live Reload (or live-reload) is a tool that automatically reloads the browser or
- Web View when it detects changes in your app. In some cases, it can replace
- parts of your app without having to reload the entire window. See the
+ Web View when it detects changes in your app. In some cases, it can replace parts
+ of your app without having to reload the entire window. See the
Live Reload docs for more information.
@@ -298,9 +340,11 @@ title: Glossary
Node
- Node is a runtime environment that allows JavaScript to be
- written on the server-side. In addition to being used for web services, node is often used to build developer
- tools, such as the Ionic CLI.
+
+ Node
+ {' '}
+ is a runtime environment that allows JavaScript to be written on the server-side. In addition to being used for web
+ services, node is often used to build developer tools, such as the Ionic CLI.
@@ -309,9 +353,11 @@ title: Glossary
npm
- npm is the package manager for node.
- It allows developers to install, share, and package node modules. Ionic can be installed with npm, along with
- a number of its dependencies.
+
+ npm
+ {' '}
+ is the package manager for node. It allows developers to install, share, and package node
+ modules. Ionic can be installed with npm, along with a number of its dependencies.
@@ -332,8 +378,10 @@ title: Glossary
Referred to by Apple as Bundle ID and by Android as Application ID, the
- Package ID is used for identifying apps published to the App Store/Play Store. It is a string
- formatted in reverse-DNS notation.
+ Package ID is used for identifying apps published to the App Store/Play Store. It is a string formatted
+ in
+ reverse-DNS notation
+ .
@@ -342,9 +390,12 @@ title: Glossary
Polyfill
- A polyfill is a bit of code that
- adds functionality to the browser and normalizes browser differences. This is similar to a shim,
- but where a shim has it's own API, a polyfill let's the expect API of the browser be used.
+ A{' '}
+
+ polyfill
+ {' '}
+ is a bit of code that adds functionality to the browser and normalizes browser differences. This is similar to a{' '}
+ shim, but where a shim has it's own API, a polyfill let's the expect API of the browser be used.
@@ -353,9 +404,11 @@ title: Glossary
Protractor
- Protractor is a testing framework written for
- and by the Angular team. Protractor can be used with test runners, like Karma, for end-to-end testing. Test runners
- allow you to quickly and programmatically verify code quality.
+
+ Protractor
+ {' '}
+ is a testing framework written for and by the Angular team. Protractor can be used with test runners, like Karma,
+ for end-to-end testing. Test runners allow you to quickly and programmatically verify code quality.
- Shadow DOM
- is a native browser solution for DOM and style encapsulation of a component. It shields the component from its
- surrounding environment. To externally style internal elements of a Shadow DOM component you must use
- CSS Custom Properties
- or CSS Shadow Parts.
+
+ Shadow DOM
+
+ is a native browser solution for DOM and style encapsulation of a component. It shields the component from its surrounding
+ environment. To externally style internal elements of a Shadow DOM component you must use
+
+ CSS Custom Properties
+
+ or
+ CSS Shadow Parts
+ .
@@ -414,8 +486,9 @@ title: Glossary
Transpilation is the process of converting code from one language to another language prior to execution. Typically,
a transpiler will convert a high-level language to another high-level language. The most common type of
- transpilation in Ionic Framework is converting ES2015/ES6
- (TypeScript) to ES5 (traditional JavaScript).
+ transpilation in Ionic Framework is converting ES2015/ES6(
+ TypeScript
+ ) to ES5 (traditional JavaScript).
@@ -424,11 +497,18 @@ title: Glossary
TypeScript
- TypeScript is a superset of JavaScript,
- which means it gives you JavaScript, along with a number of extra features such as
- type declarations
- and interfaces.
- Although Ionic is built with TypeScript, using it to build an Ionic app is completely optional.
+
+ TypeScript
+ {' '}
+ is a superset of JavaScript, which means it gives you JavaScript, along with a number of extra features such as
+
+ type declarations
+
+ and{' '}
+
+ interfaces
+
+ . Although Ionic is built with TypeScript, using it to build an Ionic app is completely optional.
@@ -447,9 +527,12 @@ title: Glossary
Webpack
- Webpack bundles together JavaScript modules and other assets.
- It can be used to create single or multiple "chunks" that are only loaded when needed. Webpack can be used to take
- many files and dependencies and bundle them into one file, or other types.
+
+ Webpack
+ {' '}
+ bundles together JavaScript modules and other assets. It can be used to create single or multiple "chunks" that are
+ only loaded when needed. Webpack can be used to take many files and dependencies and bundle them into one file, or
+ other types.
@@ -458,10 +541,14 @@ title: Glossary
Web Standards
- The World Wide Web Consortium (W3C) is the standards organization
- for the Web. Together, industry leaders and the public work together to develop
- web standards, which are a set of protocols, specifications,
- and technologies that define the Web Platform.
+ The{' '}
+
+ World Wide Web Consortium
+ {' '}
+ (W3C) is the standards organization for the Web. Together, industry leaders and the public work together to develop
+
+ web standards
+ , which are a set of protocols, specifications, and technologies that define the Web Platform.
@@ -470,9 +557,11 @@ title: Glossary
Xcode
- Xcode is an Apple IDE (integrated development
- environment) for software development on Apple operating systems (macOS, iOS, watchOS and tvOS), with extensions
- available for other languages and platforms.
+
+ Xcode
+ {' '}
+ is an Apple IDE (integrated development environment) for software development on Apple operating systems (macOS,
+ iOS, watchOS and tvOS), with extensions available for other languages and platforms.
-
- Accessibility
- {' '}
- (a11y) is the practice of enabling as many people as possible to use the content, even if people have limited
- abilities. This include people with disabilities, those using mobile devices, and those with slow network
- connections. Content should be developed to be as accessible as technology allows.
+ Accessibility (a11y) is the practice of enabling as many people as possible to use the content, even if people have limited abilities. This include people with disabilities, those using mobile devices, and those with slow network connections. Content should be developed to be as accessible as technology allows.
@@ -31,12 +26,7 @@ title: Glossary
Android SDK
- The{' '}
-
- Android SDK
- {' '}
- is a software development kit built for developers building for Google's Android Platform. It includes tools for
- building, testing, and debugging Android applications.
+ The Android SDK is a software development kit built for developers building for Google's Android Platform. It includes tools for building, testing, and debugging Android applications.
@@ -45,10 +35,8 @@ title: Glossary
Android Studio
-
- Android Studio
- {' '}
- is the official Integrated Development Environment (IDE) for Native Android app development.
+ Android Studio is the official
+ Integrated Development Environment (IDE) for Native Android app development.
@@ -57,10 +45,8 @@ title: Glossary
Autoprefixer
-
- Autoprefixer
- {' '}
- is a tool that adds vendor-specific-prefixes to hand-written Sass/CSS code. This ensures that standardized CSS rules
+ Autoprefixer is a tool that adds
+ vendor-specific-prefixes to hand-written Sass/CSS code. This ensures that standardized CSS rules
you write will be applied across all supporting browsers. For example, instead of having to know every flexbox
syntax used by various browsers, autoprefixer allows you to just write display: flex; and it'll
automatically plug in the correct CSS.
@@ -82,13 +68,10 @@ title: Glossary
Capacitor
-
- Capacitor
- {' '}
- is an open source cross-platform app runtime that allows web-based apps to run natively on iOS, Android, Electron,
- and the web. It's helpful to refer to these apps "Native Progressive Web Apps" and they represent the next evolution
- beyond the traditional Hybrid app mentality. Capacitor was created and is actively developed/supported by Ionic, the
- company.
+ Capacitor is an open source cross-platform app runtime
+ that allows web-based apps to run natively on iOS, Android, Electron, and the web. It's helpful to refer to these
+ apps "Native Progressive Web Apps" and they represent the next evolution beyond the traditional Hybrid app mentality.
+ Capacitor was created and is actively developed/supported by Ionic, the company.
@@ -102,12 +85,9 @@ title: Glossary
A CLI, or Command-Line Interface, is a text-based interface for
interacting with a program. The common command-line app for a Mac user is the Terminal app, and Windows users often
use Command Prompt. The Ionic community often uses this term to refer to
- Ionic's CLI. Ionic's CLI can be used for a number of things, such as
- creating production builds of an app, running the development server, and accessing
-
- Ionic commercial services
-
- .
+ Ionic's CLI. Ionic's CLI can be used for a number of things, such
+ as creating production builds of an app, running the development server, and accessing
+ Ionic commercial services.
@@ -118,11 +98,8 @@ title: Glossary
CommonJS
-
- CommonJS
- {' '}
- is a group that defines standard formats for JavaScript APIs. They have defined standards for JavaScript modules and
- packages.
+ CommonJS is a group that defines
+ standard formats for JavaScript APIs. They have defined standards for JavaScript modules and packages.
@@ -131,12 +108,10 @@ title: Glossary
Cordova
-
- Apache Cordova
- {' '}
- is an open source mobile application development framework that transforms standard HTML/CSS/JS into full-fledged
- native apps. It provides a JavaScript API for accessing native device functionality, such as the camera or
- accelerometer. Cordova contains the necessary build tools for packaging webapps for iOS, Android, and Windows Phone.
+ Apache Cordova is an open source mobile application
+ development framework that transforms standard HTML/CSS/JS into full-fledged native apps. It provides a JavaScript
+ API for accessing native device functionality, such as the camera or accelerometer. Cordova contains the necessary
+ build tools for packaging webapps for iOS, Android, and Windows Phone.
@@ -145,9 +120,7 @@ title: Glossary
CORS
-
- CORS
-
+ CORS
(Cross-Origin Resource Sharing) is a mechanism for servers to control client access to web assets. See the
CORS FAQs for more information.
@@ -159,9 +132,7 @@ title: Glossary
You may be familiar with variables from Sass.
-
- CSS Variables
-
+ CSS Variables
enable the same functionality but are built into the browser. CSS Variables are available in all evergreen browsers.
@@ -240,11 +211,8 @@ title: Glossary
Git
-
- Git
- {' '}
- is a distributed version control system for managing code. It allows development teams to contribute code to the
- same project without causing code conflicts.
+ Git is a distributed version control system for managing code.
+ It allows development teams to contribute code to the same project without causing code conflicts.
@@ -253,11 +221,8 @@ title: Glossary
Gulp
-
- Gulp
- {' '}
- is a tool for running tasks which can be used to build your app. Common build tasks include transpiling{' '}
- ES6 to ES5, turning
+ Gulp is a tool for running tasks which can be used to build your app.
+ Common build tasks include transpiling ES6 to ES5, turning
Sass into CSS, minifying code, and concatenating files.
@@ -267,12 +232,10 @@ title: Glossary
ES Modules
-
- ES Modules
-
- brings the concept of modules natively to JavaScript. With modules, classes and variables are no longer in the global
- scope and have to be explicitly imported into your project to be used. This makes it much easier to understand where
- your code is coming from and increases modularity and compartmentalization of functionality.
+ ES Modules
+ brings the concept of modules natively to JavaScript. With modules, classes and variables are no longer in the
+ global scope and have to be explicitly imported into your project to be used. This makes it much easier to
+ understand where your code is coming from and increases modularity and compartmentalization of functionality.
@@ -281,12 +244,9 @@ title: Glossary
Ionicons
-
- Ionicons
- {' '}
- is an open-source icon set used and created by Ionic. It includes 1:1 iOS and Material Design icons, as well as
- commonly used social/application icons. Ionicons is included by default in Ionic distributions, but they can also be
- used in any project.
+ Ionicons is an open-source icon set used and created
+ by Ionic. It includes 1:1 iOS and Material Design icons, as well as commonly used social/application icons.
+ Ionicons is included by default in Ionic distributions, but they can also be used in any project.
@@ -295,11 +255,9 @@ title: Glossary
Karma
-
- Karma
- {' '}
- is a test runner that will run an app's test inside a real browser. It executes test cases, written in any testing
- framework, in a real browser. Karma was originally written for use with Angular 1.
+ Karma is a test runner that
+ will run an app's test inside a real browser. It executes test cases, written in any testing framework, in
+ a real browser. Karma was originally written for use with Angular 1.
@@ -329,8 +287,8 @@ title: Glossary
Live Reload (or live-reload) is a tool that automatically reloads the browser or
- Web View when it detects changes in your app. In some cases, it can replace parts
- of your app without having to reload the entire window. See the
+ Web View when it detects changes in your app. In some cases, it can replace
+ parts of your app without having to reload the entire window. See the
Live Reload docs for more information.
@@ -340,11 +298,9 @@ title: Glossary
Node
-
- Node
- {' '}
- is a runtime environment that allows JavaScript to be written on the server-side. In addition to being used for web
- services, node is often used to build developer tools, such as the Ionic CLI.
+ Node is a runtime environment that allows JavaScript to be
+ written on the server-side. In addition to being used for web services, node is often used to build developer
+ tools, such as the Ionic CLI.
@@ -353,11 +309,9 @@ title: Glossary
npm
-
- npm
- {' '}
- is the package manager for node. It allows developers to install, share, and package node
- modules. Ionic can be installed with npm, along with a number of its dependencies.
+ npm is the package manager for node.
+ It allows developers to install, share, and package node modules. Ionic can be installed with npm, along with
+ a number of its dependencies.
@@ -378,10 +332,8 @@ title: Glossary
Referred to by Apple as Bundle ID and by Android as Application ID, the
- Package ID is used for identifying apps published to the App Store/Play Store. It is a string formatted
- in
- reverse-DNS notation
- .
+ Package ID is used for identifying apps published to the App Store/Play Store. It is a string
+ formatted in reverse-DNS notation.
@@ -390,12 +342,9 @@ title: Glossary
Polyfill
- A{' '}
-
- polyfill
- {' '}
- is a bit of code that adds functionality to the browser and normalizes browser differences. This is similar to a{' '}
- shim, but where a shim has it's own API, a polyfill let's the expect API of the browser be used.
+ A polyfill is a bit of code that
+ adds functionality to the browser and normalizes browser differences. This is similar to a shim,
+ but where a shim has it's own API, a polyfill let's the expect API of the browser be used.
@@ -404,11 +353,9 @@ title: Glossary
Protractor
-
- Protractor
- {' '}
- is a testing framework written for and by the Angular team. Protractor can be used with test runners, like Karma,
- for end-to-end testing. Test runners allow you to quickly and programmatically verify code quality.
+ Protractor is a testing framework written for
+ and by the Angular team. Protractor can be used with test runners, like Karma, for end-to-end testing. Test runners
+ allow you to quickly and programmatically verify code quality.
-
- Shadow DOM
-
- is a native browser solution for DOM and style encapsulation of a component. It shields the component from its surrounding
- environment. To externally style internal elements of a Shadow DOM component you must use
-
- CSS Custom Properties
-
- or
- CSS Shadow Parts
- .
+ Shadow DOM
+ is a native browser solution for DOM and style encapsulation of a component. It shields the component from its
+ surrounding environment. To externally style internal elements of a Shadow DOM component you must use
+ CSS Custom Properties
+ or CSS Shadow Parts.
@@ -486,9 +414,8 @@ title: Glossary
Transpilation is the process of converting code from one language to another language prior to execution. Typically,
a transpiler will convert a high-level language to another high-level language. The most common type of
- transpilation in Ionic Framework is converting ES2015/ES6(
- TypeScript
- ) to ES5 (traditional JavaScript).
+ transpilation in Ionic Framework is converting ES2015/ES6
+ (TypeScript) to ES5 (traditional JavaScript).
@@ -497,18 +424,11 @@ title: Glossary
TypeScript
-
- TypeScript
- {' '}
- is a superset of JavaScript, which means it gives you JavaScript, along with a number of extra features such as
-
- type declarations
-
- and{' '}
-
- interfaces
-
- . Although Ionic is built with TypeScript, using it to build an Ionic app is completely optional.
+ TypeScript is a superset of JavaScript,
+ which means it gives you JavaScript, along with a number of extra features such as
+ type declarations
+ and interfaces.
+ Although Ionic is built with TypeScript, using it to build an Ionic app is completely optional.
@@ -527,12 +447,9 @@ title: Glossary
Webpack
-
- Webpack
- {' '}
- bundles together JavaScript modules and other assets. It can be used to create single or multiple "chunks" that are
- only loaded when needed. Webpack can be used to take many files and dependencies and bundle them into one file, or
- other types.
+ Webpack bundles together JavaScript modules and other assets.
+ It can be used to create single or multiple "chunks" that are only loaded when needed. Webpack can be used to take
+ many files and dependencies and bundle them into one file, or other types.
@@ -541,14 +458,10 @@ title: Glossary
Web Standards
- The{' '}
-
- World Wide Web Consortium
- {' '}
- (W3C) is the standards organization for the Web. Together, industry leaders and the public work together to develop
-
- web standards
- , which are a set of protocols, specifications, and technologies that define the Web Platform.
+ The World Wide Web Consortium (W3C) is the standards organization
+ for the Web. Together, industry leaders and the public work together to develop
+ web standards, which are a set of protocols, specifications,
+ and technologies that define the Web Platform.
@@ -557,11 +470,9 @@ title: Glossary
Xcode
-
- Xcode
- {' '}
- is an Apple IDE (integrated development environment) for software development on Apple operating systems (macOS,
- iOS, watchOS and tvOS), with extensions available for other languages and platforms.
+ Xcode is an Apple IDE (integrated development
+ environment) for software development on Apple operating systems (macOS, iOS, watchOS and tvOS), with extensions
+ available for other languages and platforms.
From 1bd69b13bd65dedae749aa1edcf6a5160e70e244 Mon Sep 17 00:00:00 2001
From: ShaneK
Date: Fri, 13 Mar 2026 11:00:05 -0700
Subject: [PATCH 05/15] docs(react-router): fixing several issues
---
docs/react/add-to-existing.md | 10 ++++--
docs/updating/9-0.md | 34 +++++++++----------
versioned_docs/version-v7/react/navigation.md | 2 +-
versioned_docs/version-v8/react/navigation.md | 2 +-
4 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/docs/react/add-to-existing.md b/docs/react/add-to-existing.md
index 0311d50d170..6ab9ac96218 100644
--- a/docs/react/add-to-existing.md
+++ b/docs/react/add-to-existing.md
@@ -64,7 +64,7 @@ setupIonicReact();
:::info
-While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/docs/layout/global-stylesheets.md).
+While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, handle scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/docs/layout/global-stylesheets.md).
:::
@@ -300,10 +300,16 @@ Then, create `src/pages/Home.css`:
#### 5. Set up Routing
+:::important
+
+Ionic React requires React Router v6. Install the following specific versions of the router packages to set up routing with Ionic React.
+
+:::
+
Install the router packages:
```bash
-npm install @ionic/react-router react-router react-router-dom
+npm install @ionic/react-router react-router@6 react-router-dom@6
```
Then, update `src/App.tsx` to add the routes for the Home page:
diff --git a/docs/updating/9-0.md b/docs/updating/9-0.md
index 60fac6a8861..64beb278479 100644
--- a/docs/updating/9-0.md
+++ b/docs/updating/9-0.md
@@ -44,23 +44,23 @@ npm install react@latest react-dom@latest
npm install @ionic/react@latest @ionic/react-router@latest
```
-3. Update to React Router v6:
+### React Router
+
+1. Ionic 9 supports React Router 6. Update to version 6 of React Router:
```shell
npm install react-router@6 react-router-dom@6
```
-If you have `@types/react-router` or `@types/react-router-dom` installed, remove them. React Router v6 includes its own TypeScript definitions:
+2. If you have `@types/react-router` or `@types/react-router-dom` installed, remove them. React Router 6 includes its own TypeScript definitions:
```shell
npm uninstall @types/react-router @types/react-router-dom
```
-#### React Router v6 Migration
-
-Ionic React now requires React Router v6, which has a different API from v5. Below are the key changes you'll need to make:
+Ionic React now requires React Router v6, which has a different API from v5. Below are the key changes you'll need to make.
-**Route Definition Changes**
+#### Route Definition Changes
The `component` and `render` props have been replaced with the `element` prop, which accepts JSX:
@@ -78,7 +78,7 @@ Routes can no longer render content via nested children. All route content must
+ } />
```
-**Redirect Changes**
+#### Redirect Changes
The `` component has been replaced with ``:
@@ -90,7 +90,7 @@ The `` component has been replaced with ``:
+
```
-**Nested Route Paths**
+#### Nested Route Paths
Routes that contain nested routes or child `IonRouterOutlet` components need a `/*` suffix to match sub-paths:
@@ -99,7 +99,7 @@ Routes that contain nested routes or child `IonRouterOutlet` components need a `
+ } />
```
-**Accessing Route Parameters**
+#### Accessing Route Parameters
Route parameters are now accessed via the `useParams` hook instead of props:
@@ -113,7 +113,7 @@ Route parameters are now accessed via the `useParams` hook instead of props:
+ const { id } = useParams<{ id: string }>();
```
-**RouteComponentProps Removed**
+#### RouteComponentProps Removed
The `RouteComponentProps` type and its `history`, `location`, and `match` props are no longer available in React Router v6. Use the equivalent hooks instead:
@@ -142,7 +142,7 @@ The `RouteComponentProps` type and its `history`, `location`, and `match` props
+ console.log(location.pathname);
```
-**Exact Prop Removed**
+#### Exact Prop Removed
The `exact` prop is no longer needed. React Router v6 routes match exactly by default. To match sub-paths, use a `/*` suffix on the path:
@@ -151,7 +151,7 @@ The `exact` prop is no longer needed. React Router v6 routes match exactly by de
+
```
-**Render Prop Removed**
+#### Render Prop Removed
The `render` prop has been replaced with the `element` prop:
@@ -160,7 +160,7 @@ The `render` prop has been replaced with the `element` prop:
+ } />
```
-**Programmatic Navigation**
+#### Programmatic Navigation
The `useHistory` hook has been replaced with `useNavigate`:
@@ -183,7 +183,7 @@ The `useHistory` hook has been replaced with `useNavigate`:
+ router.goBack();
```
-**Custom History Prop Removed**
+#### Custom History Prop Removed
The `history` prop has been removed from `IonReactRouter`, `IonReactHashRouter`, and `IonReactMemoryRouter`. React Router v6 routers no longer accept custom `history` objects.
@@ -203,7 +203,7 @@ For `IonReactMemoryRouter` (commonly used in tests), use `initialEntries` instea
+
```
-**IonRedirect Removed**
+#### IonRedirect Removed
The `IonRedirect` component has been removed. Use React Router's `` component instead:
@@ -214,7 +214,7 @@ The `IonRedirect` component has been removed. Use React Router's `` co
+ } />
```
-**Path Regex Constraints Removed**
+#### Path Regex Constraints Removed
React Router v6 no longer supports regex constraints in path parameters (e.g., `/:tab(sessions)`). Use literal paths instead:
@@ -225,7 +225,7 @@ React Router v6 no longer supports regex constraints in path parameters (e.g., `
+ } />
```
-**IonRoute API Changes**
+#### IonRoute API Changes
The `IonRoute` component follows the same API changes as React Router's ``. The `render` prop has been replaced with `element`, and the `exact` prop has been removed:
diff --git a/versioned_docs/version-v7/react/navigation.md b/versioned_docs/version-v7/react/navigation.md
index 9b7129667e9..355b30324f0 100644
--- a/versioned_docs/version-v7/react/navigation.md
+++ b/versioned_docs/version-v7/react/navigation.md
@@ -615,7 +615,7 @@ type UseIonRouterResult = {
*/
goBack(animationBuilder?: AnimationBuilder): void;
/**
- * Determines if there are any additional routes in the the Router's history. However, routing is not prevented if the browser's history has more entries. Returns true if more entries exist, false if not.
+ * Determines if there are any additional routes in the Router's history. However, routing is not prevented if the browser's history has more entries. Returns true if more entries exist, false if not.
*/
canGoBack(): boolean;
/**
diff --git a/versioned_docs/version-v8/react/navigation.md b/versioned_docs/version-v8/react/navigation.md
index 9b7129667e9..355b30324f0 100644
--- a/versioned_docs/version-v8/react/navigation.md
+++ b/versioned_docs/version-v8/react/navigation.md
@@ -615,7 +615,7 @@ type UseIonRouterResult = {
*/
goBack(animationBuilder?: AnimationBuilder): void;
/**
- * Determines if there are any additional routes in the the Router's history. However, routing is not prevented if the browser's history has more entries. Returns true if more entries exist, false if not.
+ * Determines if there are any additional routes in the Router's history. However, routing is not prevented if the browser's history has more entries. Returns true if more entries exist, false if not.
*/
canGoBack(): boolean;
/**
From d0f6f2f2e611b2913abe3d3d799a784b2dbb645d Mon Sep 17 00:00:00 2001
From: ShaneK
Date: Fri, 13 Mar 2026 12:39:46 -0700
Subject: [PATCH 06/15] docs(react-router): converting playground example to
rr6
---
static/usage/v9/tabs/router/react/main_tsx.md | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/static/usage/v9/tabs/router/react/main_tsx.md b/static/usage/v9/tabs/router/react/main_tsx.md
index b5005ef3778..075a20027e6 100644
--- a/static/usage/v9/tabs/router/react/main_tsx.md
+++ b/static/usage/v9/tabs/router/react/main_tsx.md
@@ -3,7 +3,7 @@ import React from 'react';
import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonRouterOutlet } from '@ionic/react';
import { IonReactRouter } from '@ionic/react-router';
-import { Route, Redirect } from 'react-router';
+import { Route, Navigate } from 'react-router-dom';
import { playCircle, radio, library, search } from 'ionicons/icons';
@@ -17,16 +17,11 @@ function Example() {
-
- {/*
- Use the render method to reduce the number of renders your component will have due to a route change.
-
- Use the component prop when your component depends on the RouterComponentProps passed in automatically.
- */}
- } exact={true} />
- } exact={true} />
- } exact={true} />
- } exact={true} />
+ } />
+ } />
+ } />
+ } />
+ } />
From 76552ed587542615768b7ce5ab678a9b30c90077 Mon Sep 17 00:00:00 2001
From: ShaneK
Date: Thu, 26 Mar 2026 08:43:10 -0700
Subject: [PATCH 07/15] docs(react-router): updating dependencies, reverting
phrasing change
---
docs/react/add-to-existing.md | 2 +-
static/code/stackblitz/v9/react/package.json | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/docs/react/add-to-existing.md b/docs/react/add-to-existing.md
index 6ab9ac96218..f4ecfada7a4 100644
--- a/docs/react/add-to-existing.md
+++ b/docs/react/add-to-existing.md
@@ -64,7 +64,7 @@ setupIonicReact();
:::info
-While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, handle scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/docs/layout/global-stylesheets.md).
+While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/docs/layout/global-stylesheets.md).
:::
diff --git a/static/code/stackblitz/v9/react/package.json b/static/code/stackblitz/v9/react/package.json
index 815c39d039d..8b0deae5c16 100644
--- a/static/code/stackblitz/v9/react/package.json
+++ b/static/code/stackblitz/v9/react/package.json
@@ -8,14 +8,12 @@
"@types/node": "^24.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
- "@types/react-router": "^5.1.11",
- "@types/react-router-dom": "^5.1.7",
"@vitejs/plugin-react": "^5.0.0",
"clsx": "^2.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
- "react-router": "^5.2.0",
- "react-router-dom": "^5.2.0",
+ "react-router": "^6.0.0",
+ "react-router-dom": "^6.0.0",
"typescript": "~5.9.0",
"vite": "^7.0.0",
"web-vitals": "^5.0.0"
From d2401a04ab2c7430fa22d589eef4302b5e3b4eae Mon Sep 17 00:00:00 2001
From: ShaneK
Date: Fri, 27 Mar 2026 05:46:12 -0700
Subject: [PATCH 08/15] docs(react): fix nested IonRouterOutlet examples and
replace live example
---
docs/react/navigation.md | 67 ++++++-------
static/usage/v9/react/navigation/demo.html | 95 +++++++++++++++++++
static/usage/v9/react/navigation/index.md | 23 +++++
.../navigation/react/dashboard_page_tsx.md | 40 ++++++++
.../navigation/react/item_detail_page_tsx.md | 33 +++++++
.../v9/react/navigation/react/main_tsx.md | 35 +++++++
.../navigation/react/settings_page_tsx.md | 17 ++++
7 files changed, 271 insertions(+), 39 deletions(-)
create mode 100644 static/usage/v9/react/navigation/demo.html
create mode 100644 static/usage/v9/react/navigation/index.md
create mode 100644 static/usage/v9/react/navigation/react/dashboard_page_tsx.md
create mode 100644 static/usage/v9/react/navigation/react/item_detail_page_tsx.md
create mode 100644 static/usage/v9/react/navigation/react/main_tsx.md
create mode 100644 static/usage/v9/react/navigation/react/settings_page_tsx.md
diff --git a/docs/react/navigation.md b/docs/react/navigation.md
index 1821d0d2977..e4e577f833e 100644
--- a/docs/react/navigation.md
+++ b/docs/react/navigation.md
@@ -4,6 +4,7 @@ sidebar_label: Navigation/Routing
---
import useBaseUrl from '@docusaurus/useBaseUrl';
+import NavigationPlayground from '@site/static/usage/v9/react/navigation/index.md';
React Navigation: Router Link Redirect to Navigate to Another Page
@@ -57,20 +58,18 @@ Inside the Dashboard page, we define more routes related to this specific sectio
**DashboardPage.tsx**
```tsx
-const DashboardPage: React.FC = () => {
- return (
-
-
- } />
- } />
-
-
- );
-};
+const DashboardPage: React.FC = () => (
+
+ } />
+ } />
+
+);
```
Since the parent route already matches `/dashboard/*`, the child routes use **relative paths**. The `index` route matches the parent path (`/dashboard`) and `"users/:id"` resolves to `/dashboard/users/:id`. Absolute paths (e.g., `path="/dashboard/users/:id"`) still work if you prefer explicit full paths.
+Note the `ionPage` prop on `IonRouterOutlet`. When a component serves as a nested outlet rendered directly by a `Route` in a parent outlet, the inner `IonRouterOutlet` must include the `ionPage` prop. Without it, router outlets can overlap during navigation and cause broken transitions. Wrapping the outlet in an `IonPage` is not needed and should be avoided in this case.
+
These routes are grouped in an `IonRouterOutlet`, let's discuss that next.
## IonRouterOutlet
@@ -90,17 +89,13 @@ We can define a fallback route by placing a `Route` component with a `path` of `
**DashboardPage.tsx**
```tsx
-const DashboardPage: React.FC = () => {
- return (
-
-
- } />
- } />
- } />
-
-
- );
-};
+const DashboardPage: React.FC = () => (
+
+ } />
+ } />
+ } />
+
+);
```
Here, we see that in the event a location does not match the first two `Route`s the `IonRouterOutlet` will redirect the Ionic React app to the `/dashboard` path.
@@ -108,17 +103,13 @@ Here, we see that in the event a location does not match the first two `Route`s
You can alternatively supply a component to render instead of providing a redirect.
```tsx
-const DashboardPage: React.FC = () => {
- return (
-
-
- } />
- } />
- } />
-
-
- );
-};
+const DashboardPage: React.FC = () => (
+
+ } />
+ } />
+ } />
+
+);
```
## IonPage
@@ -351,12 +342,10 @@ const App: React.FC = () => (
);
const DashboardRouterOutlet: React.FC = () => (
-
-
- } />
- } />
-
-
+
+ } />
+ } />
+
);
```
@@ -509,7 +498,7 @@ The example below shows how the Spotify app reuses the same album component to s
## Live Example
-If you would prefer to get hands on with the concepts and code described above, please checkout our [live example](https://stackblitz.com/edit/ionic-react-routing?file=src/index.tsx) of the topics above on StackBlitz.
+
### IonRouterOutlet in a Tabs View
diff --git a/static/usage/v9/react/navigation/demo.html b/static/usage/v9/react/navigation/demo.html
new file mode 100644
index 00000000000..db8eb97079b
--- /dev/null
+++ b/static/usage/v9/react/navigation/demo.html
@@ -0,0 +1,95 @@
+
+
+
+
+
+ Navigation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Dashboard
+
+
+
+
+
+ Item One
+
+
+ Item Two
+
+
+ Item Three
+
+
+
+
-
-
- Dashboard
-
-
-
-
-
- Item One
-
-
- Item Two
-
-
- Item Three
-
-
-
-
-
-
-
-
-
-
- Settings
-
-
- Settings content
-
-
-
-
-
- Dashboard
-
-
-
- Settings
-
-
-
-
-
-
-
-
diff --git a/static/usage/v9/angular/navigation/angular/app_component_html.md b/static/usage/v9/navigation/angular/app_component_html.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/app_component_html.md
rename to static/usage/v9/navigation/angular/app_component_html.md
diff --git a/static/usage/v9/angular/navigation/angular/app_component_ts.md b/static/usage/v9/navigation/angular/app_component_ts.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/app_component_ts.md
rename to static/usage/v9/navigation/angular/app_component_ts.md
diff --git a/static/usage/v9/angular/navigation/angular/app_routes_ts.md b/static/usage/v9/navigation/angular/app_routes_ts.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/app_routes_ts.md
rename to static/usage/v9/navigation/angular/app_routes_ts.md
diff --git a/static/usage/v9/angular/navigation/angular/dashboard_page_component_html.md b/static/usage/v9/navigation/angular/dashboard_page_component_html.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/dashboard_page_component_html.md
rename to static/usage/v9/navigation/angular/dashboard_page_component_html.md
diff --git a/static/usage/v9/angular/navigation/angular/dashboard_page_component_ts.md b/static/usage/v9/navigation/angular/dashboard_page_component_ts.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/dashboard_page_component_ts.md
rename to static/usage/v9/navigation/angular/dashboard_page_component_ts.md
diff --git a/static/usage/v9/angular/navigation/angular/example_component_html.md b/static/usage/v9/navigation/angular/example_component_html.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/example_component_html.md
rename to static/usage/v9/navigation/angular/example_component_html.md
diff --git a/static/usage/v9/angular/navigation/angular/example_component_ts.md b/static/usage/v9/navigation/angular/example_component_ts.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/example_component_ts.md
rename to static/usage/v9/navigation/angular/example_component_ts.md
diff --git a/static/usage/v9/angular/navigation/angular/item_detail_page_component_html.md b/static/usage/v9/navigation/angular/item_detail_page_component_html.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/item_detail_page_component_html.md
rename to static/usage/v9/navigation/angular/item_detail_page_component_html.md
diff --git a/static/usage/v9/angular/navigation/angular/item_detail_page_component_ts.md b/static/usage/v9/navigation/angular/item_detail_page_component_ts.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/item_detail_page_component_ts.md
rename to static/usage/v9/navigation/angular/item_detail_page_component_ts.md
diff --git a/static/usage/v9/angular/navigation/angular/settings_page_component_html.md b/static/usage/v9/navigation/angular/settings_page_component_html.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/settings_page_component_html.md
rename to static/usage/v9/navigation/angular/settings_page_component_html.md
diff --git a/static/usage/v9/angular/navigation/angular/settings_page_component_ts.md b/static/usage/v9/navigation/angular/settings_page_component_ts.md
similarity index 100%
rename from static/usage/v9/angular/navigation/angular/settings_page_component_ts.md
rename to static/usage/v9/navigation/angular/settings_page_component_ts.md
diff --git a/static/usage/v9/react/navigation/demo.html b/static/usage/v9/navigation/demo.html
similarity index 97%
rename from static/usage/v9/react/navigation/demo.html
rename to static/usage/v9/navigation/demo.html
index db8eb97079b..0388e0788dd 100644
--- a/static/usage/v9/react/navigation/demo.html
+++ b/static/usage/v9/navigation/demo.html
@@ -4,8 +4,8 @@
Navigation
-
-
+
+
diff --git a/static/usage/v9/angular/navigation/index.md b/static/usage/v9/navigation/index.md
similarity index 77%
rename from static/usage/v9/angular/navigation/index.md
rename to static/usage/v9/navigation/index.md
index 43a177a9861..db5a5a46c96 100644
--- a/static/usage/v9/angular/navigation/index.md
+++ b/static/usage/v9/navigation/index.md
@@ -12,9 +12,14 @@ import angular_item_detail_page_component_ts from './angular/item_detail_page_co
import angular_settings_page_component_html from './angular/settings_page_component_html.md';
import angular_settings_page_component_ts from './angular/settings_page_component_ts.md';
+import react_main_tsx from './react/main_tsx.md';
+import react_dashboard_page_tsx from './react/dashboard_page_tsx.md';
+import react_item_detail_page_tsx from './react/item_detail_page_tsx.md';
+import react_settings_page_tsx from './react/settings_page_tsx.md';
+
diff --git a/static/usage/v9/react/navigation/react/dashboard_page_tsx.md b/static/usage/v9/navigation/react/dashboard_page_tsx.md
similarity index 100%
rename from static/usage/v9/react/navigation/react/dashboard_page_tsx.md
rename to static/usage/v9/navigation/react/dashboard_page_tsx.md
diff --git a/static/usage/v9/react/navigation/react/item_detail_page_tsx.md b/static/usage/v9/navigation/react/item_detail_page_tsx.md
similarity index 100%
rename from static/usage/v9/react/navigation/react/item_detail_page_tsx.md
rename to static/usage/v9/navigation/react/item_detail_page_tsx.md
diff --git a/static/usage/v9/react/navigation/react/main_tsx.md b/static/usage/v9/navigation/react/main_tsx.md
similarity index 100%
rename from static/usage/v9/react/navigation/react/main_tsx.md
rename to static/usage/v9/navigation/react/main_tsx.md
diff --git a/static/usage/v9/react/navigation/react/settings_page_tsx.md b/static/usage/v9/navigation/react/settings_page_tsx.md
similarity index 100%
rename from static/usage/v9/react/navigation/react/settings_page_tsx.md
rename to static/usage/v9/navigation/react/settings_page_tsx.md
diff --git a/static/usage/v9/react/navigation/index.md b/static/usage/v9/react/navigation/index.md
deleted file mode 100644
index b218cc69773..00000000000
--- a/static/usage/v9/react/navigation/index.md
+++ /dev/null
@@ -1,23 +0,0 @@
-import Playground from '@site/src/components/global/Playground';
-
-import react_main_tsx from './react/main_tsx.md';
-import react_dashboard_page_tsx from './react/dashboard_page_tsx.md';
-import react_item_detail_page_tsx from './react/item_detail_page_tsx.md';
-import react_settings_page_tsx from './react/settings_page_tsx.md';
-
-
From de72886efddf26ac4e0f36f6c85329b868998953 Mon Sep 17 00:00:00 2001
From: ShaneK
Date: Tue, 31 Mar 2026 05:23:12 -0700
Subject: [PATCH 13/15] feat(playground): add default framework setting,
migration angular/react navigation live example to use one playground
---
docs/angular/navigation.md | 55 ++++++++++++++++++++--
docs/react/navigation.md | 55 ++++++++++++++++++++--
src/components/global/Playground/index.tsx | 13 +++++
static/usage/v9/navigation/index.md | 51 --------------------
4 files changed, 117 insertions(+), 57 deletions(-)
delete mode 100644 static/usage/v9/navigation/index.md
diff --git a/docs/angular/navigation.md b/docs/angular/navigation.md
index a36bb865d2c..0b580da729d 100644
--- a/docs/angular/navigation.md
+++ b/docs/angular/navigation.md
@@ -201,9 +201,58 @@ To get started with standalone components [visit Angular's official docs](https:
## Live Example
-import NavigationPlayground from '@site/static/usage/v9/navigation/index.md';
-
-
+import Playground from '@site/src/components/global/Playground';
+
+import angular_app_routes_ts from '@site/static/usage/v9/navigation/angular/app_routes_ts.md';
+import angular_app_component_html from '@site/static/usage/v9/navigation/angular/app_component_html.md';
+import angular_app_component_ts from '@site/static/usage/v9/navigation/angular/app_component_ts.md';
+import angular_example_component_html from '@site/static/usage/v9/navigation/angular/example_component_html.md';
+import angular_example_component_ts from '@site/static/usage/v9/navigation/angular/example_component_ts.md';
+import angular_dashboard_page_component_html from '@site/static/usage/v9/navigation/angular/dashboard_page_component_html.md';
+import angular_dashboard_page_component_ts from '@site/static/usage/v9/navigation/angular/dashboard_page_component_ts.md';
+import angular_item_detail_page_component_html from '@site/static/usage/v9/navigation/angular/item_detail_page_component_html.md';
+import angular_item_detail_page_component_ts from '@site/static/usage/v9/navigation/angular/item_detail_page_component_ts.md';
+import angular_settings_page_component_html from '@site/static/usage/v9/navigation/angular/settings_page_component_html.md';
+import angular_settings_page_component_ts from '@site/static/usage/v9/navigation/angular/settings_page_component_ts.md';
+
+import react_main_tsx from '@site/static/usage/v9/navigation/react/main_tsx.md';
+import react_dashboard_page_tsx from '@site/static/usage/v9/navigation/react/dashboard_page_tsx.md';
+import react_item_detail_page_tsx from '@site/static/usage/v9/navigation/react/item_detail_page_tsx.md';
+import react_settings_page_tsx from '@site/static/usage/v9/navigation/react/settings_page_tsx.md';
+
+
## Linear Routing versus Non-Linear Routing
diff --git a/docs/react/navigation.md b/docs/react/navigation.md
index 6983f7b70b7..b93be9756a7 100644
--- a/docs/react/navigation.md
+++ b/docs/react/navigation.md
@@ -497,9 +497,58 @@ The example below shows how the Spotify app reuses the same album component to s
## Live Example
-import NavigationPlayground from '@site/static/usage/v9/navigation/index.md';
-
-
+import Playground from '@site/src/components/global/Playground';
+
+import angular_app_routes_ts from '@site/static/usage/v9/navigation/angular/app_routes_ts.md';
+import angular_app_component_html from '@site/static/usage/v9/navigation/angular/app_component_html.md';
+import angular_app_component_ts from '@site/static/usage/v9/navigation/angular/app_component_ts.md';
+import angular_example_component_html from '@site/static/usage/v9/navigation/angular/example_component_html.md';
+import angular_example_component_ts from '@site/static/usage/v9/navigation/angular/example_component_ts.md';
+import angular_dashboard_page_component_html from '@site/static/usage/v9/navigation/angular/dashboard_page_component_html.md';
+import angular_dashboard_page_component_ts from '@site/static/usage/v9/navigation/angular/dashboard_page_component_ts.md';
+import angular_item_detail_page_component_html from '@site/static/usage/v9/navigation/angular/item_detail_page_component_html.md';
+import angular_item_detail_page_component_ts from '@site/static/usage/v9/navigation/angular/item_detail_page_component_ts.md';
+import angular_settings_page_component_html from '@site/static/usage/v9/navigation/angular/settings_page_component_html.md';
+import angular_settings_page_component_ts from '@site/static/usage/v9/navigation/angular/settings_page_component_ts.md';
+
+import react_main_tsx from '@site/static/usage/v9/navigation/react/main_tsx.md';
+import react_dashboard_page_tsx from '@site/static/usage/v9/navigation/react/dashboard_page_tsx.md';
+import react_item_detail_page_tsx from '@site/static/usage/v9/navigation/react/item_detail_page_tsx.md';
+import react_settings_page_tsx from '@site/static/usage/v9/navigation/react/settings_page_tsx.md';
+
+
### IonRouterOutlet in a Tabs View
diff --git a/src/components/global/Playground/index.tsx b/src/components/global/Playground/index.tsx
index 3489ae7840b..796d15941c9 100644
--- a/src/components/global/Playground/index.tsx
+++ b/src/components/global/Playground/index.tsx
@@ -134,6 +134,7 @@ export default function Playground({
showConsole,
includeIonContent = true,
version,
+ defaultFramework,
}: {
code: { [key in UsageTarget]?: MdxContent | UsageTargetOptions };
title?: string;
@@ -154,6 +155,11 @@ export default function Playground({
* This will also load assets for StackBlitz from the specified version directory.
*/
version: string;
+ /**
+ * The framework to select by default when no user preference is stored.
+ * If not specified, defaults to Angular when available, then the first available framework.
+ */
+ defaultFramework?: UsageTarget;
}) {
if (!code || Object.keys(code).length === 0) {
console.warn('No code usage examples provided for this Playground example.');
@@ -207,6 +213,13 @@ export default function Playground({
};
const getDefaultUsageTarget = () => {
+ /**
+ * If a default framework was specified and code exists for it, use that.
+ */
+ if (defaultFramework && code[defaultFramework] !== undefined) {
+ return defaultFramework;
+ }
+
/**
* If there is a saved target from previously clicking the
* framework buttons, and there is code for it, use that.
diff --git a/static/usage/v9/navigation/index.md b/static/usage/v9/navigation/index.md
deleted file mode 100644
index db5a5a46c96..00000000000
--- a/static/usage/v9/navigation/index.md
+++ /dev/null
@@ -1,51 +0,0 @@
-import Playground from '@site/src/components/global/Playground';
-
-import angular_app_routes_ts from './angular/app_routes_ts.md';
-import angular_app_component_html from './angular/app_component_html.md';
-import angular_app_component_ts from './angular/app_component_ts.md';
-import angular_example_component_html from './angular/example_component_html.md';
-import angular_example_component_ts from './angular/example_component_ts.md';
-import angular_dashboard_page_component_html from './angular/dashboard_page_component_html.md';
-import angular_dashboard_page_component_ts from './angular/dashboard_page_component_ts.md';
-import angular_item_detail_page_component_html from './angular/item_detail_page_component_html.md';
-import angular_item_detail_page_component_ts from './angular/item_detail_page_component_ts.md';
-import angular_settings_page_component_html from './angular/settings_page_component_html.md';
-import angular_settings_page_component_ts from './angular/settings_page_component_ts.md';
-
-import react_main_tsx from './react/main_tsx.md';
-import react_dashboard_page_tsx from './react/dashboard_page_tsx.md';
-import react_item_detail_page_tsx from './react/item_detail_page_tsx.md';
-import react_settings_page_tsx from './react/settings_page_tsx.md';
-
-
From 91f78119a12aa7a02015e8498aefd13fc2d1fae4 Mon Sep 17 00:00:00 2001
From: ShaneK
Date: Tue, 31 Mar 2026 06:56:01 -0700
Subject: [PATCH 14/15] fix(playground): allow playground swapping with default
framework set
---
src/components/global/Playground/index.tsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/components/global/Playground/index.tsx b/src/components/global/Playground/index.tsx
index 796d15941c9..69c1bd2b00e 100644
--- a/src/components/global/Playground/index.tsx
+++ b/src/components/global/Playground/index.tsx
@@ -444,10 +444,15 @@ export default function Playground({
/**
* Load the stored mode and/or usage target, if present
- * from previously being toggled.
+ * from previously being toggled. Skip the usage target
+ * reset when defaultFramework is set, since the initial
+ * value is already correct and user tab clicks should
+ * be preserved.
*/
setIonicMode(getDefaultMode());
- setUsageTarget(getDefaultUsageTarget());
+ if (!defaultFramework) {
+ setUsageTarget(getDefaultUsageTarget());
+ }
/**
* If the iframes weren't already loaded, load them now.
From 785d345e1452953379d537c7f7f0681d65b89d81 Mon Sep 17 00:00:00 2001
From: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
Date: Tue, 31 Mar 2026 11:40:56 -0400
Subject: [PATCH 15/15] docs(navigation): combine playground code to one index
file
---
docs/angular/navigation.md | 55 ++---------------------------
docs/react/navigation.md | 55 ++---------------------------
static/usage/v9/navigation/index.md | 55 +++++++++++++++++++++++++++++
3 files changed, 61 insertions(+), 104 deletions(-)
create mode 100644 static/usage/v9/navigation/index.md
diff --git a/docs/angular/navigation.md b/docs/angular/navigation.md
index 0b580da729d..0354c7910d9 100644
--- a/docs/angular/navigation.md
+++ b/docs/angular/navigation.md
@@ -201,58 +201,9 @@ To get started with standalone components [visit Angular's official docs](https:
## Live Example
-import Playground from '@site/src/components/global/Playground';
-
-import angular_app_routes_ts from '@site/static/usage/v9/navigation/angular/app_routes_ts.md';
-import angular_app_component_html from '@site/static/usage/v9/navigation/angular/app_component_html.md';
-import angular_app_component_ts from '@site/static/usage/v9/navigation/angular/app_component_ts.md';
-import angular_example_component_html from '@site/static/usage/v9/navigation/angular/example_component_html.md';
-import angular_example_component_ts from '@site/static/usage/v9/navigation/angular/example_component_ts.md';
-import angular_dashboard_page_component_html from '@site/static/usage/v9/navigation/angular/dashboard_page_component_html.md';
-import angular_dashboard_page_component_ts from '@site/static/usage/v9/navigation/angular/dashboard_page_component_ts.md';
-import angular_item_detail_page_component_html from '@site/static/usage/v9/navigation/angular/item_detail_page_component_html.md';
-import angular_item_detail_page_component_ts from '@site/static/usage/v9/navigation/angular/item_detail_page_component_ts.md';
-import angular_settings_page_component_html from '@site/static/usage/v9/navigation/angular/settings_page_component_html.md';
-import angular_settings_page_component_ts from '@site/static/usage/v9/navigation/angular/settings_page_component_ts.md';
-
-import react_main_tsx from '@site/static/usage/v9/navigation/react/main_tsx.md';
-import react_dashboard_page_tsx from '@site/static/usage/v9/navigation/react/dashboard_page_tsx.md';
-import react_item_detail_page_tsx from '@site/static/usage/v9/navigation/react/item_detail_page_tsx.md';
-import react_settings_page_tsx from '@site/static/usage/v9/navigation/react/settings_page_tsx.md';
-
-
+import NavigationPlayground from '@site/static/usage/v9/navigation/index.md';
+
+
## Linear Routing versus Non-Linear Routing
diff --git a/docs/react/navigation.md b/docs/react/navigation.md
index 79607a2670e..0941f148f5e 100644
--- a/docs/react/navigation.md
+++ b/docs/react/navigation.md
@@ -499,58 +499,9 @@ The example below shows how the Spotify app reuses the same album component to s
## Live Example
-import Playground from '@site/src/components/global/Playground';
-
-import angular_app_routes_ts from '@site/static/usage/v9/navigation/angular/app_routes_ts.md';
-import angular_app_component_html from '@site/static/usage/v9/navigation/angular/app_component_html.md';
-import angular_app_component_ts from '@site/static/usage/v9/navigation/angular/app_component_ts.md';
-import angular_example_component_html from '@site/static/usage/v9/navigation/angular/example_component_html.md';
-import angular_example_component_ts from '@site/static/usage/v9/navigation/angular/example_component_ts.md';
-import angular_dashboard_page_component_html from '@site/static/usage/v9/navigation/angular/dashboard_page_component_html.md';
-import angular_dashboard_page_component_ts from '@site/static/usage/v9/navigation/angular/dashboard_page_component_ts.md';
-import angular_item_detail_page_component_html from '@site/static/usage/v9/navigation/angular/item_detail_page_component_html.md';
-import angular_item_detail_page_component_ts from '@site/static/usage/v9/navigation/angular/item_detail_page_component_ts.md';
-import angular_settings_page_component_html from '@site/static/usage/v9/navigation/angular/settings_page_component_html.md';
-import angular_settings_page_component_ts from '@site/static/usage/v9/navigation/angular/settings_page_component_ts.md';
-
-import react_main_tsx from '@site/static/usage/v9/navigation/react/main_tsx.md';
-import react_dashboard_page_tsx from '@site/static/usage/v9/navigation/react/dashboard_page_tsx.md';
-import react_item_detail_page_tsx from '@site/static/usage/v9/navigation/react/item_detail_page_tsx.md';
-import react_settings_page_tsx from '@site/static/usage/v9/navigation/react/settings_page_tsx.md';
-
-
+import NavigationPlayground from '@site/static/usage/v9/navigation/index.md';
+
+
### IonRouterOutlet in a Tabs View
diff --git a/static/usage/v9/navigation/index.md b/static/usage/v9/navigation/index.md
new file mode 100644
index 00000000000..1495e9daf1a
--- /dev/null
+++ b/static/usage/v9/navigation/index.md
@@ -0,0 +1,55 @@
+import Playground from '@site/src/components/global/Playground';
+
+import angular_app_routes_ts from './angular/app_routes_ts.md';
+import angular_app_component_html from './angular/app_component_html.md';
+import angular_app_component_ts from './angular/app_component_ts.md';
+import angular_example_component_html from './angular/example_component_html.md';
+import angular_example_component_ts from './angular/example_component_ts.md';
+import angular_dashboard_page_component_html from './angular/dashboard_page_component_html.md';
+import angular_dashboard_page_component_ts from './angular/dashboard_page_component_ts.md';
+import angular_item_detail_page_component_html from './angular/item_detail_page_component_html.md';
+import angular_item_detail_page_component_ts from './angular/item_detail_page_component_ts.md';
+import angular_settings_page_component_html from './angular/settings_page_component_html.md';
+import angular_settings_page_component_ts from './angular/settings_page_component_ts.md';
+
+import react_main_tsx from './react/main_tsx.md';
+import react_dashboard_page_tsx from './react/dashboard_page_tsx.md';
+import react_item_detail_page_tsx from './react/item_detail_page_tsx.md';
+import react_settings_page_tsx from './react/settings_page_tsx.md';
+
+export default function NavigationPlayground({ defaultFramework = 'angular' }) {
+ return (
+
+ );
+}