- August 7, 2025
- Mins Read
A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.
File > Swift Packages > Add Package Dependency: https://github.com/maustinstar/swiftui-drawer
Add a dependency in your your Package.swift
.package(url: “https://github.com/maustinstar/swiftui-drawer.git”, from: “0.1.0”),
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.
A multi-height drawer with haptic impact.
Morphi provides some additional shapes for SwiftUI. Triangle Parallelogram(topLeftAngle) Polygon(sides) RoundedPolygon(sides, cornerRadius) Heart Moon(angle) PlusSign(width) Star(points) Wave(isUp, width, offset) SuperEllipse(n) Drop Ring(radius) (to ...