Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/charmbracelet/lipgloss
/ functions
Functions
731 in github.com/charmbracelet/lipgloss
⨍
Functions
731
◇
Types & classes
65
↓ 4 callers
Method
Reverse
Reverse sets a rule for inverting foreground and background colors.
set.go:248
↓ 4 callers
Method
RootStyle
RootStyle sets a style for the root element.
tree/tree.go:288
↓ 4 callers
Function
RoundedBorder
RoundedBorder returns a border with rounded corners.
borders.go:228
↓ 4 callers
Method
String
()
examples/list/glow/main.go:15
↓ 4 callers
Function
clamp
(v, low, high T)
color.go:15
↓ 4 callers
Method
getAsPosition
(k propKey)
get.go:601
↓ 4 callers
Function
getBorderEdgeWidth
(borderParts ...string)
borders.go:60
↓ 4 callers
Method
value
()
position.go:21
↓ 3 callers
Function
Blend2D
Blend2D blends a series of colors together in two linear dimensions using multiple stops, into the provided width/height. Uses the "CIE L*, a*, b*" (C
blending.go:114
↓ 3 callers
Method
BorderHeader
BorderHeader sets the header separator border.
table/table.go:196
↓ 3 callers
Method
BorderStyle
BorderStyle sets the style for the table border.
table/table.go:214
↓ 3 callers
Method
Close
Close closes the writer, resets the style and link if necessary, and releases its parser. Calling it is performance critical, but forgetting it does n
wrap.go:101
↓ 3 callers
Method
Data
Data sets the table data.
table/table.go:124
↓ 3 callers
Method
GetBlink
GetBlink returns the style's blink value. If no value is set false is returned.
get.go:53
↓ 3 callers
Method
GetFaint
GetFaint returns the style's faint value. If no value is set false is returned.
get.go:59
↓ 3 callers
Method
GetForeground
GetForeground returns the style's foreground color. If no value is set NoColor{} is returned.
get.go:65
↓ 3 callers
Method
GetItalic
GetItalic returns the style's italic value. If no value is set false is returned.
get.go:17
↓ 3 callers
Method
GetMarginBottom
GetMarginBottom returns the style's bottom margin. If no value is set 0 is returned.
get.go:201
↓ 3 callers
Method
GetMarginLeft
GetMarginLeft returns the style's left margin. If no value is set 0 is returned.
get.go:207
↓ 3 callers
Method
GetMarginRight
GetMarginRight returns the style's right margin. If no value is set 0 is returned.
get.go:195
↓ 3 callers
Method
GetMarginTop
GetMarginTop returns the style's top margin. If no value is set 0 is returned.
get.go:189
↓ 3 callers
Method
GetPaddingBottom
GetPaddingBottom returns the style's bottom padding. If no value is set 0 is returned.
get.go:140
↓ 3 callers
Method
GetPaddingLeft
GetPaddingLeft returns the style's left padding. If no value is set 0 is returned.
get.go:146
↓ 3 callers
Method
GetPaddingRight
GetPaddingRight returns the style's right padding. If no value is set 0 is returned.
get.go:134
↓ 3 callers
Method
GetPaddingTop
GetPaddingTop returns the style's top padding. If no value is set 0 is returned.
get.go:128
↓ 3 callers
Method
GetStrikethrough
GetStrikethrough returns the style's strikethrough value. If no value is set false is returned.
get.go:41
↓ 3 callers
Method
GetStrikethroughSpaces
GetStrikethroughSpaces returns whether or not the style is set to strikethrough spaces. If not value is set false is returned.
get.go:442
↓ 3 callers
Method
GetUnderline
GetUnderline returns the style's underline value. If no value is set false is returned.
get.go:23
↓ 3 callers
Method
GetUnderlineSpaces
GetUnderlineSpaces returns whether or not the style is set to underline spaces. If not value is set false is returned.
get.go:436
↓ 3 callers
Method
GetVerticalMargins
GetVerticalMargins returns the style's top and bottom margins. Unset values are measured as 0.
get.go:229
↓ 3 callers
Method
Items
Items appends multiple items to the list. l := list.New(). Items("Foo", "Bar", "Baz"),
list/list.go:260
↓ 3 callers
Function
NewCanvas
NewCanvas creates a new [Canvas] with the given size.
canvas.go:24
↓ 3 callers
Function
NewStringData
NewStringData returns a Data of strings.
tree/children.go:46
↓ 3 callers
Method
TabWidth
TabWidth sets the number of spaces that a tab (/t) should be rendered as. When set to 0, tabs will be removed. To disable the replacement of tabs with
set.go:777
↓ 3 callers
Method
UnderlineColor
UnderlineColor sets the color of the underline. By default, the underline will be the same color as the foreground. Note that not all terminal emulat
set.go:234
↓ 3 callers
Method
UnderlineStyle
UnderlineStyle sets the underline style. This can be used to set the underline to be a single, double, curly, dotted, or dashed line. Note that not a
set.go:223
↓ 3 callers
Method
UnsetBorderBottom
UnsetBorderBottom removes the border bottom style rule, if set.
unset.go:198
↓ 3 callers
Method
UnsetBorderRight
UnsetBorderRight removes the border right style rule, if set.
unset.go:192
↓ 3 callers
Function
WithWhitespaceChars
WithWhitespaceChars sets the characters to be rendered in the whitespace.
whitespace.go:72
↓ 3 callers
Method
Write
Write writes to the buffer.
wrap.go:65
↓ 3 callers
Method
YOffset
YOffset sets the table rendering offset.
table/table.go:275
↓ 3 callers
Function
defaultStyles
()
examples/tree/selection/main.go:22
↓ 3 callers
Method
flatten
flatten builds the internal flattened layer list and calculates overall bounds.
layer.go:225
↓ 3 callers
Function
getFirstRuneAsString
(str string)
borders.go:581
↓ 3 callers
Function
maxRuneWidth
(str string)
borders.go:564
↓ 3 callers
Function
pad
pad adds padding to either the left or right side of a string. Positive values add to the right side while negative values add to the left side. r is
style.go:598
↓ 3 callers
Function
parseHex
pre-allocated. parseHex parses a hex color string and returns a color.RGBA. The string can be in the format #RRGGBB or #RGB. This is a more performant
color.go:102
↓ 3 callers
Method
style
style returns the style for a cell based on it's position (row, column).
table/table.go:116
↓ 3 callers
Function
sum
sum returns the sum of all integers in a slice.
table/util.go:24
↓ 3 callers
Method
totalHorizontalBorder
totalHorizontalBorder returns the total border.
table/resizing.go:434
↓ 2 callers
Function
Alpha
Alpha adjusts the alpha value of a color using a 0-1 (clamped) float scale 0 = transparent, 1 = opaque.
color.go:292
↓ 2 callers
Method
Append
Append appends the given row to the table.
table/rows.go:34
↓ 2 callers
Method
BorderBottom
BorderBottom determines whether or not to draw a bottom border.
set.go:541
↓ 2 callers
Method
BorderLeft
BorderLeft determines whether or not to draw a left border.
set.go:547
↓ 2 callers
Method
BorderRight
BorderRight determines whether or not to draw a right border.
set.go:535
↓ 2 callers
Method
BorderTop
BorderTop determines whether or not to draw a top border.
set.go:529
↓ 2 callers
Method
CellAt
CellAt implements [uv.Screen].
canvas.go:57
↓ 2 callers
Method
EnumeratorStyleFunc
EnumeratorStyleFunc sets the enumeration style function. Use this function for conditional styling. t := tree.New(). EnumeratorStyleFunc(func(_ tr
tree/tree.go:251
↓ 2 callers
Method
Filter
Filter applies the given filter function to the data.
table/rows.go:77
↓ 2 callers
Method
GetBorderTopSize
GetBorderTopSize returns the width of the top border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on
get.go:347
↓ 2 callers
Method
GetHorizontalBorderSize
GetHorizontalBorderSize returns the width of the horizontal borders. If borders contain runes of varying widths, the widest rune is returned. If no bo
get.go:399
↓ 2 callers
Method
GetHorizontalPadding
GetHorizontalPadding returns the style's left and right padding. Unset values are measured as 0.
get.go:162
↓ 2 callers
Method
GetTabWidth
GetTabWidth returns the style's tab width setting. If no value is set 4 is returned which is the implicit default.
get.go:430
↓ 2 callers
Method
GetVerticalBorderSize
GetVerticalBorderSize returns the width of the vertical borders. If borders contain runes of varying widths, the widest rune is returned. If no border
get.go:406
↓ 2 callers
Method
Height
Height returns the height of the canvas.
canvas.go:52
↓ 2 callers
Method
Hidden
()
tree/tree.go:40
↓ 2 callers
Method
Hyperlink
Hyperlink sets a hyperlink on a style. This is useful for rendering text that can be clicked on in a terminal emulator that supports hyperlinks. Exam
set.go:820
↓ 2 callers
Method
Indenter
Indenter sets the indenter implementation. This is used to change the way the tree is indented. The default indentor places a border connecting siblin
list/list.go:201
↓ 2 callers
Method
Item
Item appends the given row to the table.
table/rows.go:54
↓ 2 callers
Method
ItemStyleFunc
ItemStyleFunc sets the item style function. Use this for conditional styling. For example: t := tree.New(). ItemStyleFunc(func(_ tree.Data, i int)
tree/tree.go:311
↓ 2 callers
Method
MarginTop
MarginTop sets the value of the top margin.
set.go:441
↓ 2 callers
Method
MaxHeight
MaxHeight applies a max height to a given style. This is useful in enforcing a certain height at render time, particularly with arbitrary strings and
set.go:762
↓ 2 callers
Function
NewFilter
NewFilter initializes a new Filter.
table/rows.go:72
↓ 2 callers
Function
NewFilter
NewFilter initializes a new Filter.
tree/children.go:65
↓ 2 callers
Function
NewWrapWriter
NewWrapWriter returns a new [WrapWriter].
wrap.go:34
↓ 2 callers
Function
NormalBorder
NormalBorder returns a standard-type border with a normal weight and 90 degree corners.
borders.go:223
↓ 2 callers
Method
PaddingBottom
PaddingBottom adds padding to the bottom of the block.
set.go:373
↓ 2 callers
Method
PaddingChar
PaddingChar sets the character used for padding. This is useful for rendering blocks with a specific character, such as a space or a dot. Example of u
set.go:385
↓ 2 callers
Method
RGBA
RGBA returns the RGBA value of this color. This satisfies the Go Color interface.
compat/color.go:33
↓ 2 callers
Method
Remove
Remove removes a child from the list at the given index.
tree/children.go:24
↓ 2 callers
Method
Render
Render renders the compositor into a styled string. This is a helper function that creates a temporary canvas, draws the compositor onto it, and retur
layer.go:323
↓ 2 callers
Method
Render
Render renders the canvas into a styled string. Any trailing spaces are trimmed.
canvas.go:87
↓ 2 callers
Method
SetHidden
(bool)
tree/tree.go:41
↓ 2 callers
Method
StrikethroughSpaces
StrikethroughSpaces determines whether to apply strikethroughs to spaces between words. By default, this is true. Spaces can also be struck without un
set.go:796
↓ 2 callers
Method
Transform
Transform applies a given function to a string at render time, allowing for the string being rendered to be manipuated. Example: s := NewStyle().Tr
set.go:808
↓ 2 callers
Method
UnderlineSpaces
UnderlineSpaces determines whether to underline spaces between words. By default, this is true. Spaces can also be underlined without underlining the
set.go:788
↓ 2 callers
Method
UnsetBorderLeft
UnsetBorderLeft removes the border left style rule, if set.
unset.go:204
↓ 2 callers
Method
UnsetBorderTop
UnsetBorderTop removes the border top style rule, if set.
unset.go:186
↓ 2 callers
Method
Width
Width returns the width of the canvas.
canvas.go:47
↓ 2 callers
Method
Width
Width sets the tree width. Items will be padded to account for the entire width of the tree.
tree/tree.go:359
↓ 2 callers
Method
X
X sets the x-coordinate of the Layer relative to its parent.
layer.go:57
↓ 2 callers
Method
Y
Y sets the y-coordinate of the Layer relative to its parent.
layer.go:63
↓ 2 callers
Function
alignTextVertical
(str string, pos Position, height int, _ *ansi.Style)
align.go:61
↓ 2 callers
Function
borderRotationTick
(current int)
examples/blending/border-blend-rotation/bubbletea/main.go:21
↓ 2 callers
Method
defaultRowHeights
defaultRowHeights returns the default row heights.
table/resizing.go:355
↓ 2 callers
Function
ensureNotTransparent
ensureNotTransparent ensures that the alpha value of a color is not 0, and if it is, we will set it to 1. This is useful for when we are converting fr
color.go:282
↓ 2 callers
Method
expandRowHeights
expandRowHeights expands the row heights.
table/resizing.go:334
↓ 2 callers
Method
getAsColors
(k propKey)
get.go:511
↓ 2 callers
Method
getAsRune
(k propKey)
get.go:491
↓ 2 callers
Method
getAsTransform
(propKey)
get.go:621
← previous
next →
101–200 of 731, ranked by callers