{"id":20878898,"url":"https://github.com/codeandtheory/ybottomsheet-ios","last_synced_at":"2025-12-11T22:52:28.354Z","repository":{"id":79924570,"uuid":"604765665","full_name":"codeandtheory/ybottomsheet-ios","owner":"codeandtheory","description":"An easy-to-use bottom sheet controller for iOS.","archived":false,"fork":false,"pushed_at":"2023-10-26T15:41:37.000Z","size":269,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-11-17T11:23:16.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeandtheory.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}},"created_at":"2023-02-21T18:39:11.000Z","updated_at":"2023-09-29T07:52:40.000Z","dependencies_parsed_at":"2023-10-03T05:28:44.817Z","dependency_job_id":"baf1f469-1b5f-4c2d-9b5e-8cc15ee78290","html_url":"https://github.com/codeandtheory/ybottomsheet-ios","commit_stats":null,"previous_names":["codeandtheory/ybottomsheet-ios","yml-org/ybottomsheet-ios"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/codeandtheory/ybottomsheet-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2Fybottomsheet-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2Fybottomsheet-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2Fybottomsheet-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2Fybottomsheet-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeandtheory","download_url":"https://codeload.github.com/codeandtheory/ybottomsheet-ios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2Fybottomsheet-ios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27570388,"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","status":"online","status_checked_at":"2025-12-07T02:00:07.896Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-18T07:14:33.483Z","updated_at":"2025-12-11T22:52:28.309Z","avatar_url":"https://github.com/codeandtheory.png","language":"Swift","readme":"![Y—Bottom Sheet](https://user-images.githubusercontent.com/1037520/220544799-9b2e899f-32ba-4629-a819-c7b1f14ad1be.jpeg)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fyml-org%2Fybottomsheet-ios%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/yml-org/ybottomsheet-ios) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fyml-org%2Fybottomsheet-ios%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/yml-org/ybottomsheet-ios)  \n_An easy-to-use bottom sheet controller for iOS._\n\nThis framework offers a bottom sheet view controller that can be initialized to host any view or view controller.\n\n![Bottom Sheet demo animation](https://user-images.githubusercontent.com/1037520/220545009-58ba333c-a367-4bc1-8e6e-5cbdfc9d546f.gif)\n\nLicensing\n----------\nY—BottomSheet is licensed under the [Apache 2.0 license](LICENSE).\n\nDocumentation\n----------\n\nDocumentation is automatically generated from source code comments and rendered as a static website hosted via GitHub Pages at: https://yml-org.github.io/ybottomsheet-ios/\n\nUsage\n----------\n\n### Initializers\nThe Bottom sheet controller can be initialized with either a title and a view or else with a view controller. \n\nWhen initializing with a view controller, the title is drawn from `UIViewController.title`. When the view controller is a `UINavigationController`, the header appearance options are ignored and the navigation controller's navigation bar is displayed as the sheet's header. In this situation, if you wish to have a close button, then that should be set using the view controller's `navigationItem.rightBarButtonItem` or `.leftBarButtonItem`.\n\nBoth initializers include an appearance parameter that allows you to fully customize the sheet's appearance. You can also update the sheet's appearance at any time.\n\n#### Simple use case 1: Passing a title and a view\n\n```swift\nimport YBottomSheet\n\nfinal class ViewController: UIViewController {\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        showBottomSheet()\n    }\n    \n    func showBottomSheet() {\n        let yourView = UIView() \n        let sheet = BottomSheetController(\n            title: \"Title\",\n            childView: yourView\n        )\n        present(sheet, animated: true)\n    }\n}\n```\n\n#### Simple use case 2: Passing a view controller.\n\n```swift\nimport YBottomSheet\n\nfinal class ViewController: UIViewController {\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        showBottomSheet()\n    }\n    \n    func showBottomSheet() {\n        let yourViewController = UIViewController() \n        let sheet = BottomSheetController(\n            childController: yourViewController\n        )\n        present(sheet, animated: true)\n    }\n}\n```\n\n### Customization\n`BottomSheetController` has an `appearance` property of type `Appearance`.\n\n`Appearance` lets you customize how the bottom sheet both appears and behaves. You can customize:\n\n* drag indicator (whether you have one at all or what its size and color are)\n* header (whether you have one at all or what its text color, typography, and optional close button image are)\n* layout (corner radius and minimum, maximum, and ideal sizes for the sheet's contents)\n* drop shadow (if any)\n* dimmer color\n* present animation\n* dismiss animation\n\n**Update or customize appearance**\n\n```swift\n// Declare a resizable sheet.\nlet sheet = BottomSheetController(\n    childController: yourViewController,\n    appearance: .defaultResizable\n)\n\n// Change corner radius, remove dimmer,\n// and use a shadow instead.\nsheet.appearance.layout.cornerRadius = 24\nsheet.appearance.dimmerColor = nil\nsheet.appearance.elevation = Elevation(\n    xOffset: 0,\n    yOffset: 4,\n    blur: 16,\n    spread: 0,\n    color: .black,\n    opacity: 0.4\n)\nsheet.appearance.presentAnimation = Animation(\n    duration: 0.4, \n    curve: .spring(damping: 0.6, velocity: 0.4)\n)\n\n// Present the sheet with a spring animation.\npresent(sheet, animated: true)\n```\n\nDependencies\n----------\n\nY—BottomSheet depends upon our [Y—CoreUI](https://github.com/yml-org/ycoreui) and [Y—MatterType](https://github.com/yml-org/ymattertype) frameworks (both also open source and Apache 2.0 licensed).\n\nInstallation\n----------\n\nYou can add Y—BottomSheet to an Xcode project by adding it as a package dependency.\n\n1. From the **File** menu, select **Add Packages...**\n2. Enter \"[https://github.com/yml-org/ybottomsheet-ios](https://github.com/yml-org/ybottomsheet-ios)\" into the package repository URL text field\n3. Click **Add Package**\n\nContributing to Y—BottomSheet\n----------\n\n### Requirements\n\n#### SwiftLint (linter)\n```\nbrew install swiftlint\n```\n\n#### Jazzy (documentation)\n```\nsudo gem install jazzy\n```\n\n### Setup\n\nClone the repo and open `Package.swift` in Xcode.\n\n### Versioning strategy\n\nWe utilize [semantic versioning](https://semver.org).\n\n```\n{major}.{minor}.{patch}\n```\n\ne.g.\n\n```\n1.0.5\n```\n\n### Branching strategy\n\nWe utilize a simplified branching strategy for our frameworks.\n\n* main (and development) branch is `main`\n* both feature (and bugfix) branches branch off of `main`\n* feature (and bugfix) branches are merged back into `main` as they are completed and approved.\n* `main` gets tagged with an updated version # for each release\n \n### Branch naming conventions:\n\n```\nfeature/{ticket-number}-{short-description}\nbugfix/{ticket-number}-{short-description}\n```\ne.g.\n```\nfeature/CM-44-button\nbugfix/CM-236-textview-color\n```\n\n### Pull Requests\n\nPrior to submitting a pull request you should:\n\n1. Compile and ensure there are no warnings and no errors.\n2. Run all unit tests and confirm that everything passes.\n3. Check unit test coverage and confirm that all new / modified code is fully covered.\n4. Run `swiftlint` from the command line and confirm that there are no violations.\n5. Run `jazzy` from the command line and confirm that you have 100% documentation coverage.\n6. Consider using `git rebase -i HEAD~{commit-count}` to squash your last {commit-count} commits together into functional chunks.\n7. If HEAD of the parent branch (typically `main`) has been updated since you created your branch, use `git rebase main` to rebase your branch.\n    * _Never_ merge the parent branch into your branch.\n    * _Always_ rebase your branch off of the parent branch.\n\nWhen submitting a pull request:\n\n* Use the [provided pull request template](.github/pull_request_template.md) and populate the Introduction, Purpose, and Scope fields at a minimum.\n* If you're submitting before and after screenshots, movies, or GIF's, enter them in a two-column table so that they can be viewed side-by-side.\n\nWhen merging a pull request:\n\n* Make sure the branch is rebased (not merged) off of the latest HEAD from the parent branch. This keeps our git history easy to read and understand.\n* Make sure the branch is deleted upon merge (should be automatic).\n\n### Releasing new versions\n* Tag the corresponding commit with the new version (e.g. `1.0.5`)\n* Push the local tag to remote\n\nGenerating Documentation (via Jazzy)\n----------\n\nYou can generate your own local set of documentation directly from the source code using the following command from Terminal:\n```\njazzy\n```\nThis generates a set of documentation under `/docs`. The default configuration is set in the default config file `.jazzy.yaml` file.\n\nTo view additional documentation options type:\n```\njazzy --help\n```\nA GitHub Action automatically runs each time a commit is pushed to `main` that runs Jazzy to generate the documentation for our GitHub page at: https://yml-org.github.io/ybottomsheet-ios/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandtheory%2Fybottomsheet-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeandtheory%2Fybottomsheet-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandtheory%2Fybottomsheet-ios/lists"}