- Forums
- ionic
- Ionic - Side Menu Close Button Example Code
Use this IONIC example code to close the side menu from an IONIC angular app. [4834], Last Updated: Mon Jun 24, 2024
webune
Wed Jul 01, 2020
0 Comments
1386 Visits
UPDATE: IONIC 6+ React
Imports
import { listOutline } from 'ionicons/icons';
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonIcon, IonMenuToggle, IonButton, IonButtons } from '@ionic/react';
IonMenuToggle
<IonMenuToggle>
<IonButton color="success" >
<IonIcon icon={listOutline} /> Open Side Menu
</IonButton>
</IonMenuToggle>
Here is a simple video I found in 2021. Ionic Framework Horizontal & SideMenu Navigation in ReactJS Application
S7whj93SGsA
ion-menu-toggle
To close the side menu button in an ionic project, simple use the ion-menu-toggle tag and a button. For example, this is how the code will look like for example:
<ion-menu-togle>
<ion-button color="danger">Close</ion-button>
</ion-menu-toggle>
Hope that works for you.