Add a Maps-style sliding bottom panel to an iOS app that snaps to tip, half-height, and full-screen positions.
Build a SwiftUI search interface with a floating panel that scrolls smoothly when the user swipes through a list.
Display multiple floating panels simultaneously on one screen, each anchored to a different edge.
Requires iOS 12+ and Swift 5.0+, install via Swift Package Manager or CocoaPods.
FloatingPanel is a Swift library for iOS that adds a sliding panel to your app, similar to the drawer that appears at the bottom of Apple Maps when you search for a location. The panel sits in front of the main content, can be dragged up and down between several preset positions (such as a small tip at the bottom, a half-height view, and full-screen), and scrolls naturally when the user swipes through content inside it. The component supports four attachment positions: bottom, top, left, and right. You define one or more anchor points (called magnetic anchors) where the panel snaps into place, and the library handles the spring animation between them. If you want to let users dismiss the panel entirely, you can enable a swipe-to-remove interaction. Multiple panels can be displayed in the same screen at once. The library works with both SwiftUI and UIKit. In SwiftUI you attach it as a view modifier on your main content. In UIKit you create a FloatingPanelController, assign it a content view controller, and add it as a child. Both paths support scroll tracking, which means if the panel contains a scrollable list, the library coordinates the drag gesture between the panel's movement and the scroll view's content offset so the interaction feels continuous. FloatingPanel requires iOS 12 or later and Swift 5.0 or later. It can be installed via Swift Package Manager or CocoaPods. The repository includes several example projects demonstrating the Maps and Stocks app layouts, plus SwiftUI and Objective-C samples. Full API documentation is available on Swift Package Index. The library is MIT licensed and maintained by Shin Yamamoto.
← scenee on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.