charmbracelet / charmbracelet/bubbles

styled placeholders

Open
#517 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
8.9k
Forks
457
Avg merge
1d 18h
Merged PRs (30d)
5

Description

```go
m.input.SetValue(lipgloss.NewStyle().
Background(lipgloss.Color("#00ff00")).
Render("hah"))
```
![image](https://github.com/charmbracelet/bubbles/assets/52699584/c2ab70c1-129c-46aa-9b22-e53ebf9d92af)
Instead of using `textinput.Model.TextStyle` to style the whole text, one may want to only style certain words for example.

I think it might be in [styleText](https://github.com/charmbracelet/bubbles/blob/master/textinput/textinput.go#L653) because escape sequences are being applied to a lipgloss styled string.

- OS [Arch]
- Shell [zsh, fish]
- Terminal Emulator [Alacritty]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.