SwiftUI Drawer
  • August 7, 2025

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.

GitHub


View Github

YOU MIGHT ALSO LIKE...
Snap

A customizable Snapping Drawer à la Apple Maps, Apple Music, Stocks, Overcast, etc.. 100% in SwiftUI This is heavily inspired ...

Shapes

Morphi – Μορφ

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 ...

SwiftUI Shapes

Collection of custom shapes Regular Polygons