SwiftUI Drawer is a UI component that implements a draggable bottom sheet interface similar to those found in modern mobile apps like Apple Maps, enabling users to expand or collapse content panels interactively. It is built entirely using SwiftUI, leveraging declarative patterns to define layout behavior and interactions in a concise and flexible way. The component allows developers to specify multiple resting heights, giving the drawer different states that users can snap to when dragging. It integrates seamlessly into existing layouts using a ZStack structure, where the drawer sits above other content and responds to gestures naturally. The library includes support for animations and haptic feedback, enhancing the tactile feel of interactions and improving user experience. It also provides customization options such as alignment, width, and responsive layout adjustments depending on device orientation or screen size.
Features
- Draggable bottom sheet interface with multiple resting states
- Built with SwiftUI declarative architecture
- Customizable heights and layout behavior
- Support for haptic feedback and smooth animations
- Responsive layout adjustments for different screen sizes
- Easy integration using ZStack structure