Description
A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.
SwiftUI Drawer alternatives and similar libraries
Based on the "Menu" category.
Alternatively, view SwiftUI Drawer alternatives based on common mentions on social networks and blogs.
-
SideMenu
Simple side menu control for iOS in Swift inspired by Facebook. Right and Left sides. No coding required. -
CircleMenu
CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. -
SwipeMenuViewController
Swipable tab and menu View and ViewController. -
KWDrawerController
Drawer view controller that easy to use! -
SwiftUISelector
A Modern Horizontal Option Selector View for SwiftUI
Get performance insights in less than 4 minutes
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of SwiftUI Drawer or a related project?
README
SwiftUI Drawer
A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.
Contents
Package
For Xcode Projects
File > Swift Packages > Add Package Dependency: https://github.com/maustinstar/swiftui-drawer
For Swift Packages
Add a dependency in your your Package.swift
.package(url: "https://github.com/maustinstar/swiftui-drawer.git", from: "0.1.0"),
Basic Usage
Embed your view content in a ZStack
with the Drawer as the last element. The heights
parameter defines a list of resting heights for the drawer.
ZStack {
ScrollView {
//...
}
Drawer(heights: [100, 340]) {
Color.blue
}.edgesIgnoringSafeArea(.vertical)
}
See the full Reference Guide.
Examples
A multi-height drawer with haptic impact.
Drawer {
ZStack {
RoundedRectangle(cornerRadius: 12)
.foregroundColor(.white)
.shadow(radius: 100)
VStack(alignment: .center) {
Spacer().frame(height: 4.0)
RoundedRectangle(cornerRadius: 3.0)
.foregroundColor(.gray)
.frame(width: 30.0, height: 6.0)
Spacer()
}
}
}.edgesIgnoringSafeArea(.vertical)
.rest(at: .constant([100, 340, UIScreen.main.bounds.height - 40]))
.impact(.light)
See more Examples
๐ Looking for more fun SwiftUI Packages?
Take your SwiftUI apps to the next level with these Packages!
Credits
- Michael Verges - Initial work - [email protected]