{"id":16113166,"url":"https://github.com/joshka/ratatui-widgets","last_synced_at":"2025-05-12T02:31:03.919Z","repository":{"id":217971766,"uuid":"745269919","full_name":"joshka/ratatui-widgets","owner":"joshka","description":"Moved to https://github.com/joshka/tui-framework-experiment/","archived":true,"fork":false,"pushed_at":"2024-12-04T21:36:10.000Z","size":172,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-18T00:38:35.594Z","etag":null,"topics":["cli","ratatui","tui","widgets"],"latest_commit_sha":null,"homepage":"https://github.com/joshka/tui-framework-experiment/","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/joshka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2024-01-19T01:10:07.000Z","updated_at":"2024-12-04T21:36:50.000Z","dependencies_parsed_at":"2024-03-12T08:24:40.007Z","dependency_job_id":"fe17d11e-6aaa-4d54-8fc5-f0dc277f47e4","html_url":"https://github.com/joshka/ratatui-widgets","commit_stats":null,"previous_names":["joshka/ratatui-widgets"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshka%2Fratatui-widgets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshka%2Fratatui-widgets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshka%2Fratatui-widgets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshka%2Fratatui-widgets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshka","download_url":"https://codeload.github.com/joshka/ratatui-widgets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253662578,"owners_count":21944098,"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":["cli","ratatui","tui","widgets"],"created_at":"2024-10-09T20:10:28.471Z","updated_at":"2025-05-12T02:31:03.554Z","avatar_url":"https://github.com/joshka.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- cargo-rdme start --\u003e\n\n# Ratatui-widgets\n\nPlease note: this crate is deprecated so that we can use the name for an internal Ratatui widget\ncrate. Please use [tui-framework-experiment] instead.\n\n[tui-framework-experiment]: https://crates.io/crates/tui-framework-experiment\n\n[![Crates.io Badge]][Crate] [![License Badge]](#license) [![Docs.rs Badge]][API Docs]\u003cbr\u003e\n[![Deps.rs Badge]][Dependencies] [![Codecov.io Badge]][Coverage] [![Discord Badge]][Ratatui\nDiscord]\n\n`ratatui-widgets` is a Rust crate with extra widgets for [Ratatui].\n\n## Installation\n\n```shell\ncargo add ratatui-widgets\n```\n\n## Usage\n\n```rust\n// TODO: Add usage examples\n```\n\n## Example\n\n![Button](https://vhs.charm.sh/vhs-MSE5G9byLklG23xdJwbqR.gif)\n\n[Crates.io Badge]: https://img.shields.io/crates/v/ratatui-widgets?logo=rust\u0026style=for-the-badge\n[License Badge]: https://img.shields.io/crates/l/ratatui-widgets?style=for-the-badge\n[Docs.rs Badge]: https://img.shields.io/docsrs/ratatui-widgets?logo=rust\u0026style=for-the-badge\n[Deps.rs Badge]:\n    https://deps.rs/repo/github/joshka/ratatui-widgets/status.svg?style=for-the-badge\n[Codecov.io Badge]:\n    https://img.shields.io/codecov/c/github/joshka/ratatui-widgets?logo=codecov\u0026style=for-the-badge\u0026token=BAQ8SOKEST\n[Discord Badge]:\n    https://img.shields.io/discord/1070692720437383208?label=ratatui+discord\u0026logo=discord\u0026style=for-the-badge\n\n[Crate]: https://crates.io/crates/ratatui-widgets\n[API Docs]: https://docs.rs/crate/ratatui-widgets/\n[Dependencies]: https://deps.rs/repo/github/joshka/ratatui-widgets\n[Coverage]: https://app.codecov.io/gh/joshka/ratatui-widgets\n[Ratatui Discord]: https://discord.gg/pMCEU9hNEj\n\n[Ratatui]: https://crates.io/crates/ratatui\n\n\u003c!-- cargo-rdme end --\u003e\n\n## Status\n\nThis README sets up an initial goal for a library of widgets to supplement Ratatui. This library\n**will release breaking changes regularly** - move fast and break things. A focus on fast delivery\nrather than gating on perfection is key here. Expect to see releases anytime a feature is changed or\nadded. Release-plz will keep the version updated with respect to semver and will update the\n[CHANGELOG](./CHANGELOG.md) with information from every PR.\n\nThis is not (yet?) an official Ratatui-org project, but may be at some point in the future.\n\n## Features\n\n- Basic event handling abstraction and keyboard / mouse handling\n- Basic buttons\n\n  ```rust\n  let button = Button::new(\"Click me\");\n  ```\n\n- Stack container that handles widgets and layouts\n\n  ```rust\n  let stack = StackContainer::horizontal().with_widgets(vec![\n      (Box::new(Line::raw(\"Left\")), Constraint::Fill(1)),\n      (Box::new(Text::raw(\"Center\")), Constraint::Fill(1)),\n      (Box::new(Span::raw(\"Right\")), Constraint::Fill(1)),\n  ]);\n  ```\n\n## TODO\n\nMost of this list of widgets from\n\u003chttps://en.wikipedia.org/wiki/Graphical_widget#List_of_common_generic_widgets\u003e\n\n- [ ] Create an abstraction over the backend events to an event type for mouse and keyboard events\n  - [x] Crossterm\n  - [ ] Termion\n  - [ ] Termwiz\n  - [ ] Consider how to handle non mouse / keyboard events (resize, paste, focus, etc.)\n- [ ] Support keyboard shortcuts / accellerators for buttons / menus etc.\n- [ ] Consider supporting keyboard customization\n- [ ] Support themes that apply to all the widgets (colors and modifiers)\n- [ ] Decide on how to handle state (StatefulWidget vs other options)\n- [ ] Decide on how to handle events that occur on click / change etc.\n- [ ] Decide how to handle internal state (focus, hover)\n- [ ] Decide how to handle focus order / selection\n- [ ] Decide how containers work generally\n- Buttons\n  - [ ] Button `[Submit]`\n  - [ ] Radio Button `(*) item ( ) item`\n  - [ ] Check Box `[x] item`\n  - [X] Toggle Switch `\u003c_ON_ / OFF \u003e`\n  - [ ] Toggle Button `[ON]`\n  - [ ] Split Button `[Submit][↓]`\n  - [ ] Cycle Button `[Red]` =\u003e `[Green]` =\u003e `[Blue]`\n- [ ] Slider `[------------|---------------]`\n- [ ] List Box (low priority as there is already one in core)\n- [ ] Spinner `[123][+][-]`\n- [ ] Drop-down List `[Selected Item][↓]`\n- [ ] Menu\n  - [ ] Context Menu\n  - [ ] Pie Menu (probably not worth it in the console, but perhaps there's uses for something similar)\n- [ ] Menu Bar (\u003chttps://crates.io/crates/tui-menu\u003e might be worth bringing in)\n- [ ] Tool Bar (good for mouse UIs, bad for keyboard)\n  - [ ] Ribbon (same)\n- [ ] Combo Box `[____________][↓]`\n- [ ] Icon (not sure what use we'd see out of this one)\n- [ ] Tree View (\u003chttps://crates.io/crates/tui-tree-widget\u003e)\n- [ ] Tree map (not listed on wiki page, but \u003chttps://crates.io/crates/tui-treemap\u003e)\n- [ ] Grid View / DataGrid (similar to the built-in table, but we can do much more with this)\n- [ ] Link `\u003cgo here\u003e` (integrate with OSC 8)\n- [ ] Tab (compared to the built-in Tabs, this would be a container widget)\n- [ ] ScrollBar (built-in)\n- [ ] Text Box (\u003chttps://crates.io/crates/tui-textarea\u003e \u003chttps://crates.io/crates/tui-input\u003e)\n- [ ] Label (mostly the same as just a Paragraph, but links to another field)\n- [ ] Tooltip (displayed underneath when field is focused - dim text etc.)\n- [ ] Balloon help (similar to tooltip - perhaps this is a larger popup for help that has to be dismissed)\n- [ ] Status Bar (Mostly useful for putting a background, and adding multiple elements that are auto\n      spaced)\n- [ ] Progress Bar (Gauge / Linegauge, but optimised for time / progress)\n- [ ] Infobar - like a popup or flash element, but generally non modal, dismissable, top of screen\n- Containers\n  - [ ] Window (not sure we need this concept, but could be useful as a top-level idea)\n  - [ ] Collapsible Panel - VSCode like panels\n    - [ ] Drawers - related to panels - unsure where the distinction of this lies\n  - [ ] Accordion - Vertically stacked list of items that can be expanded by selection\n  - [ ] Modal Window - Popup that contains other elements\n  - [ ] Dialog Box - Display info in a popup and wait for a response\n        (\u003chttps://crates.io/crates/tui-confirm-dialog\u003e \u003chttps://crates.io/crates/tui-file-dialog\u003e)\n  - [ ] Popup (not in wikipedia, \u003chttps://crates.io/crates/tui-popup\u003e)\n  - [ ] Palette Window / Utility Window - floating window with commands / buttons\n  - [ ] Inspector Window - shows info about the selected item elsewhere (perhaps useful as a\n        debugging tool)\n  - [ ] Frame - Grouping mechanism - perhaps this is a border with a title and acts as a container\n  - [ ] Canvas (built-in perhaps)\n  - [ ] Cover flow - large selection usually with images / snapshots horizontal scroll\n  - [ ] Bubble flow - discussion thread (example \u003chttps://github.com/dustinblackman/oatmeal\u003e)\n  - [ ] Carousel - Display Visual Cards - different from cover flow in that it displays multiple\n        cards at once\n  - [ ] Scrollview - not in the wikipedia article, but \u003chttps://crates.io/crates/tui-scrollview\u003e\n- [ ] Suggestions for other items welcome!\n\n## License\n\nCopyright (c) 2024 Josh McKinney\n\nThis project is licensed under either of:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the\nwork by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshka%2Fratatui-widgets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshka%2Fratatui-widgets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshka%2Fratatui-widgets/lists"}