Skip to content

Add text input example using tui-textarea#74

Merged
orhun merged 4 commits intoratatui:mainfrom
reubeno:text-input
Apr 9, 2025
Merged

Add text input example using tui-textarea#74
orhun merged 4 commits intoratatui:mainfrom
reubeno:text-input

Conversation

@reubeno
Copy link
Copy Markdown
Contributor

@reubeno reubeno commented Apr 8, 2025

Includes these two changes:

  • Adds a textarea example using tui-textarea, which conveniently allows pluggable input.
  • Adds support for REVERSE modifier to both backends; this seems to be used by many input widgets to render cursors, and is needed for this example.

Please let me know if you'd prefer this be split up into multiple separate PRs. And of course, would be great to get any feedback! This was the first step for me to experiment with using ratzilla to run an interactive shell.

Screenshot:
image

Copy link
Copy Markdown
Member

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested it and this looks good to me overall!

Had some suggestions for improvements :)

Comment thread examples/textarea/src/main.rs Outdated
Comment thread examples/textarea/Cargo.toml Outdated
Comment thread examples/textarea/index.html Outdated
Comment thread examples/textarea/src/main.rs Outdated
Comment thread examples/textarea/src/main.rs Outdated
Comment thread examples/textarea/src/main.rs Outdated
Comment thread examples/textarea/Cargo.toml
Comment thread src/backend/utils.rs
@orhun orhun mentioned this pull request Apr 8, 2025
reubeno and others added 2 commits April 8, 2025 16:01
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
@reubeno
Copy link
Copy Markdown
Contributor Author

reubeno commented Apr 8, 2025

@orhun Thanks for the quick feedback and suggestions! I've accepted your suggestions, renamed the example (textarea -> text_area), and made it more consistent with other examples in using ratzilla::ratatui.

Don't hesitate to let me know if there are any other adjustments you'd like me to make.

Copy link
Copy Markdown
Member

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff, thanks!

@orhun orhun merged commit 0d9fe91 into ratatui:main Apr 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants