A fully customizable and reusable Bottom Sheet Manager for iOS, built with UIKit in Swift.
Easily integrate flexible bottom sheet modals across your app with support for snap points, keyboard-safe areas, custom backgrounds, drag gestures, and more!
- πͺ Snap Points Support: Collapsed, Mid, Full heights
- β Drag to Expand / Collapse
- β¨οΈ Keyboard-Safe Padding
- π« Tap-to-Dismiss Toggle
- π¨ Blur / Dimmed / Clear Background Options
- π² Custom Corner Radius & Shadows
- π Global Singleton Manager for Reuse
- π― Lightweight & UIKit Based
Simply drag the BottomSheetManager.swift and BottomSheetViewController.swift into your project.
BottomSheetManager.shared.present(
contentViewController: YourCustomVC(),
from: self,
defaultHeight: 350,
showDragIndicator: true,
isDraggableToExpand: true,
isDraggableToDismiss: true,
isTapToDismissEnabled: true,
cornerRadius: 24,
backgroundStyle: .blurred(style: .systemThinMaterialDark, alpha: 0.6),
startFullExpanded: false,
snapPoints: [200, 400, UIScreen.main.bounds.height - 64]
)BottomSheetManager.shared.dismiss()Conform to the BottomSheetControllerDelegate protocol to receive updates:
extension YourViewController: BottomSheetControllerDelegate {
func bottomSheetDidExpand() { ... }
func bottomSheetDidCollapse() { ... }
func bottomSheetDidDismiss() { ... }
func bottomSheetIsDragging(yOffset: CGFloat) { ... }
}| Parameter | Description | Default Value |
|---|---|---|
defaultHeight |
Initial sheet height | 300 |
showDragIndicator |
Show top bar for drag indication | true |
isDraggableToExpand |
Allow upward drag to expand | true |
isDraggableToDismiss |
Allow downward drag to dismiss | true |
isTapToDismissEnabled |
Allow tapping background to dismiss | true |
cornerRadius |
Corner radius of sheet | 16 |
backgroundStyle |
Dimmed / blurred / none | .dimmed(alpha: 0.6) |
snapPoints |
Snap points for drag gestures | [] (disabled) |
startFullExpanded |
Show full screen on start | false |
Want to see it in action? Check out the Medium article for a step-by-step explanation with code breakdown and demo!
This project is open-sourced under the MIT License. Feel free to use, modify, and contribute.
Created with β€οΈ by @chaudharyyagh π Medium: https://medium.com/@chaudharyyagh π GitHub: https://github.com/YagbhanSingh
Found a bug or want to improve the bottom sheet? Open an issue or submit a pull request β contributions are welcome!
Let me know if you'd like a Hindi-translated README or help creating preview images or a sample demo project!
