I'm struggling with creating a toggle button for the sidebar. I have the sidebar and the button ready, but I'm not sure how to make the toggle function work. Can someone please guide me on what steps I need to take to achieve this? Your help would be greatly appreciated!
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="61030e0e15121513001121544f514f53">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<header class="header row ">
<div class="d-flex justify-content-between">
<div id="logo" class="pb-2 ps-2 pe-0 col-2">
<img class="float-start py-2 ps-2 pe-2" src="assets/img/unknown.png">
<a href="#" class="sidebar-toggler flex-shrink-0" id="menu-toggle">
<i class="fa-solid fa-angle-left py-4 pe-2"></i>
</a>
</div>
</div>
</header>
<div class="body row ">
<div class="sidebar col-2 " id="sidebar">
<!--sidebar start-->
<div class="navbar-nav w-100">
<div class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown"><i class="fa fa-laptop me-2"></i>Admin</a>
<div class="dropdown-menu bg-transparent border-0">
<a href="#" class="dropdown-item">A</a>
<a href="#" class="dropdown-item">B</a>
<a href="#" class="dropdown-item">C</a>
</div>
</div>
<a href="#" class="nav-item nav-link"><i class="fa fa-th me-2"></i>Update PO</a>
<a href="#" class="nav-item nav-link"><i class="fa fa-keyboard me-2"></i>Classify PO</a>
<a href="#" class="nav-item nav-link"><i class="fa fa-chart-bar me-2"></i>Estimate rebate</a>
<a href="#" class="nav-item nav-link"><i class="fa fa-tachometer-alt me-2"></i>Update rebate</a>
<a href="#" class="nav-item nav-link"><i class="fa fa-tachometer-alt me-2"></i>Reports</a>
<a href="#" class="nav-item nav-link"><i class="fa fa-tachometer-alt me-2"></i>Search information</a>
<a href="#" class="nav-item nav-link"><i class="fa fa-tachometer-alt me-2"></i>User guide</a>
</div>
<!--sidebar end-->
</div>
<div class="content col-10"> Content
</div>
</div>
<script src="https://kit.fontawesome.com/60bf89e922.js" crossorigin="anonymous"></script>