Swiftpack.co - vivalalova/SheetOver as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by vivalalova.
vivalalova/SheetOver 1.0.2
Customable bottom sheet in SwiftUI
⭐️ 0
🕓 2 weeks ago
iOS
.package(url: "https://github.com/vivalalova/SheetOver.git", from: "1.0.2")

SheetOver

Feature

  • Customable Bottom sheet

image

Uasge

// current position
@State var position: SheetOver.Position = .short()
// stop position when dragging stopped
@State var allowed: [SheetOver.Position] = [.tall(scrollable: true), .half(), .short()]
SomeView()
  .sheetOver($model.position, allowed: $model.allowed) {
    VStack(spacing: 0) {
      Text("title").font(.title)

      Divider()

      LazyVStack {
        ForEach(1 ..< 55) { _ in
          Text("hihi")
            .font(.largeTitle)
        }
      }
      // scroll at .tall because .tall(scrollable: true) at allowed
      // or just false for long contentSize.height
      .sheetOverScrollable()
    }
    .padding(.top, 20)
    .sheetOverTopBarColor(.red)
    .sheetOverBackgroundColor(.blue)
  }

GitHub

link
Stars: 0
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics