lucaszischka/BottomSheet
60.0
Weak · 1 October 2026
3.6k
lines of production code
Swift
primary language
2
measurements over time
What this system is
This system is a Swift-based UI library that implements a customizable bottom sheet component for iOS, macOS, and visionOS applications. It provides developers with granular control over the sheet's appearance, sizing, and interaction behaviors, including drag gestures, dismissal modes, and keyboard handling. The library supports various layout modes such as floating panels on iPad and anchored sheets on mobile devices, while maintaining backward compatibility with older iOS versions.
Features
Added compatibility helpers for safe area and rounded corners in Bottom Sheet
This change introduces two new view modifiers to the Bottom Sheet helper utilities. The \IgnoresSafeAreaCompatible\ modifier provides a unified API for ignoring safe area insets across iOS 14+ and older versions, ensuring consistent layout behavior. Additionally, the \RoundedCornerViewModifier\ adds support for applying rounded corners to specific edges of views, with platform-specific implementations for macOS and iOS to ensure correct rendering.
Sources/BottomSheet/Helper/ViewModifiers · high confidence
New Bottom Sheet View Modifiers for Interaction and Appearance
This update introduces a comprehensive suite of new view modifiers for the Bottom Sheet component, allowing users to fine-tune its behavior and visual presentation. Key additions include \enableAccountingForKeyboardHeight\ to adjust content padding when the keyboard appears, and \enableAppleScrollBehavior\ to replicate native iOS scroll-to-dismiss interactions on iPhone. Users can now customize the sheet's appearance with \enableBackgroundBlur\ (including material selection via \backgroundBlurMaterial\), \customBackground\ for arbitrary view or shape styling, and \dragIndicatorColor\. Interaction controls have been expanded with \showCloseButton\, \enableContentDrag\ for resizing via main content, \enableFlickThrough\ for long-swipe position switching, and \enableSwipeToDismiss\/\enableTapToDismiss\ for dismissal gestures. Additionally, \onDragChanged\ and \onDragEnded\ provide gesture state callbacks, \dragPositionSwitchAction\ allows custom drag logic, and \sheetWidth\ enables configuration of absolute or relative sheet widths.
Sources/BottomSheet/BottomSheet+ViewModifiers · high confidence
Behavioural changes
Bottom Sheet now supports iPad floating and Mac layouts with bottom-positioned sheets
The Bottom Sheet component has been refactored to support iPad and macOS environments, introducing a new 'iPad floating' mode where the sheet appears as a side panel, and a 'bottom' mode for iPad where the sheet anchors to the bottom of the screen. This change includes new calculation logic for heights and widths (e.g., 30% width on iPad/Mac, 40% on iPhone landscape), adjusted drag gesture handling (reversed direction on iPad floating/Mac), and specific safe-area and padding adjustments for these platforms. The drag indicator position also adapts, appearing at the bottom for iPad floating and Mac views.
Sources/BottomSheet/BottomSheetView · high confidence
BottomSheet API refactored to use a dedicated wrapper struct
The BottomSheet library has refactored its public API to use a dedicated \BottomSheet\ wrapper struct instead of extending the \View\ protocol. This change simplifies the integration by removing the need for custom view extensions and helper types like \EffectView\ and \RoundedCorner\, which have been removed from the source. Users now interact with the bottom sheet through a more explicit struct-based initializer, improving code readability and reducing coupling with internal implementation details.
Sources/BottomSheet · high confidence
BottomSheet v3.0.0 API overhaul and v3.1.1 bug fixes
The library has been recoded for v3.0.0, migrating from a parameter-based initialization to a SwiftUI view modifier pattern that supports custom states, dynamic sizing, and landscape modes. This release also includes v3.1.1 fixes for issues \#101, \#97, \#119, and \#106, alongside updated documentation and repository metadata.
(repo-wide) · high confidence
Introduces configurable bottom sheet positioning and width models
The bottom sheet component now supports granular control over its size and placement through new configuration models. Users can define specific vertical positions using the \BottomSheetPosition\ enum, which distinguishes between dynamic, relative (percentage-based), and absolute (pixel-based) heights, and further specifies whether these apply to the top, bottom, or full extent of the sheet. Additionally, the \BottomSheetWidth\ enum allows developers to set the sheet's width to a platform default, a relative percentage of the screen, or an absolute value, enabling better layout adaptation across different device sizes and orientations.
Sources/BottomSheet/Models · high confidence
New internal scroll behavior and visual effect helpers for Bottom Sheet
This change introduces new internal helper files to support the Bottom Sheet's interaction model. It adds a custom \TimerAnimation\ class using \CADisplayLink\ for smooth deceleration and bounce animations, a \DragGesture\ extension to manage drag states, and a \UIScrollViewWrapper\ that bridges UIKit's \UIScrollView\ with SwiftUI to handle complex scroll physics and content offset updates. Additionally, it includes a \VisualEffectView\ that provides cross-platform (iOS, macOS, visionOS) support for applying blur and material effects to the sheet's background.
Sources/BottomSheet/Helper/AppleScrollBehaviourScrollView, Sources/BottomSheet/Helper/Views · high confidence
Refactor helper extensions and add iOS 13 compatibility
The BottomSheet helper extensions have been reorganized and enhanced. A new Bundle extension ensures resources are correctly located when the package is linked as a framework or command-line tool. A UIApplication extension adds an endEditing method to dismiss keyboards on non-macOS platforms. A View extension provides a backwards-compatible valueChanged modifier that uses onChange on iOS 14+ and falls back to onReceive for iOS 13. Additionally, the previous BottomSheetPosition enum was replaced by a Color extension that defines a tertiaryLabel color compatible with both iOS and macOS.
Sources/BottomSheet/Helper/Extensions · high confidence
Test coverage
Removal of BottomSheet test suite files
The test files for the BottomSheet component have been deleted, including the main test class (BottomSheetTests.swift), the XCTest manifests (XCTestManifests.swift), and the Linux test runner (LinuxMain.swift). This removes the existing test coverage for the BottomSheet feature.
Tests · high confidence
Dependencies
Update Swift tools version and add visionOS support
The package now requires Swift 5.9 to build and officially supports visionOS in addition to iOS, macOS, and Mac Catalyst. The CocoaPods specification has been added to version 3.1.1, and the internal test target has been removed from the package manifest.
(dependencies) · high confidence
Housekeeping
Removed local Xcode workspace configuration files
The local Xcode workspace configuration files (contents.xcworkspacedata and IDEWorkspaceChecks.plist) have been removed from the .swiftpm directory. This cleanup removes local IDE state that is not required for the Swift Package Manager to function correctly, ensuring a cleaner repository structure without affecting the package's build or dependency resolution.
.swiftpm · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 57 → 60 (+3.4)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 95 → 96 (+0.9)
- Architecture 100 → 100 (+0.0)
- Maturity 42 → 51 (+8.8)
- Readiness 40 → 44 (+4.3)
- Security 97 → 97 (+0.0)
New (5)
- BottomSheetConfiguration.== (cyclomatic 16) (Sources/BottomSheet/Models/BottomSheetConfiguration.swift)
- BottomSheetView.switchToHighestPosition (cognitive 17) (Sources/BottomSheet/BottomSheetView/BottomSheetView.swift)
- BottomSheetView.switchToHighestPosition (cyclomatic 16) (Sources/BottomSheet/BottomSheetView/BottomSheetView.swift)
- BottomSheetView.switchToLowestPosition (cognitive 17) (Sources/BottomSheet/BottomSheetView/BottomSheetView.swift)
- BottomSheetView.switchToLowestPosition (cyclomatic 16) (Sources/BottomSheet/BottomSheetView/BottomSheetView.swift)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
lucaszischka/BottomSheet was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 3d1238dce6dbbf01de3cdee13e117eeeaf9e7952 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.