charmbracelet / charmbracelet/bubbles

feat: add alignment to table cells

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

Description

**Is your feature request related to a problem? Please describe.**
I would like to align text in my table, preferably per column but a table-level alignment also works.

**Describe the solution you'd like**
It would be nice if we could align the text in a table. It could be per-column or the entire row, depending on complexity.

**Describe alternatives you've considered**
Tried to set `table.Cell.AlignRight(true)` but it didn't work.

**Additional context**
I believe this piece of [code](https://github.com/charmbracelet/bubbles/blob/95d7be54d9d4cdd73cd36e31e64b67965d517d68/table/table.go#L400C53-L400C53) left aligns all text in a table.

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.