{"id":15137875,"url":"https://github.com/rustunit/bevy_web_popups","last_synced_at":"2025-10-23T13:30:53.485Z","repository":{"id":255347854,"uuid":"849177453","full_name":"rustunit/bevy_web_popups","owner":"rustunit","description":"Allows to trigger web/dom based popups/alerts and textinput in bevy","archived":false,"fork":false,"pushed_at":"2025-01-13T17:09:05.000Z","size":2094,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T01:54:32.687Z","etag":null,"topics":["bevy","gamedev","web","webdev"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bevy_web_popups","language":"Rust","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/rustunit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rustunit"}},"created_at":"2024-08-29T05:47:31.000Z","updated_at":"2025-01-13T17:09:08.000Z","dependencies_parsed_at":"2024-08-29T12:46:36.279Z","dependency_job_id":"7daf7a95-75ca-47be-ba0d-ace6d2be7929","html_url":"https://github.com/rustunit/bevy_web_popups","commit_stats":{"total_commits":15,"total_committers":4,"mean_commits":3.75,"dds":0.2666666666666667,"last_synced_commit":"7332d450142c87d1a3047a035cd254b49bf4345b"},"previous_names":["rustunit/bevy_web_popups"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_web_popups","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_web_popups/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_web_popups/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustunit%2Fbevy_web_popups/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustunit","download_url":"https://codeload.github.com/rustunit/bevy_web_popups/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237834629,"owners_count":19373759,"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":["bevy","gamedev","web","webdev"],"created_at":"2024-09-26T07:03:03.642Z","updated_at":"2025-10-23T13:30:53.480Z","avatar_url":"https://github.com/rustunit.png","language":"Rust","readme":"# bevy_web_popups\n\n[![crates.io][sh_crates]][lk_crates]\n[![docs.rs][sh_docs]][lk_docs]\n[![discord][sh_discord]][lk_discord]\n\n[sh_crates]: https://img.shields.io/crates/v/bevy_web_popups.svg\n[lk_crates]: https://crates.io/crates/bevy_web_popups\n[sh_docs]: https://img.shields.io/docsrs/bevy_web_popups\n[lk_docs]: https://docs.rs/bevy_web_popups/latest/bevy_web_popups/\n[sh_discord]: https://img.shields.io/discord/1176858176897953872?label=discord\u0026color=5561E6\n[lk_discord]: https://discord.gg/rQNeEnMhus\n\nAllows to trigger web/dom based popups/alerts and textinput in bevy using wasm-bindgen's [web_sys](https://docs.rs/web-sys/latest/web_sys/).\nIt is fully customizable but comes with a batteries included default style (see demo below).\n\nSee the crate in action in [TinyTakeoff](www.tinytakeoff.com):\n\n![demo](./assets/demo.gif)\n\n## Features\n* `window.alert()`\n* popup dialog with background darkening, textinput, cancel and ok button (fully customizable)\n\n## Usage\n\nAdd dependency: `cargo add bevy_web_popups`\n\nInitialize Bevy Plugin:\n\n```rust\n// request initialisation right on startup\napp.add_plugins(WebAlertsPlugin);\napp.observe(on_event);\n```\n\n```rust\nfn bevy_system() {\n    // trigger native browser alert message popup\n    bevy_web_popups::alert(\"important msg\");\n\n    // trigger complex text input popup with a custom title, custom labels for the buttons and asking to spawn default css classes instead of specifying them ourselfs\n    bevy_web_popups::show_textinput(\"set nickname:\", \"ok\", \"cancel\", true);\n}\n\n// system processing events coming from the web plugin\nfn on_event(\n    trigger: Trigger\u003cWebAlertResponse\u003e,\n) {\n    let e = trigger.event()\n\n    if let WebAlertResponse::InputOk(text) = e {\n        info!(\"user confirmed with text: {text}\");\n    }\n}\n```\n\n## Our Other Crates\n\n- [bevy_debug_log](https://github.com/rustunit/bevy_debug_log)\n- [bevy_device_lang](https://github.com/rustunit/bevy_device_lang)\n- [bevy_libgdx_atlas](https://github.com/rustunit/bevy_libgdx_atlas)\n- [bevy_ios_iap](https://github.com/rustunit/bevy_ios_iap)\n- [bevy_ios_review](https://github.com/rustunit/bevy_ios_review)\n- [bevy_ios_gamecenter](https://github.com/rustunit/bevy_ios_gamecenter)\n- [bevy_ios_alerts](https://github.com/rustunit/bevy_ios_alerts)\n- [bevy_ios_notifications](https://github.com/rustunit/bevy_ios_notifications)\n- [bevy_ios_impact](https://github.com/rustunit/bevy_ios_impact)\n- [bevy_ios_safearea](https://github.com/rustunit/bevy_ios_safearea)\n\n## Bevy version support\n\n|bevy|this crate|\n|---|---|\n|0.17|0.6,main|\n|0.16|0.5|\n|0.15|0.4|\n|0.14|0.2,0.3|\n|0.13|0.1|\n\n# License\n\nAll code in this repository is dual-licensed under either:\n\n- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)\n- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n\nat your option. This means you can select the license you prefer.\n\n## Your contributions\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","funding_links":["https://github.com/sponsors/rustunit"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustunit%2Fbevy_web_popups","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustunit%2Fbevy_web_popups","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustunit%2Fbevy_web_popups/lists"}