{"id":13547024,"url":"https://github.com/mythitorium/egui-grid","last_synced_at":"2025-12-12T11:46:48.532Z","repository":{"id":170597424,"uuid":"626325968","full_name":"mythitorium/egui-grid","owner":"mythitorium","description":"Create dynamic grid-based layouts for egui","archived":false,"fork":false,"pushed_at":"2024-01-25T20:27:41.000Z","size":40,"stargazers_count":23,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-14T16:23:44.668Z","etag":null,"topics":["egui","gui","rust","ui"],"latest_commit_sha":null,"homepage":"","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/mythitorium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-11T08:40:38.000Z","updated_at":"2024-06-06T21:26:23.795Z","dependencies_parsed_at":null,"dependency_job_id":"3f25d265-6fc6-4671-9501-a986165ebac7","html_url":"https://github.com/mythitorium/egui-grid","commit_stats":null,"previous_names":["mythitorium/egui-grid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mythitorium%2Fegui-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mythitorium%2Fegui-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mythitorium%2Fegui-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mythitorium%2Fegui-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mythitorium","download_url":"https://codeload.github.com/mythitorium/egui-grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246880171,"owners_count":20848819,"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":["egui","gui","rust","ui"],"created_at":"2024-08-01T12:00:49.687Z","updated_at":"2025-12-12T11:46:43.488Z","avatar_url":"https://github.com/mythitorium.png","language":"Rust","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# egui_grid\n\n[![Latest version](https://img.shields.io/crates/v/egui_grid.svg)](https://crates.io/crates/egui_grid)\n[![Documentation](https://docs.rs/egui_grid/badge.svg)](https://docs.rs/egui_grid)\n\nCreate dynamic grid layouts for [`egui`](https://github.com/emilk/egui).\n\nGrids are flexible, easy to create, with behavior similar to egui_extra's strip creation. They're compact and allow for more complex layouts using less indentation,\nwith functionalities like nesting grids and aligning cells within a row.\n\n## Installing\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\negui_grid = \"0.5.2\"\n```\n\n## Example\n\n``` rust\n// Quick example, by no means does it fully demo\n// how flexible building grids can be.\nuse egui_grid::GridBuilder;\nuse egui_extras::Size;\n\nGridBuilder::new()\n    // Allocate a new row\n    .new_row(Size::exact(200.0))\n    // Give this row a couple cells\n    .cell(Size::exact(85.0))\n    .cell(Size::remainder())\n    // Allocate another row\n    .new_row(Size::remainder())\n    // Batch method, allocate multiple cells at once\n    .cells(Size::remainder(), 3)\n    .show(ui, |mut grid| {\n        // Cells are represented as they were allocated\n        grid.cell(|ui| {\n            ui.label(\"Top row, left cell\");\n        });\n        grid.cell(|ui| {\n            ui.label(\"Top row, right cell\");\n        });\n        grid.cell(|ui| {\n            ui.label(\"Bottom row, left cell\");\n        });\n        grid.empty();\n        grid.cell(|ui| {\n            ui.label(\"Bottom row, right cell\");\n        });\n    });\n```\n\n### Grid Nesting Example \n\n```rust\n// You can nest grids, allowing for complex layouts without much indentation\nuse egui_grid::GridBuilder;\nuse egui_extras::Size;\n\n// The grid which will be nested\nlet nested_grid = GridBuilder::new()\n    // 2 rows, with 1 cell each\n    .new_row(Size::remainder()).cell(Size::remainder())\n    .new_row(Size::remainder()).cell(Size::remainder());\n\n\n// The main grid, of which one cell will receive the nested grid\nGridBuilder::new()\n    // One row with 3 cells\n    .new_row(Size::remainder())\n    .cell(Size::remainder())\n    .cell(Size::remainder()) .nest(nested_grid) // Nesting the grid in the middle cell\n    .cell(Size::remainder())\n\n    .show(ui, |mut grid| {\n        // The nested grid replaces the cell it was nested in; \n        // And the cells within that nested grid replace it in the order, too.\n        //\n        // So despite there being 5 cells allocated total \n        // (2 from the nested grid and 3 from the main), only 4 exist.\n        grid.cell(|ui| {\n            ui.label(\"Left cell\");\n        });\n        grid.cell(|ui| {\n            ui.label(\"Nested grid, top cell\");\n        });\n        grid.cell(|ui| {\n            ui.label(\"Nested grid, bottom cell\");\n        });\n        grid.cell(|ui| {\n            ui.label(\"Right cell\");\n        });\n    });\n```\n\n## Usage\n\nCheck the [docs](https://docs.rs/egui_grid/latest/egui_grid/) for details and more info on usage.\n\n## Issues\n\nCurrently this is feature complete. Bug fixes, optimizations, and staying up to date with [egui](https://github.com/emilk/egui) releases are the only ways this crate will be expanding for the foreseeable future.\n\nWhile you are free to open an issue, contacting me (@mythit) on the [egui discord server](https://discord.gg/wdkZkEdXks) might be more worth your time.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmythitorium%2Fegui-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmythitorium%2Fegui-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmythitorium%2Fegui-grid/lists"}