- Forums
- ionic
- Ionic React Hide Side Menu By Default In Larger Or Smaller Screen Sizes
Example code to make an ionic react side menu start initialize closed by default in larger screen in browser for example. [5217], Last Updated: Mon Jun 24, 2024
reacter
Sat Sep 30, 2023
0 Comments
277 Visits
To hide the side menu in a React Ionic Application, use the following code example in your App.tsx file:
App.tsx
<IonSplitPane contentId="main" when="false">
<Menu />
<IonRouterOutlet id="main">
<Route path="/" exact={true}>
<Redirect to="/" />
</Route>