{"id":13751679,"url":"https://github.com/totoroyyb/DrawerView-SwiftUI","last_synced_at":"2025-05-09T18:31:54.564Z","repository":{"id":88368413,"uuid":"201094970","full_name":"totoroyyb/DrawerView-SwiftUI","owner":"totoroyyb","description":"A drawer view implemented by SwiftUI","archived":false,"fork":false,"pushed_at":"2019-11-20T23:22:14.000Z","size":4061,"stargazers_count":34,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T04:32:08.734Z","etag":null,"topics":["drawerview","ios","ios-animation","ios-lib","ios-swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/totoroyyb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-07T17:23:15.000Z","updated_at":"2023-07-28T17:41:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a1945c2-a6cb-48aa-abb1-aba26d8f1c79","html_url":"https://github.com/totoroyyb/DrawerView-SwiftUI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoroyyb%2FDrawerView-SwiftUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoroyyb%2FDrawerView-SwiftUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoroyyb%2FDrawerView-SwiftUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totoroyyb%2FDrawerView-SwiftUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totoroyyb","download_url":"https://codeload.github.com/totoroyyb/DrawerView-SwiftUI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253303027,"owners_count":21886873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drawerview","ios","ios-animation","ios-lib","ios-swift","swiftui"],"created_at":"2024-08-03T09:00:51.823Z","updated_at":"2025-05-09T18:31:49.521Z","avatar_url":"https://github.com/totoroyyb.png","language":"Swift","funding_links":[],"categories":["🌎 by the community"],"sub_categories":[],"readme":"# DrawerView-SwiftUI\n\n **A drawer view implemented by SwiftUI. This is not just simply a demo, instead, it can be directly used in project as a module as it has rudimentary customization flexibility.**\n \n## To-Dos\n- [ ] Fix the computed property error\n\n## Introduction \u0026 Demo\n\n### Basic Functionality Demo\n\n*A drawer with some bouncing animation*\n\n\u003cimg src=\"img/basic.gif\" width=\"400\"\u003e\n\n\n\n### Further Step\n\n#### Click Anywhere of the Background to Dismiss DrawerView\n\nYou can click anywhere of the darken background to dismiss the DrawerView\n\n\u003cimg src=\"img/backdismiss.gif\" width=\"400\"\u003e\n\n#### Drag to Dismiss DrawerView\n\n* You can drag the draggable area to dismiss the DrawerView\n\n  \u003cimg src=\"img/dragdismiss.gif\" width=\"400\"/\u003e\n\n* However, if the translation of drag action is shorter than you want, you can still restore the DrawerView.\n\n  \u003cimg src=\"img/dragrestore.gif\" width=\"400\"/\u003e\n\n* Actually, you can even drag it up if you want. You can modify this behavior in the code.\n\n  \u003cimg src=\"img/drag.gif\" width=\"400\"/\u003e\n\n## Usage\n\nThe entire `DrawerView` is coded in the file with the same name as `DrawerView.swift`. The setup code written in `Content.swift` which demonstrates how to use `DrawerView.swift`.\n\n*`DrawerView` takes one required argument `isShow` to open and dismiss itself. You need to create one in your main view and bind it to `DrawerView`*\n\n* Use `DrawerView` as `overlay`\n\n  The code provided in the `Content.swift` uses `DrawerView` as a `overlay` of the main view.\n\n  ``` swift\n  VStack {\n    // Create your own main view\n  }\n  .overlay(\n    DrawerView(isShow: $isShow, content: SampleInnerView())\n  )\n  ```\n\n* Use `DrawerView` in `ZStack`\n\n  ``` swift\n  ZStack {\n    VStack {\n      // Create your own main view\n    }\n    \n    DrawerView(isShow: $isShow, content: SampleInnerView())\n  }\n  ```\n  \n  *In the above code, `content` is the inner view of `DrawerView`.*\n  \n  *For example:*\n\n  ``` sw\n  // file: SampleInnerView.swift\n  struct SampleInnerView: View {\n    var body: some View {\n      Text(\"This is the inner view of DrawerView\")\n    }\n  }\n  ```\n\n\n\n## Customization\n\n*All customizable properties have been provided in the `DrawerView.swift`. You can directly assign the preferred value to these variables when you initialize the `DrawerView`*\n\n* `backLayerColor`\n\n* `backLayerOpacity`\n\n* `backLayerAnimation`\n\n* `drawerOrientation`\n\n* `drawerHeight`\n\n* `drawerWidth`\n\n* `drawerCornerRadius`\n\n* `drawerBackgroundColor`\n\n* `drawerOutAnimation`\n\n* `isDrawerShadowEnable`\n\n* `drawerShadowRadius` \n\n  *If you want to customize this property, you need to set `isDrawerShadowEnable` to `true` first. By default, the animation of shadow is suppressed, but you can change it in source file.*\n\n* `content`\n\n  *This is property is required in the initializer. You can assign the view you want.*\n\n* **To Be Continued**\n\n## Contribution\n\nThis project is for demonstration purpose. Any contribution is welcome!\n\n**Best Luck and Happy Coding!**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotoroyyb%2FDrawerView-SwiftUI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotoroyyb%2FDrawerView-SwiftUI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotoroyyb%2FDrawerView-SwiftUI/lists"}