scenee /FloatingPanel

A clean and easy-to-use floating panel UI component for iOS

★ 5,825⑂ 535👁 50⑃ 297● 376▤ 68
SwiftMITCreated 2018-10-04
Download: 3.2.43.2.4 ↓3.2.42026-09-06
+0
Daily
5,825
stars
535
forks
50
watchers
297
prs
376
issues
68
releases

README

FloatingPanel

FloatingPanel is a simple and easy-to-use UI component designed for a user interface featured in Apple Maps, Shortcuts and Stocks app.
The user interface displays related content and utilities alongside the main content.

!Maps
!Stocks

!Maps(Landscape)

 Table of Contents



Click here.


- Table of Contents
- Features
- Requirements
- Documentation
- Installation
  - Swift Package Manager
    - Using Xcode
    - Using Package.swift
  - CocoaPods
- Getting Started with SwiftUI
  - Adding a floating panel within a view
  - Presenting a floating panel modally within a view
  - Displaying multiple panels
  - Next step
- Getting Started with UIKit
  - Adding a floating panel as a child view controller
  - Presenting a floating panel modally
  - Next step
- Maintainer
- License



 Features

- Simple container view controller
- Fluid behavior using numeric springing
- Scroll view tracking
- Removal interaction
- Multi panel support
- Modal presentation
- Support for 4 positions (top, left, bottom, right)
- 1 or more magnetic anchors(full, half, tip and more)
- Layout support for all trait environments(i.e. Landscape orientation)
- Common UI elements: surface, backdrop and grabber handle
- Free from common Auto Layout and gesture handling issues
- Compatible with Objective-C
- SwiftUI API support

Examples can be found here:

- Maps like Apple Maps.app.
- Maps-SwiftUI like Apple Maps.app using SwiftUI.
- Stocks like Apple Stocks.app.
- Samples
- SamplesObjC
- SamplesSwiftUI

 Requirements

FloatingPanel is written in Swift 5.0+ and compatible with iOS 15.0+.

 Documentation

- API reference on Swift Package Index
- FloatingPanel SwiftUI API Guide
- FloatingPanel API Guide
- FloatingPanel 2.0 Migration Guide

 Installation

 Swift Package Manager

 Using Xcode

Just follow this documentation.

 Using Package.swift

In your Package.swift Swift Package Manager manifest, add the following dependency to your dependencies argument:

swift
.package(url: "https://github.com/scenee/FloatingPanel", from: "3.2.4"),


Add Numerics as a dependency for your target:

swift
.target(name: "MyTarget", dependencies: [
  .product(name: "FloatingPanel", package: "FloatingPanel"),
  "AnotherModule"
]),


And then add import FloatingPanel in your source code.

 CocoaPods

FloatingPanel is available through CocoaPods. To install
it, simply add the following line to your Podfile:

ruby
pod 'FloatingPanel'


 Getting Started with SwiftUI

 Adding a floating panel within a view

swift
@State private var layout = MyFloatingPanelLayout()
@State private var state: FloatingPanelState?

var view: some View {
  MainView()
      .floatingPanel { proxy in
          ScrollView {
              VStack(spacing: 20) {
                  ForEach(items) { item in
                      ItemRow(item)
                  }
              }
              .padding()
          }
          .floatingPanelScrollTracking(proxy: proxy)
      }
      .floatingPanelState($state)
      .floating

Top issues

Discussions

Latest release

3.2.4 3.2.4 2026-09-06
[!IMPORTANT]
 A panel no longer shifts with the keyboard in the SwiftUI integration, since the keyboard safe area of the main UIHostingController.view no longer propagates to it. Workarounds such as the ignoresKeyboardSafeArea() helper are no longer needed (it has been removed from the Maps-SwiftUI example).

 Fixed

- Fixed the unsupported view hierarchy warning on iOS 26 in the SwiftUI integration (688).

Thank you to @lipopli for this release!

The API document: https://swiftpackageindex.com/scenee/FloatingPanel/3.2.4/documentation/floatingpanel
Full Changelog: https://github.com/

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON