{"id":29733581,"url":"https://github.com/awmpietro/bootbox-react","last_synced_at":"2026-05-19T04:10:45.068Z","repository":{"id":41677327,"uuid":"253921728","full_name":"awmpietro/bootbox-react","owner":"awmpietro","description":"bootbox-react is a React Component based on bootboxjs \u003chttp://bootboxjs.com\u003e library. This library brings fancy alerts, confirm and prompt dialogs built on top of Bootstrap. Check the website for more information.","archived":false,"fork":false,"pushed_at":"2022-12-05T19:01:04.000Z","size":2162,"stargazers_count":2,"open_issues_count":10,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-08T16:50:18.215Z","etag":null,"topics":["bootbox","bootstrap","bootstrap-dialog","modal-dialogs","react-component"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awmpietro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-07T22:00:19.000Z","updated_at":"2022-09-15T17:01:04.000Z","dependencies_parsed_at":"2023-01-24T06:45:08.931Z","dependency_job_id":null,"html_url":"https://github.com/awmpietro/bootbox-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/awmpietro/bootbox-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awmpietro%2Fbootbox-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awmpietro%2Fbootbox-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awmpietro%2Fbootbox-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awmpietro%2Fbootbox-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awmpietro","download_url":"https://codeload.github.com/awmpietro/bootbox-react/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awmpietro%2Fbootbox-react/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266990434,"owners_count":24017722,"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-07-25T02:00:09.625Z","response_time":70,"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":["bootbox","bootstrap","bootstrap-dialog","modal-dialogs","react-component"],"created_at":"2025-07-25T10:01:52.425Z","updated_at":"2026-05-19T04:10:40.028Z","avatar_url":"https://github.com/awmpietro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bootbox React\nbootbox-react is a wrapper of the **bootboxjs \u003c[http://bootboxjs.com](http://bootboxjs.com)\u003e** module for React. \nFancy alerts, confirm and prompt dialogs built on top of Bootstrap. Check the website for more information.\n\n## How To Install\n\n- Install:\n`npm i --save bootbox-react`\n\n## How to Use\n\n```\nimport  React, {useState} from  'react';\nimport  Bootbox  from  'bootbox-react';\n...\nfunction  App() {\n\tconst [showConfirm, setShowConfirm] = useState(false);\n\tconst [showAlert, setShowAlert] = useState(false)\n\tconst [showPrompt, setShowPrompt] = useState(false)\n\t\n\tconst handleConfirm = () =\u003e {\n\t\tconsole.log(\"You clicked Yes!\");\n\t\treturn setShowConfirm(false);\n\t}\n\t\n\tconst handleCancel = () =\u003e {\n\t\tconsole.log(\"You clicked No!\");\n\t\treturn setShowConfirm(false);\n\t}\n\n\tconst handleClose = () =\u003e {\n\t\tconsole.log(\"You closed Alert!\");\n\t\treturn setShowAlert(false);\n\t}\n\n\tconst handlePrompt = (result) =\u003e {\n\t\tconsole.log(`User input: ${result}`);\n\t\treturn setShowPrompt(false);\n\t}\n\n\treturn(\n\t\t\u003c\u003e\n\t\t\t\u003cbutton onClick={ () =\u003e setShowConfirm(true) } Confirm \u003c/button\u003e\n\t\t\t\u003cBootbox show={showConfirm} \n\t\t\t\ttype={\"confirm\"}  \n\t\t\t\tmessage={\"Do That?\"}  \n\t\t\t\tonSuccess={handleYes}  \n\t\t\t\tonCancel={handleNo}  \n\t\t\t\tonClose={handleNo} \n\t\t\t/\u003e\n\n\t\t\t\u003cbutton onClick={ () =\u003e setShowAlert(true) } Alert \u003c/button\u003e\n\t\t\t\u003cBootbox show={showAlert} \n\t\t\t\ttype={\"alert\"}  \n\t\t\t\tmessage={\"This is a simple alert\"}  \n\t\t\t\tonClose={handleClose} \n\t\t\t/\u003e\n\n\t\t\t\u003cbutton onClick={ () =\u003e setShowPrompt(true) } Prompt \u003c/button\u003e\n\t\t\t\u003cBootbox show={showPrompt} \n\t\t\t\ttype={\"prompt\"}  \n\t\t\t\tmessage={\"What's your name\"}  \n\t\t\t\tonPrompt={handlePrompt} \n\t\t\t/\u003e\n\t\t\u003c/\u003e\n\t)\n}\n\nexport default App\n\t\n```\n## Props\n| Name            | show        | type                         | message        | onSuccess                       | onCancel                       | onClose                                      | onPrompt                                 | cancelClassNames                      | successClassNames                      | cancelLabel                          | successLabel                          |\n|-----------------|-------------|------------------------------|----------------|---------------------------------|--------------------------------|----------------------------------------------|------------------------------------------|---------------------------------------|----------------------------------------|--------------------------------------|---------------------------------------|\n| PropType        | bool        | string                       | string         | function                        | function                       | function                                     | function                                 | string                                | string                                 | string                               | string                                |\n| Is Required     | required    | required                     | required       | required for 'confirm'          | required for 'confirm'         | required for 'alert', optional for others    | required for 'prompt'                    | optional                              | optional                               | optional                             | optional                              |\n| Accepted Values | true, false | \"alert\", \"confirm\", \"prompt\" | \"Your message\" | callback function to handle Yes | callback function to handle No | callback function to call when box is closed | callback function to handle user's input | classname(s) to apply to \"No\" button\" | classname(s) to apply to \"Yes\" button\" | Custom label to apply to \"No\" button | Custom label to apply to \"Yes\" button |\n| Default         | false       | null                         | \"\"             | null                            | null                           | null                                         | null                                     | \"btn-danger\"                          | \"btn-primary\"                          | \"No\"                                 | \"Yes\"                                 |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawmpietro%2Fbootbox-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawmpietro%2Fbootbox-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawmpietro%2Fbootbox-react/lists"}