{"id":16152545,"url":"https://github.com/shilza/react-pretty-drawer","last_synced_at":"2025-03-18T19:31:24.093Z","repository":{"id":34290912,"uuid":"174744955","full_name":"Shilza/react-pretty-drawer","owner":"Shilza","description":"Simple and pretty React drawer","archived":false,"fork":false,"pushed_at":"2022-12-09T15:14:31.000Z","size":1812,"stargazers_count":9,"open_issues_count":26,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T11:49:28.822Z","etag":null,"topics":["component-library","javascript","react","web"],"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/Shilza.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":"2019-03-09T20:52:20.000Z","updated_at":"2023-07-23T18:41:48.000Z","dependencies_parsed_at":"2023-01-15T06:00:45.680Z","dependency_job_id":null,"html_url":"https://github.com/Shilza/react-pretty-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/Shilza%2Freact-pretty-drawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shilza%2Freact-pretty-drawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shilza%2Freact-pretty-drawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shilza%2Freact-pretty-drawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shilza","download_url":"https://codeload.github.com/Shilza/react-pretty-drawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945626,"owners_count":20372897,"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":["component-library","javascript","react","web"],"created_at":"2024-10-10T01:07:59.224Z","updated_at":"2025-03-18T19:31:23.772Z","avatar_url":"https://github.com/Shilza.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚛️ react-pretty-drawer\nSimple and pretty React drawer component. View [demo](https://shilza.github.io/react-pretty-drawer/)\n## 📦 Install\nThe easiest way to use react-pretty-drawer is to install it from npm and include it in your React build process\n\n`$ npm install --save react-pretty-drawer`  \n\n`$ yarn add react-pretty-drawer`\n\n## Features\n- [x] Open-close animation\n- [x] Closable dialog\n- [x] Available for customization\n\n## Usage\n```javascript\nimport React, {useState} from 'react';\nimport * as ReactDOM from \"react-dom\";\nimport {Drawer} from 'react-pretty-drawer';\n\nconst Example = () =\u003e {\n    let [visible, setIsVisible] = useState(false);\n\n    const closeDrawer = () =\u003e setIsVisible(false);\n    const openDrawer = () =\u003e setIsVisible(true);\n\n    return (\n        \u003c\u003e\n            \u003cDrawer\n                visible={visible}\n                onClose={closeDrawer}\n            \u003e\n                \u003cdiv\u003eDrawer body\u003c/div\u003e\n            \u003c/Drawer\u003e\n            \u003cbutton onClick={openDrawer}\u003eOpen\u003c/button\u003e\n        \u003c/\u003e\n    );\n};\n\nReactDOM.render(\u003cExample /\u003e, document.getElementById(\"root\"));\n```\n## API\n| Props  | Description  | Type | Default |\n| :------------: |:-----------:| :-----:|:--------:|\n| closable     | Whether show or not the close button on top right of the Drawer dialog| boolean | false |\n| mask     | Whether to show mask or not        |   boolean | true |\n| maskStyle | Style for Drawer`s mask  |  object | rgba(0, 0, 0, 0.3) |\n| visible | Whether the Drawer dialog is visible or not |  boolean | false |\n| height | Height of the Drawer dialog  |  string  number | 256px 100%|\n| width | Width of the Drawer dialog |  string number | 256px 100% |\n| placement | The placement of the Drawer  | 'top'  'right'  'bottom'  'left' | 'left' |\n| onClose | Specify a callback that will be called when a user clicks mask or close button |  function | - |\n| zIndex | The `z-index` of the Drawer.  |  number | 1000 |\n| style | The `style` of the body wrapper.  |  object | - |\n| className | The `class` of the body wrapper.  |  string | - |\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshilza%2Freact-pretty-drawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshilza%2Freact-pretty-drawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshilza%2Freact-pretty-drawer/lists"}