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
↓ 2 callers
Function
getFirstRuneAsStringOld
Old implementation using rune slice conversion
borders_test.go:104
↓ 2 callers
Function
isItemSelected
(children tree.Children, index int)
examples/tree/selection/main.go:87
↓ 2 callers
Function
joinString
joinString joins a list of strings into a single string separated with a space.
style.go:199
↓ 2 callers
Function
makeRow
(start, end int)
examples/table/mindy/main.go:49
↓ 2 callers
Method
maxColumnWidths
maxColumnWidths returns the maximum column widths.
table/resizing.go:367
↓ 2 callers
Function
newStyles
(dark bool)
examples/blending/linear-1d/bubbletea/main.go:71
↓ 2 callers
Function
padLeft
Apply left padding.
style.go:583
↓ 2 callers
Function
padRight
Apply right padding.
style.go:588
↓ 2 callers
Function
requireNotEqual
(tb testing.TB, a, b any)
style_test.go:512
↓ 2 callers
Method
truncateCell
(cell string, rowIndex, colIndex int)
table/table.go:555
↓ 2 callers
Function
whichSidesColor
whichSidesColor is like whichSides, except it operates on a series of boolean values. See the comment on whichSidesInt for details on how this works.
set.go:904
↓ 2 callers
Function
whichSidesInt
whichSidesInt is a helper method for setting values on sides of a block based on the number of arguments. It follows the CSS shorthand rules for block
set.go:838
↓ 2 callers
Method
yPaddingForCell
yPaddingForCell returns the horizontal padding for a cell.
table/resizing.go:426
↓ 1 callers
Method
AlignHorizontal
AlignHorizontal sets a horizontal text alignment rule.
set.go:316
↓ 1 callers
Method
AlignVertical
AlignVertical sets a vertical text alignment rule.
set.go:322
↓ 1 callers
Method
Append
Append appends a child to the list of children.
tree/children.go:18
↓ 1 callers
Method
At
At returns the contents of the cell at the given index.
table/rows.go:40
↓ 1 callers
Function
BackgroundColor
BackgroundColor queries the terminal's background color. Typically, you'll want to query against stdin and either stdout or stderr, depending on what
query.go:34
↓ 1 callers
Method
BaseStyle
BaseStyle sets the base style for the whole table. If you need to set a background color for the whole table, use this.
table/table.go:103
↓ 1 callers
Method
BorderForegroundBlendOffset
BorderForegroundBlendOffset sets the border blend offset cells, starting from the top left corner. Value can be positive or negative, and does not nee
set.go:655
↓ 1 callers
Method
Bounds
Bounds implements [uv.Screen].
canvas.go:42
↓ 1 callers
Method
ClearRows
ClearRows clears the table rows.
table/table.go:96
↓ 1 callers
Function
Complementary
Complementary returns the complementary color (180° away on color wheel) of the given color. This is useful for creating a contrasting color.
color.go:308
↓ 1 callers
Method
Compose
Compose composes a [Layer] or any [uv.Drawable] onto the [Canvas].
canvas.go:72
↓ 1 callers
Function
Darken
Darken takes a color and makes it darker by a specific percentage (0-1, clamped).
color.go:328
↓ 1 callers
Function
DataToMatrix
DataToMatrix is a helper function that converts an object that implements the Data interface into a table.
table/rows.go:117
↓ 1 callers
Method
Draw
Draw draws the content of the layer on the screen at the specified area.
layer.go:153
↓ 1 callers
Method
Draw
Draw draws the [Canvas] onto the given [uv.Screen] within the specified area. It implements [uv.Drawable].
canvas.go:81
↓ 1 callers
Method
EnumeratorStyle
EnumeratorStyle sets a static style for all enumerators. Use EnumeratorStyleFunc to conditionally set styles based on the tree node.
tree/tree.go:234
↓ 1 callers
Method
Filter
Filter uses a filter function to set a condition that all the data must satisfy to be in the Tree.
tree/children.go:86
↓ 1 callers
Method
GetBorderBottom
GetBorderBottom returns the style's bottom border setting. If no value is set false is returned.
get.go:265
↓ 1 callers
Method
GetBorderBottomSize
GetBorderBottomSize returns the width of the bottom border. If borders contain runes of varying widths, the widest rune is returned. If no border exis
get.go:373
↓ 1 callers
Method
GetBorderLeft
GetBorderLeft returns the style's left border setting. If no value is set false is returned.
get.go:271
↓ 1 callers
Method
GetBorderLeftSize
GetBorderLeftSize returns the width of the left border. If borders contain runes of varying widths, the widest rune is returned. If no border exists o
get.go:360
↓ 1 callers
Method
GetBorderRight
GetBorderRight returns the style's right border setting. If no value is set false is returned.
get.go:259
↓ 1 callers
Method
GetBorderRightSize
GetBorderRightSize returns the width of the right border. If borders contain runes of varying widths, the widest rune is returned. If no border exists
get.go:386
↓ 1 callers
Method
GetBorderTop
GetBorderTop returns the style's top border setting. If no value is set false is returned.
get.go:253
↓ 1 callers
Method
GetBottomSize
GetBottomSize returns the width of the bottom border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on
borders.go:49
↓ 1 callers
Method
GetHeight
GetHeight returns the height of the table.
table/table.go:270
↓ 1 callers
Method
GetHyperlink
GetHyperlink returns the hyperlink along with its parameters. If no hyperlink is set, empty strings are returned.
get.go:476
↓ 1 callers
Method
GetInline
GetInline returns the style's inline setting. If no value is set false is returned.
get.go:412
↓ 1 callers
Method
GetLeftSize
GetLeftSize returns the width of the left border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on the
borders.go:56
↓ 1 callers
Method
GetPaddingChar
GetPaddingChar returns the style's padding character. If no value is set a space is returned.
get.go:152
↓ 1 callers
Method
GetReverse
GetReverse returns the style's reverse value. If no value is set false is returned.
get.go:47
↓ 1 callers
Method
GetRightSize
GetRightSize returns the width of the right border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on th
borders.go:42
↓ 1 callers
Method
GetTopSize
GetTopSize returns the width of the top border. If borders contain runes of varying widths, the widest rune is returned. If no border exists on the to
borders.go:35
↓ 1 callers
Method
GetUnderlineColor
GetUnderlineColor returns the style's underline color. If no value is set NoColor{} is returned.
get.go:35
↓ 1 callers
Method
GetVerticalPadding
GetVerticalPadding returns the style's top and bottom padding. Unset values are measured as 0.
get.go:168
↓ 1 callers
Method
GetWidth
GetWidth returns the style's width setting. If no width is set 0 is returned.
get.go:77
↓ 1 callers
Method
IndenterStyle
IndenterStyle sets a static style for all indenters. Use IndenterStyleFunc to conditionally set styles based on the tree node.
tree/tree.go:262
↓ 1 callers
Method
IndenterStyleFunc
IndenterStyleFunc sets the enumerator style function for the list items. Use this to conditionally set different styles based on the current items, s
list/list.go:173
↓ 1 callers
Function
JoinHorizontal
JoinHorizontal is a utility function for horizontally joining two potentially multi-lined strings along a vertical axis. The first argument is the pos
join.go:28
↓ 1 callers
Function
JoinVertical
JoinVertical is a utility function for vertically joining two potentially multi-lined strings along a horizontal axis. The first argument is the posit
join.go:116
↓ 1 callers
Function
Lighten
Lighten makes a color lighter by a specific percentage (0-1, clamped).
color.go:345
↓ 1 callers
Function
NewLayer
NewLayer creates a new [Layer] with the given content and optional child layers.
layer.go:22
↓ 1 callers
Function
NewLeaf
NewLeaf returns a new Leaf.
tree/tree.go:52
↓ 1 callers
Function
NewRange
NewRange returns a range and style that can be used with [StyleRanges].
ranges.go:39
↓ 1 callers
Method
PaddingTop
PaddingTop adds padding to the top of the block.
set.go:367
↓ 1 callers
Function
PlaceHorizontal
PlaceHorizontal places a string or text block horizontally in an unstyled block of a given width. If the given width is shorter than the max width of
position.go:43
↓ 1 callers
Function
PlaceVertical
PlaceVertical places a string or text block vertically in an unstyled block of a given height. If the given height is shorter than the height of the s
position.go:90
↓ 1 callers
Method
SetHidden
SetHidden hides a Leaf node.
tree/tree.go:87
↓ 1 callers
Method
SetValue
(any)
tree/tree.go:42
↓ 1 callers
Method
SetValue
SetValue sets the value of a Leaf node.
tree/tree.go:70
↓ 1 callers
Method
String
()
examples/tree/selection/main.go:48
↓ 1 callers
Method
String
()
examples/tree/selection/main.go:63
↓ 1 callers
Function
StyleRanges
StyleRanges applying styling to ranges in a string. Existing styles will be taken into account. Ranges should not overlap.
ranges.go:11
↓ 1 callers
Function
StyleRunes
StyleRunes apply a given style to runes at the given indices in the string. Note that you must provide styling options for both matched and unmatched
runes.go:10
↓ 1 callers
Method
UnsetBackground
UnsetBackground removes the background style rule, if set.
unset.go:56
↓ 1 callers
Method
UnsetBlink
UnsetBlink removes the blink style rule, if set.
unset.go:38
↓ 1 callers
Method
UnsetBold
UnsetBold removes the bold style rule, if set.
unset.go:9
↓ 1 callers
Method
UnsetBorderTopBackground
UnsetBorderTopBackground removes the top border background color rule, if set.
unset.go:280
↓ 1 callers
Method
UnsetFaint
UnsetFaint removes the faint style rule, if set.
unset.go:44
↓ 1 callers
Method
UnsetForeground
UnsetForeground removes the foreground style rule, if set.
unset.go:50
↓ 1 callers
Method
UnsetHyperlink
UnsetHyperlink removes the value set by Hyperlink.
unset.go:348
↓ 1 callers
Method
UnsetInline
UnsetInline removes the inline style rule, if set.
unset.go:306
↓ 1 callers
Method
UnsetItalic
UnsetItalic removes the italic style rule, if set.
unset.go:15
↓ 1 callers
Method
UnsetMarginBottom
UnsetMarginBottom removes the bottom margin style rule, if set.
unset.go:166
↓ 1 callers
Method
UnsetMarginLeft
UnsetMarginLeft removes the left margin style rule, if set.
unset.go:148
↓ 1 callers
Method
UnsetMarginRight
UnsetMarginRight removes the right margin style rule, if set.
unset.go:154
↓ 1 callers
Method
UnsetMarginTop
UnsetMarginTop removes the top margin style rule, if set.
unset.go:160
↓ 1 callers
Method
UnsetPaddingBottom
UnsetPaddingBottom removes the bottom padding style rule, if set.
unset.go:127
↓ 1 callers
Method
UnsetPaddingChar
UnsetPaddingChar removes the padding character style rule, if set.
unset.go:103
↓ 1 callers
Method
UnsetPaddingLeft
UnsetPaddingLeft removes the left padding style rule, if set.
unset.go:109
↓ 1 callers
Method
UnsetPaddingRight
UnsetPaddingRight removes the right padding style rule, if set.
unset.go:115
↓ 1 callers
Method
UnsetPaddingTop
UnsetPaddingTop removes the top padding style rule, if set.
unset.go:121
↓ 1 callers
Method
UnsetReverse
UnsetReverse removes the reverse style rule, if set.
unset.go:32
↓ 1 callers
Method
UnsetStrikethrough
UnsetStrikethrough removes the strikethrough style rule, if set.
unset.go:26
↓ 1 callers
Method
UnsetStrikethroughSpaces
UnsetStrikethroughSpaces removes the value set by StrikethroughSpaces.
unset.go:336
↓ 1 callers
Method
UnsetString
UnsetString sets the underlying string value to the empty string.
unset.go:356
↓ 1 callers
Method
UnsetTabWidth
UnsetTabWidth removes the tab width style rule, if set.
unset.go:324
↓ 1 callers
Method
UnsetUnderline
UnsetUnderline removes the underline style rule, if set.
unset.go:21
↓ 1 callers
Method
UnsetUnderlineSpaces
UnsetUnderlineSpaces removes the value set by UnderlineSpaces.
unset.go:330
↓ 1 callers
Method
Value
Value returns the value of a Leaf node.
tree/tree.go:65
↓ 1 callers
Function
Wrap
Wrap wraps the given string to the given width, preserving ANSI styles and links.
wrap.go:12
↓ 1 callers
Method
Z
Z sets the z-index of the Layer relative to its parent.
layer.go:69
↓ 1 callers
Function
abs
(a int)
style.go:631
↓ 1 callers
Function
addBranches
(root *tree.Tree, path string)
examples/tree/files/main.go:13
↓ 1 callers
Function
alignTextHorizontal
Perform text alignment. If the string is multi-lined, we also make all lines the same width by padding them with spaces. If a style is passed, use tha
align.go:12
↓ 1 callers
Method
applyBorder
(str string)
borders.go:327
↓ 1 callers
Function
applyGradient
applyGradient applies a gradient to the given string.
examples/layout/main.go:413
← previous
next →
201–300 of 731, ranked by callers