Replies: 1 comment
-
After much struggling I got it mostly working with: boarder := lipgloss.NewStyle().
Width(120).
Border(lipgloss.NormalBorder(), true, true, true, true)
leftHeader1 := lipgloss.NewStyle().Width(60).Align(lipgloss.Left).Render("left header line1")
rightHeader1 := lipgloss.NewStyle().Width(60).Align(lipgloss.Right).Render("right header text line1")
rightHeader2 := lipgloss.NewStyle().Width(120).Align(lipgloss.Right).PaddingBottom(1).Render("right header text line2")
header := leftHeader1 + rightHeader1 + "\n" + rightHeader2
return boarder.Render(
lipgloss.JoinVertical(lipgloss.Left,
header,
model.View(),
),
) However, if I want to adding padding to the boarder so things are not pushing against it, everything falls apart...Its all so fragile! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to render text as follows with block1 hugging the left margin and block2 hugging the right margin? I've tried a bunch of things, but nothing seems to get it.
Technically I have several blocks of text and trying to get something like the following:
So far Im trying something like the following:
Beta Was this translation helpful? Give feedback.
All reactions