SwiftUI package to present a Bottom Sheet interactable view with the desired Detents. Also known as Half sheet.

Overview

BottomSheetSUI

BottomSheetSUI is a package that gives you the ability to show a Bottom sheet intractable, where you can add your own SwiftUI view.

You can customize the detents available for the sheet. Small, Medium and Large. It will use just a set of them.

The project is inspired by the implementation of UISheetPresentationController in UIKit to make it available for SwiftUI.

It is also inspired by the content made by KavSoft, modified to make it reusable within any view.

Installation

Use the package manager SPM to add TimeSlotCalculator.

dependencies: [
        .package(url: "https://github.com/Polenoso/BottomSheetSUI.git", from: "1.0.0"),
    ],
targets:
 .target("yourtarget",
        dependencies: [BottomSheetSUI])

Usage

import BottomSheetSUI

...
BottomSheetView(detents: [.small, .medium, .large]) {
    Text("This is an example content")
}
...

Examples

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

You might also like...
✨ Super sweet syntactic sugar for SwiftUI.View initializers.

ViewCondition ✨ Super sweet syntactic sugar for SwiftUI.View initializers. At a Glance struct BorderTextView: View { var color: Color? @ViewBuild

A grid layout view for SwiftUI
A grid layout view for SwiftUI

Update July 2020 - latest SwiftUI now has built-in components to do this, which should be used instead. FlowStack FlowStack is a SwiftUI component for

Horizontal and Vertical collection view for infinite scrolling that was designed to be used in SwiftUI
Horizontal and Vertical collection view for infinite scrolling that was designed to be used in SwiftUI

InfiniteScroller Example struct ContentView: View { @State var selected: Int = 1 var body: some View { InfiniteScroller(direction: .ve

ReadabilityModifier - UIKits readableContentGuide for every SwiftUI View, in the form of a ViewModifier
ReadabilityModifier - UIKits readableContentGuide for every SwiftUI View, in the form of a ViewModifier

ReadabilityModifier UIKits readableContentGuide for every SwiftUI View, in the form of a ViewModifier What it is Displaying multiple lines of text in

A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background
A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background

Atmos A SwiftUI proof-of-concept, and some sleight-of-hand, which adds rain to a view's background. "Ima use this in my app..." Introducing Metal to S

A SwiftUI ScrollView that runs a callback when subviews are scrolled in and out of view.

VisibilityTrackingScrollView This package provides a variant of ScrollView that you can use to track whether views inside it are actually visible. Usa

What's New In SwiftUI for iOS 16 - Xcode 14 -  SwiftUI 4.0
What's New In SwiftUI for iOS 16 - Xcode 14 - SwiftUI 4.0

SwiftUI4 What's New In SwiftUI for iOS 16 - Xcode 14 - SwiftUI 4.0 (Work in progress....) Swift Charts Presentation Detents(Half Sheet & Small Sheets)

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.
LayoutKit is a fast view layout library for iOS, macOS, and tvOS.

🚨 UNMAINTAINED 🚨 This project is no longer used by LinkedIn and is currently unmaintained. LayoutKit is a fast view layout library for iOS, macOS, a

Programmatic view layout for the rest of us.
Programmatic view layout for the rest of us.

Façade Important Facade is no longer under active development, and as such if you create any issues or submit pull requests, it's not very likely to b

Comments
  • missing argument for parameter 'detent' in call

    missing argument for parameter 'detent' in call

    With code:

    import BottomSheetSUI
    
    ...
    
    BottomSheetView(detents: [.small, .medium, .large]) {
        Text("This is an example content")
    }
    
    

    Shows error:

    missing argument for parameter 'detent' in call

    documentation 
    opened by aetherwu 1
Releases(1.0.1)
  • 1.0.1(Dec 29, 2021)

    Adding Detent binding from super view Fixing scroll overflow

    Full Changelog: https://github.com/Polenoso/BottomSheetSUI/compare/1.0.0...1.0.1

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Dec 1, 2021)

    Very first release which provides the ability to display a Bottom Sheet View with your own content.

    Full Changelog: https://github.com/Polenoso/BottomSheetSUI/commits/1.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
Aitor Pagán
iOS Developer @MonkeyTaps
Aitor Pagán
Half modal view for SwiftUI

ResizableSheet ResizableSheeet is a half modal view library for SwiftUI. You can easily implement a half modal view. Target Swift5.5 iOS14+ Installati

matsuji 76 Dec 16, 2022
iOS simple project to create half-screen modal view controller with pan

Simple Half-screen view controller, draggable and less code (learning purpose)

Mohd Hafiz 123 Dec 17, 2022
Component containing supplementary content that are anchored to the bottom of the screen.

BottomSheetController UIKit component containing supplementary content that are anchored to the bottom of the screen. Requirements Installation Swift

Naruki Chigira 37 Nov 15, 2022
Alignment Control is a component to align top, middle, bottom, left, center, right.

AlignmentControl is a component for alignment Direction AlignmentDirection Horizontal Vertical Mode AlignmentMode Left Center Right Top Middle Bottom

Beslan Tularov 38 Mar 16, 2022
SwiftUI 2.0 Cheat Sheet

SwiftUI 2.0 Cheat Sheet Table of Contents SwiftUI Cheat Sheet Table of Contents Resource UIKit equivalent in SwiftUI View Text Label TextEditor Image

Simple Codes 3.8k Dec 26, 2022
An open source package for as-you-type formatting in SwiftUI.

DiffableTextViews An open source package for as-you-type formatting in SwiftUI. Features Feature Description ⌨️ Responsive Formats text as you type ??

Oscar Byström Ericsson 46 Dec 5, 2022
Modern-collection-view - Modern collection view for swift

Modern collection view Sample application demonstrating the use of collection vi

Nitanta Adhikari 1 Jan 24, 2022
A utility application to capture and review search results from Swift Package Index.

SPISearch An app (macOS & iOS) to explore the search results from Swift Package Index. Testflight Links: SPIIndex (iOS and macOS apps) Search Ranking

Joseph Heck 5 Jul 26, 2022
Flow layout / tag cloud / collection view in SwiftUI.

SwiftUIFlowLayout A Flow Layout is a container that orders its views sequentially, breaking into a new "line" according to the available width of the

Gordan Glavaš 115 Dec 28, 2022
NStack is a SwiftUI view that allows you to hoist navigation state into a Coordinator

An NStack allows you to manage SwiftUI navigation state with a single stack property. This makes it easy to hoist that state into a high-level view, such as a coordinator. The coordinator pattern allows you to write isolated views that have zero knowledge of their context within the navigation flow of an app.

John Patrick Morgan 469 Dec 27, 2022