{"id":13703209,"url":"https://github.com/jacklein/rn-bottom-drawer","last_synced_at":"2025-05-05T07:30:38.374Z","repository":{"id":33786103,"uuid":"162215327","full_name":"jacklein/rn-bottom-drawer","owner":"jacklein","description":"a react native bottom drawer component","archived":false,"fork":false,"pushed_at":"2023-01-26T15:54:45.000Z","size":5566,"stargazers_count":187,"open_issues_count":35,"forks_count":84,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-13T10:37:52.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jacklein.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}},"created_at":"2018-12-18T01:58:54.000Z","updated_at":"2024-11-06T11:17:50.000Z","dependencies_parsed_at":"2023-02-14T19:16:06.290Z","dependency_job_id":null,"html_url":"https://github.com/jacklein/rn-bottom-drawer","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/jacklein%2Frn-bottom-drawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklein%2Frn-bottom-drawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklein%2Frn-bottom-drawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklein%2Frn-bottom-drawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacklein","download_url":"https://codeload.github.com/jacklein/rn-bottom-drawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252458326,"owners_count":21751017,"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":[],"created_at":"2024-08-02T21:00:51.879Z","updated_at":"2025-05-05T07:30:37.986Z","avatar_url":"https://github.com/jacklein.png","language":"JavaScript","funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Bottom drawer for React Native\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"demo.gif\" alt=\"Demo gif\" width=\"300\" /\u003e\n\u003c/p\u003e\n\n## Content\n\n- [Installation](#installation)\n- [Usage example](#usage-example)\n- [Configuration](#configuration)\n- [Questions?](#questions)\n\n## Installation\n\nInstall `rn-bottom-drawer`.\n\n```\nnpm install rn-bottom-drawer --save\n```\n\n## Usage Example\n(go to the example folder for a more fleshed out example)\n\n```javascript\nimport React from 'react';\nimport { View, Text } from 'react-native';\nimport BottomDrawer from 'rn-bottom-drawer';\n\nconst TAB_BAR_HEIGHT = 49;\n\nexport default class App extends React.Component {\n  renderContent = () =\u003e {\n    return (\n      \u003cView\u003e\n        \u003cText\u003eGet directions to your location\u003c/Text\u003e\n      \u003c/View\u003e\n    )\n  }\n\n  render() {\n    return (\n      \u003cBottomDrawer\n        containerHeight={100}\n        offset={TAB_BAR_HEIGHT}\n      \u003e\n        {this.renderContent()}\n      \u003c/BottomDrawer\u003e\n    )\n  }\n}\n\n```\n[Refer to this code](https://github.com/jacklein/rn-bottom-drawer/issues/7#issuecomment-465554054) if you want to put a **scrollview** within the bottom drawer\n\n## Configuration\n\n| Prop | Type | Default | Description |\n| ---- | ---- | ----| ---- |\n| containerHeight | number | -- | The height of the drawer. | \n| offset | number | 0 | If your app uses tab navigation or a header, **offset** equals their combined heights. In the demo gif, the offset is the header + tab heights so that the drawer renders correctly within the map view. |\n| downDisplay | number | containerHeight / 1.5 | When the drawer is swiped into down position, **downDisplay** controls how far it settles below its up position. For example, if its value is 20, the drawer will settle 20 points below the up position. The default value shows 1/3 of the container (if containerHeight = 60, the default downDisplay value = 40). |\n| backgroundColor | string | '#ffffff' | The background color of the drawer. |\n| startUp | bool | true | If **true**, the drawer will start in up position. If **false**, it will start in down position. |\n| roundedEdges | bool | true | If **true**, the top of the drawer will have rounded edges. |\n| shadow | bool | true | if **true**, the top of the drawer will have a shadow. |\n| onExpanded | func | -- | A callback function triggered when the drawer is swiped into up position |\n| onCollapsed | func | -- | A callback function triggered when the drawer is swiped into down position |\n\n### Questions?\nFeel free to contact me at [jackdillklein@gmail.com](mailto:jackdillklein@gmail.com) or [create an issue](https://github.com/jacklein/rn-bottom-drawer/issues/new)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklein%2Frn-bottom-drawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacklein%2Frn-bottom-drawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklein%2Frn-bottom-drawer/lists"}