https://github.com/ickshonpe/bevy_ui_text_input
https://github.com/ickshonpe/bevy_ui_text_input
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ickshonpe/bevy_ui_text_input
- Owner: ickshonpe
- License: mit
- Created: 2025-04-11T21:55:13.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-04-26T08:58:06.000Z (about 1 month ago)
- Last Synced: 2025-04-26T09:32:39.059Z (about 1 month ago)
- Language: Rust
- Size: 663 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bevy - `bevy_ui_text_input`
README
## Bevy UI Text Input
Text input crate for Bevy UI using cosmic text.

#### Basic usage
Spawn a `TextInputNode` component to create a text input:
```
commands
.spawn((
TextInputNode::default(),
Node {
width: Val::Px(500.),
height: Val::Px(250.),
..default()
},
))
```The size has to be set using `Node`, there isn't any support for responsive sizing yet.
The active text input is set using the `ActiveTextInput` resource. Inputs can also be set to activate on clicks.There are a couple of examples, `text_input` is the most complete:
```
cargo run --example text_input
```#### Features
* Undo and redo
* Text selection with keyboard and mouse
* Overwrite and insert edit modes
* Horizontally scrolling single line input
* Validated integer, decimal and hexadecimal input modes
* Vertical and horizontal scrolling
* Cut, copy, and paste with clipboard support
* Display prompt when empty
* Keyboard navigation supports page up & down, home & End, next & previous word, buffer start & end and scroll up & down
* Mouse wheel scrolling
* Max characters limit#### Problems + Bugs
* Overwrite cursor becomes an insert cursor at the end of lines.
* Scrolling can be glitchy if the line height isn't an exact divisor of the input box.
* The plugin can't access any existing `FontAtlasSet`s from `bevy_text` and has to create its own atlases for any fonts it uses.#### Not supported (at least yet)
* IME
* Responsive sizing
* Rich text
* Syntax highlighting
* World UI
* Text2d
* Onscreen keyboard