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

Recognize your user's voice elegantly without having to figure out authorization and audio engines. SwiftSpeech Examples Features Installation Getting Started ...

SwiftUIValueSlider

Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 14.0 Installation ...

Sliders

Sliders is a compilation of all my stylable drag based SwiftUI components. It provides a variety of unique controls as well ...

SlidingRuler

SlidingRuler is a Swift package containing a SwiftUI control that acts like an linear infinite slider or a finite, more precise ...

Skeletonui

SkeletonUI aims to bring an elegant, declarative syntax to skeleton loading animations. Get rid of loading screens or spinners and ...