scenee/FloatingPanel: an iOS floating panel component for Maps-style sheets
A clean and easy-to-use floating panel UI component for iOS
At a glance
- What is it?
- FloatingPanel is a Swift container view controller and SwiftUI modifier that reproduces the draggable sheet UI from Apple Maps, Shortcuts and Stocks. It installs through Swift Package Manager or CocoaPods, but it only exists on iOS.
- Who is it for?
- Adopt FloatingPanel if you are building an iOS 15+ app in Swift or Objective-C and want the Maps-style sheet without writing your own gesture and scroll-tracking stack; the repository's Examples/Maps, Examples/Stocks and Examples/SamplesSwiftUI directories are the fastest way to judge whether its anchors and behaviors match your design. Do not adopt it if your sheet must run on Android, the web, or an iPad-only layout you cannot express with the four documented positions.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 6 days ago.
- What is it written in?
- Mainly Swift, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The iOS sheet problem FloatingPanel is built to remove
Apple Maps, Shortcuts and Stocks all share one interaction: a card sits over the main content, follows the finger, snaps to a few resting heights, and hands scrolling back to the map when the content reaches its top. Rebuilding that from scratch means coordinating a pan gesture, a scroll view, Auto Layout, safe areas, and the transition between dragging the panel and scrolling its contents. FloatingPanel exists to package exactly that coordination into a container view controller, and the README describes the goal as a component "designed for a user interface featured in Apple Maps, Shortcuts and Stocks app."
The audience is narrow and worth stating plainly: iOS app developers. The README lists Swift 5.0+ and iOS 15.0+ as requirements, and the repository's Examples directory contains Maps, Maps-SwiftUI, Stocks, Samples, SamplesObjC and SamplesSwiftUI folders. That mix of Swift and Objective-C samples tells you the project expects UIKit codebases as well as newer SwiftUI ones. If you are not shipping an iOS app, nothing here applies to you.
How the panel is structured: controller, anchors, behavior
The core object is FloatingPanelController, a container view controller. In the UIKit flow shown in the README, you initialize it, optionally assign a delegate, then call set(contentViewController:) with the view controller that supplies the panel's contents. The panel is therefore a host: it owns the surface, the backdrop and the grabber handle, and your content controller owns everything inside.
Positioning is expressed as anchors. The feature list names four positions (top, left, bottom, right) and "1 or more magnetic anchors(full, half, tip and more)", so a layout object decides which heights the panel can rest at and the panel springs between them. The README attributes the motion to "numeric springing" and lists scroll view tracking as a separate feature, which is the part that decides when a drag on the content becomes a drag on the panel. A behavior object is the third piece: the SwiftUI example passes MyCustomBehavior() through floatingPanelBehavior, and the feature list mentions a removal interaction, so dismissal is configurable rather than fixed. The README also claims the component is "free from common Auto Layout and gesture handling issues," which is a design goal rather than a verifiable property.
Installing FloatingPanel with Swift Package Manager or CocoaPods
The README documents two installation paths. For Swift Package Manager, the manifest form adds the package with a from: version constraint. The README shows 3.2.4, which matches the most recent release listed in the repository:
.package(url: "https://github.com/scenee/FloatingPanel", from: "3.2.4"),The same section then shows how to attach the product to a target, and reminds you to add the import in your source. Note the README's wording here is slightly off: it says to add "Numerics" as a dependency, but the snippet names the FloatingPanel product.
.target(name: "MyTarget", dependencies: [
.product(name: "FloatingPanel", package: "FloatingPanel"),
"AnotherModule"
]),CocoaPods users add one line to the Podfile:
pod 'FloatingPanel'For a first real use, the UIKit walkthrough is the shortest path. After importing UIKit and FloatingPanel and declaring a FloatingPanelControllerDelegate, the README initializes the controller, assigns the delegate, and sets a content view controller. The snippet continues into scroll tracking, which is where the panel starts behaving like the Maps sheet rather than a static card:
import UIKit
import FloatingPanel
class ViewController: UIViewController, FloatingPanelControllerDelegate {
var fpc: FloatingPanelController!
override func viewDidLoad() {
super.viewDidLoad()
fpc = FloatingPanelController()
fpc.delegate = self
let contentVC = ContentViewController()
fpc.set(contentViewController: contentVC)
}
}What you should see after this is a panel over your view controller whose content is ContentViewController. The README stops the snippet mid-sentence at the scroll-tracking step and points to the FloatingPanel API Guide for the rest, so expect to read that guide before the panel responds to scrolling the way you want.
SwiftUI support is real but still coordinator-shaped
FloatingPanel ships a SwiftUI API, and the README's first SwiftUI example is compact: a floatingPanel closure supplies the content, floatingPanelState binds a FloatingPanelState, floatingPanelLayout supplies the layout, and floatingPanelScrollTracking ties a proxy to the scroll view. Surface appearance is a separate modifier, shown as .transparent.
The modal case is less idiomatic. To present a panel as a modality you define a type conforming to FloatingPanelCoordinator and implement setupFloatingPanel, where you assign the delegate, set the content view controller, and present the controller. The README's own comment in that example says to present "on the next run loop cycle to ensure proper view hierarchy setup," wrapped in Task { @MainActor in ... }. That is a workaround the library asks you to write, not something it hides. If you expect a pure SwiftUI presentation API, this is the part to read closely before adopting.
Multiple panels are supported by stacking floatingPanel modifiers, each with its own coordinator and surface appearance. The README's example uses two panels over a Color.orange background and shows a corner radius only on the second, which is a hint that per-panel appearance is configured at the modifier site rather than globally.
Where FloatingPanel is the wrong tool
The hard constraint is platform. The README states the component is written in Swift 5.0+ and compatible with iOS 15.0+. There is no documented Android, web, macOS or tvOS target, and the repository layout is an Xcode workspace with a podspec, so the distribution story is Apple-only by construction. If your product needs the same sheet on another platform, you will be writing it twice.
The second constraint is that the library gives you a container, not a design system. The feature list names surface, backdrop and grabber handle as "common UI elements," which means the panel's chrome is yours to style. Teams expecting a themed component with opinionated typography will find more configuration work than the screenshots suggest.
The third is upgrade friction. The Documentation directory contains a "FloatingPanel 2.0 Migration Guide," which exists because the API changed enough between major versions to require one. A component that has already needed a migration guide will likely need another, and the release history shows 3.2.2 in February 2026 followed by 3.2.3 and 3.2.4 later in the year, so patch releases are not rare. Pin your version and read the changelog before bumping.
FloatingPanel against PanModal and other sheet libraries
The closest comparison a reader will reach for is PanModal, which appears in the related searches for this project. The difference in approach is about scope rather than quality. PanModal is built around presenting a view controller as a modal sheet with a fixed set of detents, and its mental model is presentation. FloatingPanel's mental model is a container you can also embed: the README's first UIKit example adds the panel as a child view controller, and modal presentation is a separate section. FloatingPanel also documents four positions including left and right, plus "1 or more magnetic anchors," and ships a SwiftUI API alongside the UIKit one. PanModal's documented surface, by contrast, is the modal presentation path.
SwiftEntryKit and LottieAnimationView also appear in the same search results, but neither is a like-for-like substitute: SwiftEntryKit covers banners, popups and notifications, and LottieAnimationView is an animation renderer. They show up because iOS developers search for UI components in clusters, not because they solve the draggable-sheet problem. If your requirement is specifically a Maps-style sheet that can be embedded and dragged, FloatingPanel and PanModal are the two names worth putting side by side, and the deciding question is whether you need child-controller embedding or only modal presentation.
Maintenance, licence and what an upgrade costs
The repository is not archived, and the last push was on 2026-09-18, four days before this writing, with release 3.2.4 published on 2026-09-06. That is a recent cadence, and it is the only maintenance signal available here; the README does not describe a support policy, a deprecation timeline or a compatibility matrix beyond iOS 15.0+.
The licence is MIT, stated in the repository metadata and in the LICENSE file at the top level. MIT permits commercial and closed-source use with the copyright notice retained, but this is not legal advice and the LICENSE text is the authority. There is no separate commercial tier or contributor licence agreement mentioned in the README, so the licensing surface is simple.
The upgrade cost is where you should budget time. Version 3.2.4 is the current release, and the presence of a 2.0 Migration Guide in Documentation/ is evidence that major versions have broken APIs before. A patch bump from 3.2.2 to 3.2.4 is unlikely to require code changes, but a future 4.x should be treated as a migration project. Because the package is distributed through Swift Package Manager and CocoaPods, both support version pinning, and pinning is the cheap insurance here.
Editorial conclusion
Adopt FloatingPanel if you are building an iOS 15+ app in Swift or Objective-C and want the Maps-style sheet without writing your own gesture and scroll-tracking stack; the repository's Examples/Maps, Examples/Stocks and Examples/SamplesSwiftUI directories are the fastest way to judge whether its anchors and behaviors match your design. Do not adopt it if your sheet must run on Android, the web, or an iPad-only layout you cannot express with the four documented positions. Before committing, check the last push date (2026-09-18) against your own release schedule and read the 2.0 Migration Guide if you are upgrading from an older major version.
Frequently asked questions
What is FloatingPanel for iOS?
It is a Swift UI component that reproduces the draggable panel seen in Apple Maps, Shortcuts and Stocks, shipped as a container view controller with a SwiftUI API on top. The README lists Swift 5.0+ and iOS 15.0+ as requirements.
How do I install FloatingPanel?
Add the package through Swift Package Manager with .package(url: "https://github.com/scenee/FloatingPanel", from: "3.2.4") and attach the FloatingPanel product to your target, or add pod 'FloatingPanel' to your Podfile. Both paths are documented in the README's Installation section.
Does FloatingPanel work with SwiftUI?
Yes. The README documents a floatingPanel view modifier, floatingPanelState, floatingPanelLayout and floatingPanelScrollTracking, plus a FloatingPanelCoordinator protocol for modal presentation. The modal example tells you to present on the next run loop cycle inside Task { @MainActor in ... }.
Can FloatingPanel be used on Android or the web?
No. The README states the component is written in Swift and compatible with iOS 15.0+, and the repository ships an Xcode workspace and a podspec. There is no documented target for other platforms.
Which positions can a FloatingPanel rest at?
The feature list names four positions (top, left, bottom, right) and one or more magnetic anchors such as full, half and tip. You choose them through a layout object passed to the panel.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/scenee-floatingpanel)