SwiftUI-Drawer - A bottom-up drawer in swiftUI

Related tags

UI SwiftUI-Drawer
Overview

SwiftUI-Drawer

A bottom-up drawer view.

Contents

Installation

For Swift Packages

Add a dependency in your your Package.swift

    .package(name: "Drawer", url: "https://github.com/bwide/SwiftUI-Drawer", from: "0.4.0")

Examples

Simple Drawer with no handle

    ZStack {
        Color.black
        GeometryReader { geometry in
            Drawer {
                Color.blue
            }
                .rest(in: [135, geometry.size.height])
        }
    }.edgesIgnoringSafeArea(.vertical)







Drawer with the default handle
    ZStack {
        Color.black
        GeometryReader { geometry in
            Drawer({
                Color.blue
            }, handle: {
                DrawerHandles.defaultHandle
            })
                .withHandleOffset(13, and: 54)
                .rest(in: [135, geometry.size.height])
        }
    }.edgesIgnoringSafeArea(.vertical)







Drawer with no rounded edges when reaching the top of the screen and a custom handle offset

    ZStack {
        Color.gray
        GeometryReader { geometry in
            Drawer {
                Color.blue
            }
            .cornerRadius(radius)
            .onRest({ position in
                radius = position == geometry.size.height
                    ? 0
                    : 16
            })
            .onDrag({ position in
                radius = 16
            })
            .rest(in: [136, geometry.size.height])
            .withHandleOffset(13, and: 43)
        }
    }.edgesIgnoringSafeArea(.vertical)
You might also like...
A SwiftUI Library for creating resizable partitions for View Content.
A SwiftUI Library for creating resizable partitions for View Content.

Partition Kit Recently Featured In Top 10 Trending Android and iOS Libraries in October and in 5 iOS libraries to enhance your app! What is PartitionK

A micro UIStackView convenience API inspired by SwiftUI
A micro UIStackView convenience API inspired by SwiftUI

Stacks A micro UIStackView convenience API inspired by SwiftUI. let stack: UIView = .hStack(alignment: .center, margins: .all(16), [ .vStack(spaci

SwiftUI: Components Library Inspired by Twitter's Bootstrap
SwiftUI: Components Library Inspired by Twitter's Bootstrap

bootswiftui SwiftUI: Components Library Inspired by Twitter's Bootstrap Warning This is just SwiftUI exercise. Please do not consider using this repo

Zeplin component preview for your SwiftUI views
Zeplin component preview for your SwiftUI views

A Zeplin component preview for your SwiftUI views. You can use Zeplin components instead of real views within your app until you implement them.

A SwiftUI Views for wrapping HStack elements into multiple lines
A SwiftUI Views for wrapping HStack elements into multiple lines

SwiftUI WrappingStack A SwiftUI Views for wrapping HStack elements into multiple lines. List of supported views WrappingHStack - provides HStack that

Blobmorphism is a brand new design language I've created to break free of the material overload in iOS, built in SwiftUI. Everything feels smooth and fluid.
Blobmorphism is a brand new design language I've created to break free of the material overload in iOS, built in SwiftUI. Everything feels smooth and fluid.

Blobmorphism is a brand new design language I've created to break free of the material overload in iOS, built in SwiftUI. Everything feels smooth and fluid.

Create SwiftUI Views with any data

Create SwiftUI Views with any data

Advanced List View for SwiftUI with pagination & different states

AdvancedList This package provides a wrapper view around the SwiftUI List view which adds pagination (through my ListPagination package) and an empty,

Swipe Left2Right & Right2Left, pure SwiftUI implementation
Swipe Left2Right & Right2Left, pure SwiftUI implementation

SwipeCell Preview Features Swipe cell from Left2Right & Right2Left. Destructive swipe Usage Simply add onSwipe(leading, trailing) method to your list

Owner
Bruno Wide
iOS Developer and swift thinker
Bruno Wide
🐝 Super ultra drawer view

UltraDrawerView let headerView = HeaderView() headerView.translatesAutoresizingMaskIntoConstraints = false headerView.heightAnchor.constraint(equalToC

Ilya Lobanov 205 Dec 14, 2022
The Napp Drawer module extends the Appcelerator Titanium Mobile framework.

Titanium Napp Drawer Module Description The Napp Drawer module extends the Appcelerator Titanium Mobile framework. The module is licensed under the MI

null 12 Sep 15, 2022
A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.

SwiftUI Drawer A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize. Contents Add the Package Basic Usage Examples Credits

Michael Verges 695 Jan 3, 2023
⬆️ A SwiftUI view component sliding in from bottom

⬆️ A SwiftUI view component sliding in from bottom

Tieda 595 Dec 28, 2022
BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen

BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well

Alexis (Aubry) Akers 5.3k Jan 2, 2023
A paging scroll view for SwiftUI, using internal SwiftUI components

PagingView A paging scroll view for SwiftUI, using internal SwiftUI components. This is basically the same as TabView in the paging mode with the inde

Eric Lewis 18 Dec 25, 2022
SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view.

SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view. You will be able to layout the margins in a CSS/Flutter-like.

Masaaki Kakimoto(柿本匡章) 2 Jul 14, 2022
A number of preset loading indicators created with SwiftUI

ActivityIndicatorView A number of preset loading indicators created with SwiftUI We are a development agency building phenomenal apps. Usage Create an

Exyte 956 Dec 26, 2022
A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI.

BetterSafariView A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI. Contents Motivation Requirements U

Dongkyu Kim 392 Dec 31, 2022