FloatingPanel: An iOS 15+ Bottom-Sheet Container With Magnetic Anchors, Scroll Tracking and a Modifier-Based SwiftUI API
A clean and easy-to-use floating panel UI component for iOS
At a glance
- What is it?
- FloatingPanel is a Swift component that reproduces the draggable panel in Apple Maps, Shortcuts and Stocks, for both UIKit and SwiftUI. It is iOS only, and its modal presentation, coordinators and README have a few sharp edges worth knowing before you adopt it.
- Who is it for?
- FloatingPanel fits iOS apps that want an Apple Maps style panel with snapping positions and scroll tracking, in UIKit or SwiftUI. It does not run on Android or macOS desktop apps, and it requires iOS 15.0.
- 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 38 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 November 14, 2026, and from our analysis. They are not legal advice.
Star history
- scenee/FloatingPanel5,825 ★ · +7
| Repository | 2026-09-23 | 2026-11-14 |
|---|---|---|
| scenee/FloatingPanel | 5.8k | 5.8k |
7 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
It reproduces the panel from Apple Maps, Shortcuts and Stocks and nothing else
FloatingPanel is described as a simple and easy-to-use UI component designed for the user interface featured in Apple Maps, Shortcuts and Stocks. That interface displays related content and utilities alongside the main content. The component is a container view controller with fluid behavior driven by numeric springing, so dragging and release feel like the system apps.
The scope is narrow on purpose. It is a panel that sits over a main view and moves between positions, not a general modal framework, a settings screen builder or a cross-platform widget. The feature list includes scroll view tracking, a removal interaction, multi-panel support, modal presentation, support for four edges (top, left, bottom and right), one or more magnetic anchors such as full, half and tip, and common UI elements: surface, backdrop and grabber handle. The README also claims it is free from common Auto Layout and gesture handling issues.
The requirements are Swift 5.0 and iOS 15.0, so older deployment targets are excluded
The README states FloatingPanel is written in Swift 5.0 or newer and is compatible with iOS 15.0 or newer. It is also listed as compatible with Objective-C.
Two consequences follow. If your app still supports an iOS version earlier than 15, you cannot add this library without raising the deployment target, or you must stay on an older release of the library, whose requirements the visible README does not describe. And because the component is built around UIKit view controllers with a SwiftUI layer on top, it is for Apple platforms only. A reader searching for floating windows on Android or a floating panel in VS Code is looking for something else entirely. Check your minimum iOS version before reading further, since it is the first gate.
The package manifest example asks you to add Numerics, which is a leftover from another project
Installation through Swift Package Manager adds the repository URL with a minimum version of 3.2.4:
.package(url: "https://github.com/scenee/FloatingPanel", from: "3.2.4"),Then you add the product to your target:
.target(name: "MyTarget", dependencies: [
.product(name: "FloatingPanel", package: "FloatingPanel"),
"AnotherModule"
]),The sentence between the two snippets says to add Numerics as a dependency for your target. That wording appears to be left over from a template, because the product being added is FloatingPanel, not a numerics library. Follow the code, not the sentence. After that, add import FloatingPanel in your source. In Xcode you add the package through the standard Add Package Dependencies flow. CocoaPods is also supported with a single line in your Podfile:
pod 'FloatingPanel'In SwiftUI, a modifier chain builds the panel, and the layout and state live in your view
The SwiftUI API attaches a panel to a main view with a floatingPanel modifier whose closure receives a proxy. Inside, you place your content, for example a ScrollView, and call floatingPanelScrollTracking with the proxy so that scrolling the content and dragging the panel cooperate. Further modifiers set the panel state through a binding, the layout object, a custom behavior object and the surface appearance.
The README declares the layout as a State property holding a layout type you define, and the panel state as an optional FloatingPanelState binding. The consequence is that panel position becomes part of your view state, and you can read or set it from SwiftUI code. The cost is that your layout and behavior types must be written as classes or structs that follow the library's protocols, so a simple fixed layout still needs a small type. The API guide for SwiftUI is linked separately and goes further than the getting-started snippet.
Modal presentation in SwiftUI requires a custom coordinator class
To present a panel as a modality from SwiftUI, the README says to define a custom coordinator object. The view calls floatingPanel with a coordinator type, and that type conforms to FloatingPanelCoordinator and implements a setupFloatingPanel method that receives the main and content hosting controllers. Inside it you set the controller's delegate and configure the content.
That is more ceremony than the inline form, and it exists because SwiftUI has no direct handle on the underlying UIKit controller. The consequence is that you need some UIKit knowledge even in a SwiftUI app: hosting controllers and delegates appear in your code. The same coordinator approach is used for multiple panels, where several floatingPanel modifiers can be applied in one view hierarchy. To customize layout and behavior for each panel individually, you place the modifiers directly below each panel, as in the example with two coordinators and different corner radii for the transparent surface.
UIKit is a controller, a delegate and a content view controller, with removal built in
In UIKit you create a FloatingPanelController, optionally assign self as its delegate, set a content view controller, and track a scroll view if there is one. For modal presentation, the pattern is short:
let fpc = FloatingPanelController()
let contentVC = ...
fpc.set(contentViewController: contentVC)
fpc.isRemovalInteractionEnabled = true // Optional: Let it removable by a swipe-down
self.present(fpc, animated: true, completion: nil)The README adds that you can show a panel over a UINavigationController from container view controllers using the over current context style. A note warns that FloatingPanelController has a custom presentation controller, so if you want to change how it presents or dismisses, you need to work with its transitioning support instead of writing your own transition. Setting isRemovalInteractionEnabled lets the user swipe the panel away; without it, the panel stays at its anchors.
Releases are steady, and a 2.0 migration guide is still part of the documentation
The recent releases are 3.2.4 on 2026-09-06, 3.2.3 on 2026-08-04 and 3.2.2 on 2026-02-14, and the last push was on 2026-10-07. The documentation list includes an API reference on Swift Package Index for 3.2.4, a SwiftUI API guide, an API guide and a FloatingPanel 2.0 migration guide, which tells you that major versions have changed the API before.
The repository ships six example projects: Maps, Maps-SwiftUI, Stocks, Samples, SamplesObjC and SamplesSwiftUI. They are the fastest way to see a working anchor setup, because the README snippets are partial. The repo also contains a CHANGELOG.md, a podspec, an Xcode workspace and a Tests directory. Since the license is MIT and the library is a single dependency, the main risk is not legal but the iOS 15 floor and the fact that the panel's behavior is customized through delegate and layout objects you must learn.
Editorial conclusion
FloatingPanel fits iOS apps that want an Apple Maps style panel with snapping positions and scroll tracking, in UIKit or SwiftUI. It does not run on Android or macOS desktop apps, and it requires iOS 15.0. Read the SwiftUI API guide before using modal presentation, which needs a custom coordinator class.
Frequently asked questions
What is FloatingPanel?
FloatingPanel is a Swift UI component for iOS that provides the draggable panel seen in Apple Maps, Shortcuts and Stocks. It works with UIKit and SwiftUI and shows related content alongside the main content.
How do I install FloatingPanel?
Add the package with Swift Package Manager using the repository URL and from: 3.2.4, then import FloatingPanel. Alternatively add pod 'FloatingPanel' to your Podfile for CocoaPods.
Which iOS versions does FloatingPanel support?
The README states it is written in Swift 5.0 or newer and compatible with iOS 15.0 or newer.
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)Star history chart for your README
[](https://hysenlabs.com/projects/scenee-floatingpanel)Was this useful?