{"id":21985555,"url":"https://github.com/ickshonpe/bevy_ui_borders","last_synced_at":"2025-04-30T07:53:29.821Z","repository":{"id":97322205,"uuid":"608627988","full_name":"ickshonpe/bevy_ui_borders","owner":"ickshonpe","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-18T15:39:23.000Z","size":42,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T18:43:34.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/ickshonpe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-02T12:15:20.000Z","updated_at":"2023-07-08T22:01:58.000Z","dependencies_parsed_at":"2024-11-16T18:41:31.752Z","dependency_job_id":"bc37a6a9-db04-47fe-93af-711688290704","html_url":"https://github.com/ickshonpe/bevy_ui_borders","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"8cc8c0e635de3c52a9b1ee3de0fed5f4dd22aad6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_borders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_borders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_borders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_borders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ickshonpe","download_url":"https://codeload.github.com/ickshonpe/bevy_ui_borders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227185421,"owners_count":17744371,"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-11-29T18:14:02.204Z","updated_at":"2024-11-29T18:14:02.893Z","avatar_url":"https://github.com/ickshonpe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bevy_ui_borders\n[![crates.io](https://img.shields.io/crates/v/bevy_ui_borders)](https://crates.io/crates/bevy_ui_borders)\n[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/ickshonpe/bevy_ui_borders)\n[![crates.io](https://img.shields.io/crates/d/bevy_ui_borders)](https://crates.io/crates/bevy_ui_borders)\n\n## Draw borders around Bevy UI Nodes\n\n![image](borders_example.png)\n\n* A Bevy plugin that adds border and outline rendering to UI nodes.\n\n* Supports Bevy 0.10\n\n* Only supports solid one-colour borders due to the limitations of the current Bevy UI renderer.\n\n\n#\n## Usage\n\nAdd the dependency to your Bevy project:\n\n```\ncargo add bevy_ui_borders\n```\n\nTo display a bordered UI node:\n* Add the `BordersPlugin` plugin to your app.\n* Spawn an entity with a `BorderColor` component and a `NodeBundle` where the `border` field of its `Style` component is set to a non-zero thickness.\n\n## Components\n\n* `BorderColor`: Defines the color of a UI node's border.\n* `Outline`: Specifies the color and thickness of the outline around the UI node's border.\n\n## Bundles\n* `BorderedNodeBundle`: A bundle for creating UI nodes with a border and outline.\n* `BorderBundle`: A bundle for adding border and outline components to an existing UI node.\n\n\n\n## Example\n\nTo draw a white UI node with a red border:\n\n```rust\nuse bevy::prelude::*;\nuse bevy_ui_borders::*;\n\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .add_plugin(BordersPlugin)\n        .add_startup_system(spawn_example)\n        .run();\n}\n\nfn spawn_example(mut commands: Commands) {\n    commands.spawn(Camera2dBundle::default());\n    commands.spawn((\n        NodeBundle {\n            style: Style {\n                size: Size::new(Val::Px(100.), Val::Px(100.)),\n                margin: UiRect::all(Val::Px(100.)),\n                border: UiRect::all(Val::Px(10.)),\n                ..Default::default()\n            },\n            background_color: Color::WHITE.into(),\n            ..Default::default()\n        },\n        BorderColor(Color::RED),\n    ));       \n}\n```\n\n\n#\n## Examples\n\n```\ncargo --run --example minimal\ncargo --run --example tiles\ncargo --run --example outlines\ncargo --run --example stress\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fbevy_ui_borders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fickshonpe%2Fbevy_ui_borders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fbevy_ui_borders/lists"}