All Projects → nerdsupremacist → Snap

nerdsupremacist / Snap

Licence: mit
A customizable Snapping Drawer à la Apple Maps.

 100% in SwiftUI.

Programming Languages

swift
15916 projects

Labels

Projects that are alternatives of or similar to Snap

flutter advanced drawer
https://pub.dev/packages/flutter_advanced_drawer
Stars: ✭ 44 (-84.88%)
Mutual labels:  drawer
react-native-navigation-drawer-layout
React Native library to generate navigation drawer layout.
Stars: ✭ 26 (-91.07%)
Mutual labels:  drawer
FilterDrawer
Android plug-and-play filter that slides
Stars: ✭ 17 (-94.16%)
Mutual labels:  drawer
react-native-bottom-up-panel
React Native drawer like panel
Stars: ✭ 40 (-86.25%)
Mutual labels:  drawer
GHDropMenuDemo flutter
Flutter版☀️☀️ 仿京东/美团电商筛选菜单 电商筛选菜单 电商通用筛选菜单Flutter version☀️☀️ Imitate Jingdong/Meituan e-commerce screening menu E-commerce screening menu E-commerce general screening menu
Stars: ✭ 78 (-73.2%)
Mutual labels:  drawer
drawer-with-bottom-navigation-architecture
Sample android kotlin project with both drawer and bottom navigation together
Stars: ✭ 42 (-85.57%)
Mutual labels:  drawer
DKNavigationDrawer
Navigation Drawer for iOS using Swift. https://media.giphy.com/media/I45syjhreC0Rq/giphy.gif
Stars: ✭ 17 (-94.16%)
Mutual labels:  drawer
Akswiftslidemenu
Slide Menu (Drawer) in Swift
Stars: ✭ 281 (-3.44%)
Mutual labels:  drawer
material-ui-responsive-drawer
Material-UI responsive Drawer is a React-Redux component that uses Material-UI to create a responsive Drawer.
Stars: ✭ 44 (-84.88%)
Mutual labels:  drawer
react-native-navigation-drawer-extension
Drawer API built on top of wix react-native-navigation for iOS and Android (with TypeScript!)
Stars: ✭ 151 (-48.11%)
Mutual labels:  drawer
minavdrawer
Easy to add different animations into standard NavigationDrawer.
Stars: ✭ 93 (-68.04%)
Mutual labels:  drawer
fxp-jquery-sidebar
A responsive and fluid sidebar with jQuery and Hammer.js
Stars: ✭ 14 (-95.19%)
Mutual labels:  drawer
Compact-Unity-Events
UnityEvents drawer with collapsing, reordering and compact UX
Stars: ✭ 41 (-85.91%)
Mutual labels:  drawer
vue-simple-drawer
A tiny Drawer component with bounced animation for Vue 🚪🎏🗄🔛
Stars: ✭ 58 (-80.07%)
Mutual labels:  drawer
React Native Drawer Layout
A platform-agnostic drawer layout for react-native
Stars: ✭ 258 (-11.34%)
Mutual labels:  drawer
hipsbarjs
Hipsbarjs is a javascript plugin for easily creating drawers in web apps
Stars: ✭ 17 (-94.16%)
Mutual labels:  drawer
vanilla-js-drawer
A dependency-free Vanilla JS drawer. No dependencies, no automation build tools.
Stars: ✭ 20 (-93.13%)
Mutual labels:  drawer
Beagle
A smart, reliable, and highly customizable debug menu library for Android apps that supports screen recording, network activity logging, and many other useful features.
Stars: ✭ 287 (-1.37%)
Mutual labels:  drawer
Cupertino Pane
🎉📱Multi-functional panes and boards for next generation progressive applications
Stars: ✭ 267 (-8.25%)
Mutual labels:  drawer
nativescript-vue-multi-drawer
A NativeScript-Vue component for creating multiple side drawers (4 sides supported)
Stars: ✭ 45 (-84.54%)
Mutual labels:  drawer

Snap

A customizable Snapping Drawer à la Apple Maps, Apple Music, Stocks, Overcast, etc.. 100% in SwiftUI

This is heavily inspired by Rideau and based on this Gist by mshafer.

Here's a short demo where I reconstructed the Apple Maps UI:

Installation

Swift Package Manager

You can install Snap via Swift Package Manager by adding the following line to your Package.swift:

import PackageDescription

let package = Package(
    [...]
    dependencies: [
        .package(url: "https://github.com/nerdsupremacist/Snap.git", from: "0.1.0")
    ]
)

Usage

Snap allows you to set up either 1, 2 or 3 Snapping points and customize your UI depending on where you are.

For example if we want to recreate the Apple Maps UI we could write the following:

import MapKit
import Snap
import SwiftUI

struct ContentView: View {
    @State private var region = MKCoordinateRegion(...)

    var body: some View {
        ZStack {
            Map(coordinateRegion: $region)

            SnapDrawer(large: .paddingToTop(24), medium: .fraction(0.4), tiny: .height(100), allowInvisible: false) { state in
                VStack(alignment: .leading, spacing: 10) {
                    SearchBar()

                    if state != .tiny {
                        Favorites()
                            .transition(.scale)
                    }

                    if state == .large {
                        Recents()
                            .transition(.scale)
                    }
                }
            }
        }
    }
}

Feel free to explore the API yourself and play around with it.

Other features include:

  • Listening to state changes via a @Binding
  • Setting a background view

Contributions

Contributions are welcome and encouraged!

License

Snap is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].