Skip to content

MihailPreis/SideMenu

Repository files navigation

SideMenu

Small side menu implementation for SwiftUI.

How to use?

import SwiftUI

struct ContentView: View {
    @State var showSideMenu = false

    var body: some View {
        NavigationView {
            // ...
            Button("Open SideMenu") {
                showSideMenu = true
            }
            // ...
        }
        .sideMenu(isShow: $showSidebar) {
            Color.red
                .ignoresSafeArea()
                .frame(width: 200)
        }
    }
}