Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

placeholder text support #15

Closed
wants to merge 1 commit into from
Closed

placeholder text support #15

wants to merge 1 commit into from

Conversation

pm100
Copy link
Contributor

@pm100 pm100 commented Apr 29, 2023

in order to cleanly integrate tui-textarea into another tool (gitui https://github.com/extrawurst/gitui) I need this feature.

It is like the html input tag placeholder feature, text is displayed dimmed in the input box as a hint of what to enter. Once text is entered the hint is removed

placeholder

I had to slightly modify how the text and its surrounding block are displayed. it is very tricky to get precise control. over the text style of the paragraph and its containing block otherwise. I placed a link to the discussion about this topic with ratatui team. ratatui-org/ratatui#144

I added 2 samples of a popup dialog with the new feature. I also added it to the single_line sample as that seemed a good fit

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.

None yet

1 participant