{"id":13461322,"url":"https://github.com/bold-commerce/reboron","last_synced_at":"2025-03-24T22:34:34.590Z","repository":{"id":57349087,"uuid":"95618462","full_name":"bold-commerce/reboron","owner":"bold-commerce","description":"A collection of dialog animations with React.js","archived":false,"fork":true,"pushed_at":"2018-04-30T01:45:48.000Z","size":2082,"stargazers_count":28,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-25T06:42:27.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yuanyan/boron","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bold-commerce.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":"2017-06-28T02:03:01.000Z","updated_at":"2024-01-04T15:48:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bold-commerce/reboron","commit_stats":null,"previous_names":["jerairrest/reboron"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bold-commerce%2Freboron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bold-commerce%2Freboron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bold-commerce%2Freboron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bold-commerce%2Freboron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bold-commerce","download_url":"https://codeload.github.com/bold-commerce/reboron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222019227,"owners_count":16917276,"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-07-31T11:00:34.364Z","updated_at":"2024-10-29T08:30:34.707Z","avatar_url":"https://github.com/bold-commerce.png","language":"JavaScript","readme":"Reboron\n=====\nA collection of dialog animations with React.js.\n\n* Demo - [https://jerairrest.github.io/reboron/](https://jerairrest.github.io/reboron/)\n\n## About\nThis is a fork of http://yuanyan.github.io/boron/ that has fixes for the deprecation warnings in React 15.*. I will be working on updating this package to use es6 as well as fixing some of the issues in the main package. PRs welcome!\n\n## Installation\nThe easiest way to use `reboron` is to install it from NPM and include it in your own React build process\n```\nnpm install reboron --save\n```\n\n## Usage\n``` javascript\nimport React, { Component } from 'react';\nimport Modal from 'reboron/DropModal';\n\nclass Example extends Component {\n  constructor(props) {\n    super(props);\n  }\n\n  showModal() {\n    this.refs.modal.show();\n  }\n\n  hideModal() {\n    this.refs.modal.hide();\n  }\n\n  callback(evt) {\n    console.log(evt);\n  }\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cbutton onClick={ () =\u003e this.showModal() }\u003eOpen\u003c/button\u003e\n        \u003cModal ref={ 'modal' } keyboard={ () =\u003e this.callback() }\u003e\n          \u003ch2\u003eI am a dialog\u003c/h2\u003e\n          \u003cbutton onClick={ () =\u003e this.hideModal() }\u003eClose\u003c/button\u003e\n        \u003c/Modal\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nexport default Example;\n```\n\n## Props\n* className - Add custom class name.\n* keyboard - Receive a callback function or a boolean to choose to close the modal when escape key is pressed.\n* backdrop - Includes a backdrop element.\n* closeOnClick - Close the backdrop element when clicked.\n* duration - duration in milliseconds before the modal is hidden\n* onShow - Show callback.\n* onHide - Hide callback. Argument is the source of the hide action, one of:\n  * hide - hide() method is the cause of the hide.\n  * toggle - toggle() method is the cause of the hide\n  * keyboard - keyboard (escape key) is the cause of the hide\n  * backdrop - backdrop click is the cause of the hide\n  * timeout - timeout is the cause of the hide\n  * [any] - custom argument passed by invoking code into the hide() method when called directly.\n* modalStyle - CSS styles to apply to the modal\n* backdropStyle - CSS styles to apply to the backdrop\n* contentStyle - CSS styles to apply to the modal's content\n* rectStyle - CSS styles to apply to the modal's rectangle _(OutlineModal only)_\n\nNote: If the hide() method is called directly, a custom source string can be\npassed as the argument, as noted above. For example, this might be useful if\nif multiple actions could cause the hide and it was desirable to know which of those\nactions was the trigger for the given onHide callback).\n\n# Custom Styles\nObjects consisting of CSS properties/values can be passed as props to the Modal component.\nThe values for the CSS properties will either add new properties or override the default property value set for that Modal type.\n\nModal with 80% width:\n``` javascript\nimport React, { Component } from 'react';\nimport Modal from 'reboron/ScaleModal';\n\n// Style object\nconst modalStyle = {\n  width: '80%',\n};\n\nclass Example extends Component {\n  showModal() {\n    this.refs.modal.show();\n  }\n\n  hideModal() {\n      this.refs.modal.hide();\n  }\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cbutton onClick={ () =\u003e this.showModal() }\u003eOpen\u003c/button\u003e\n        \u003cModal ref={ 'modal' } modalStyle={ modalStyle }\u003e\n          \u003ch2\u003eI am a dialog\u003c/h2\u003e\n          \u003cbutton onClick={ () =\u003e this.hideModal() }\u003eClose\u003c/button\u003e\n        \u003c/Modal\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nexport default Example;\n```\n\nRed backdrop with a blue modal, rotated at 45 degrees:\n\n``` javascript\nimport React, { Component } from 'react';\nimport Modal from 'reboron/FlyModal';\n\n// Individual styles for the modal, modal content, and backdrop\nconst modalStyle = {\n  transform: 'rotate(45deg) translateX(-50%)',\n};\n\nconst backdropStyle = {\n  backgroundColor: 'red',\n};\n\nconst contentStyle = {\n  backgroundColor: 'blue',\n  height: '100%',\n};\n\nclass Example extends Component {\n  showModal() {\n    this.refs.modal.show();\n  }\n\n  hideModal() {\n    this.refs.modal.hide();\n  }\n\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cbutton onClick={ () =\u003e this.showModal() }\u003eOpen\u003c/button\u003e\n        \u003cModal ref={ 'modal' } modalStyle={ modalStyle } backdropStyle={ backdropStyle } contentStyle={ contentStyle }\u003e\n          \u003ch2\u003eI am a dialog\u003c/h2\u003e\n          \u003cbutton onClick={ () =\u003e this.hideModal() }\u003eClose\u003c/button\u003e\n        \u003c/Modal\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nexport default Example;\n```\n\n## Modals\n* DropModal\n* FadeModal\n* FlyModal\n* OutlineModal\n* ScaleModal\n* WaveModal\n\n## License\nReboron is [MIT licensed](./LICENSE).\n","funding_links":[],"categories":["UI Components"],"sub_categories":["Overlay","Dialog/Modal/Alert"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbold-commerce%2Freboron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbold-commerce%2Freboron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbold-commerce%2Freboron/lists"}