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
↓ 1 callers
Method
applyMargins
(str string, inline bool)
style.go:543
↓ 1 callers
Function
backgroundColor
(in term.File, out term.File)
query.go:12
↓ 1 callers
Method
borderBlend
(width, height int, colors ...color.Color)
borders.go:288
↓ 1 callers
Method
boundsWithOffset
boundsWithOffset calculates bounds with parent offset applied.
layer.go:133
↓ 1 callers
Function
bton
bton converts a boolean to a specific integer, n if true, 0 if false.
table/util.go:16
↓ 1 callers
Function
clamp
(v, low, high T)
examples/blending/linear-2d/bubbletea/main.go:205
↓ 1 callers
Function
colorGrid
colorGrid blends colors from 4 corner quadrants, into a box region.
examples/layout/main.go:397
↓ 1 callers
Function
colorOrNil
(c any)
set.go:187
↓ 1 callers
Method
columnCount
columnCount returns the column count.
table/resizing.go:380
↓ 1 callers
Method
computeHeight
computeHeight computes the height of the table in its current configuration.
table/table.go:371
↓ 1 callers
Method
constructBottomBorder
constructBottomBorder constructs the bottom border for the table given it's current border configuration and data.
table/table.go:404
↓ 1 callers
Method
constructHeaders
constructHeaders constructs the headers for the table given it's current header configuration and data.
table/table.go:423
↓ 1 callers
Method
constructRow
constructRow constructs the row for the table given an index and row data based on the current configuration. If isOverflow is true, the row is render
table/table.go:484
↓ 1 callers
Method
constructTopBorder
constructTopBorder constructs the top border for the table given it's current border configuration and data.
table/table.go:385
↓ 1 callers
Function
defaultStyles
()
examples/tree/toggle/main.go:17
↓ 1 callers
Method
detectContentHeight
detectContentHeight detects the content height.
table/resizing.go:439
↓ 1 callers
Method
detectTableWidth
detectTableWidth detects the table width.
table/resizing.go:198
↓ 1 callers
Function
ensureParent
(nodes Children, item *Tree)
tree/tree.go:207
↓ 1 callers
Method
expandTableWidth
expandTableWidth expands the table width.
table/resizing.go:203
↓ 1 callers
Method
flattenRecursive
flattenRecursive recursively collects all layers with their absolute positions.
layer.go:245
↓ 1 callers
Method
has
has checks if a property is set.
style.go:107
↓ 1 callers
Function
isDarkColor
isDarkColor returns whether the given color is dark (based on the luminance portion of the color as interpreted as HSL). Example usage: color := li
color.go:225
↓ 1 callers
Function
makeEmptyRow
()
examples/table/mindy/main.go:61
↓ 1 callers
Function
makeStyles
Create new styles.
examples/ssh/main.go:37
↓ 1 callers
Method
maxCharCount
maxCharCount returns the maximum character count.
table/resizing.go:385
↓ 1 callers
Function
maxRuneWidthOld
(str string)
borders_test.go:211
↓ 1 callers
Method
maxTotal
maxTotal returns the maximum total width.
table/resizing.go:398
↓ 1 callers
Method
maybeConvertTabs
(str string)
style.go:528
↓ 1 callers
Function
median
median returns the median of a slice of integers.
table/util.go:33
↓ 1 callers
Method
minWidth
minWidth returns the minimum width floor for a column: horizontal padding plus at least 1 to ensure the "…" truncation marker or one character is alwa
table/resizing.go:236
↓ 1 callers
Function
newCard
newCard creates a little card with rounded borders and a text label.
examples/canvas/main.go:28
↓ 1 callers
Function
newField
newField fills a rectangular area with a given character in a given color.
examples/canvas/main.go:13
↓ 1 callers
Function
newRenderer
newRenderer returns the renderer used to render a tree.
tree/renderer.go:21
↓ 1 callers
Function
newResizer
newResizer creates a new resizer.
table/resizing.go:145
↓ 1 callers
Function
newStyles
Styles are initialized based on the background color of the terminal.
examples/compat/bubbletea/main.go:31
↓ 1 callers
Function
newStyles
Styles are initialized based on the background color of the terminal.
examples/color/bubbletea/main.go:22
↓ 1 callers
Method
optimizedWidths
optimizedWidths returns the optimized column widths and row heights.
table/resizing.go:190
↓ 1 callers
Function
queryBackgroundColor
queryBackgroundColor queries the terminal for the background color. If the terminal does not support querying the background color, nil is returned.
terminal.go:25
↓ 1 callers
Function
queryTerminal
queryTerminal queries the terminal for support of various features and returns a list of response events. Most of the time, you will need to set stdin
terminal.go:63
↓ 1 callers
Method
render
render is responsible for actually rendering the tree.
tree/renderer.go:47
↓ 1 callers
Function
renderHorizontalEdge
Render the horizontal (top or bottom) portion of a border.
borders.go:498
↓ 1 callers
Function
requireFalse
(tb testing.TB, b bool)
style_test.go:499
↓ 1 callers
Function
requireTrue
(tb testing.TB, b bool)
style_test.go:494
↓ 1 callers
Method
resize
resize resizes the table to fit the specified width. Given a user defined table width, we must ensure the table is exactly that width. This must acco
table/resizing.go:47
↓ 1 callers
Function
rgbaString
(t *testing.T, c color.Color)
color_test.go:40
↓ 1 callers
Method
setFrom
setFrom sets the property from another style.
set.go:111
↓ 1 callers
Method
shrinkTableWidth
shrinkTableWidth shrinks the table width.
table/resizing.go:241
↓ 1 callers
Method
styleBorder
styleBorder applies foreground and background styling to a border.
borders.go:527
↓ 1 callers
Method
styleBorderBlend
styleBorderBlend applies foreground and background styling to a border, using blending.
borders.go:542
↓ 1 callers
Method
totalHorizontalPadding
totalHorizontalPadding returns the total padding.
table/resizing.go:410
↓ 1 callers
Function
trimSpace
(s string)
list/list_test.go:361
↓ 1 callers
Method
updateGradient
()
examples/blending/linear-2d/bubbletea/main.go:139
↓ 1 callers
Method
visibleRowIndexes
visibleRowIndexes calculates the indexes of the first and last visible rows according to the current yOffset and tableHeight. If the table height is n
table/resizing.go:457
↓ 1 callers
Function
whichSidesBool
whichSidesBool is like whichSidesInt, except it operates on a series of boolean values. See the comment on whichSidesInt for details on how this works
set.go:871
Function
ASCIIBorder
ASCIIBorder returns a table border with ASCII characters.
borders.go:277
Method
AddLayers
AddLayers adds layers to the compositor's root and refreshes the internal state.
layer.go:218
Function
Alphabet
Alphabet is the enumeration for alphabetical listing. Example: a. Foo b. Bar c. Baz d. Qux.
list/enumerator.go:51
Function
Arabic
Arabic is the enumeration for arabic numerals listing. Example: 1. Foo 2. Bar 3. Baz 4. Qux.
list/enumerator.go:70
Function
Asterisk
Asterisk is an enumeration using asterisks. Example: * Foo * Bar * Baz * Qux.
list/enumerator.go:115
Method
At
At returns the row at the given index.
table/rows.go:83
Method
At
At returns the child at the given index.
tree/children.go:38
Method
At
At returns the item at the given index. The index is relative to the filtered results.
tree/children.go:71
Function
BenchmarkBlend1D
(b *testing.B)
blending_test.go:328
Function
BenchmarkBlend2D
(b *testing.B)
blending_test.go:342
Function
BenchmarkBorderBlend
(b *testing.B)
borders_test.go:40
Function
BenchmarkBorderRendering
(b *testing.B)
borders_test.go:9
Function
BenchmarkBorderRenderingNoColors
(b *testing.B)
borders_test.go:74
Function
BenchmarkGetFirstRuneAsString
(b *testing.B)
borders_test.go:146
Function
BenchmarkMaxRuneWidth
(b *testing.B)
borders_test.go:180
Function
BenchmarkPad
(b *testing.B)
style_test.go:647
Function
BenchmarkStyleRender
(b *testing.B)
style_test.go:667
Function
BenchmarkWidthMultiLine
(b *testing.B)
size_test.go:24
Function
BenchmarkWidthSimple
(b *testing.B)
size_test.go:8
Function
BlockBorder
BlockBorder returns a border that takes the whole block.
borders.go:233
Method
BorderBackground
BorderBackground is a shorthand function for setting all of the background colors of the borders at once. The arguments work as follows: With one arg
set.go:675
Method
BorderBottomBackground
BorderBottomBackground sets the background color of the bottom of the border.
set.go:707
Method
BorderBottomForeground
BorderBottomForeground sets the foreground color for the bottom of the border.
set.go:600
Method
BorderLeftBackground
BorderLeftBackground set the background color of the left side of the border.
set.go:714
Method
BorderLeftForeground
BorderLeftForeground sets the foreground color for the left side of the border.
set.go:607
Method
BorderRightBackground
BorderRightBackground sets the background color of right side the border.
set.go:700
Method
BorderRightForeground
BorderRightForeground sets the foreground color for the right side of the border.
set.go:593
Method
BorderTopBackground
BorderTopBackground sets the background color of the top of the border.
set.go:694
Method
BorderTopForeground
BorderTopForeground set the foreground color for the top of the border.
set.go:586
Method
Bounds
Bounds returns the bounds of the LayerHit.
layer.go:181
Method
Bounds
Bounds returns the overall bounds of all layers in the compositor.
layer.go:273
Function
Bullet
Bullet is the enumeration for bullet listing. Example: • Foo • Bar • Baz • Qux.
list/enumerator.go:104
Method
Children
()
examples/tree/selection/main.go:71
Method
Children
Children of a Leaf node are always empty.
tree/tree.go:60
Method
Children
Children returns the children of a node.
tree/tree.go:365
Method
Clear
Clear clears the canvas.
canvas.go:37
Method
ColorWhitespace
ColorWhitespace determines whether or not the background color should be applied to the padding. This is true by default as it's more than likely the
set.go:396
Method
Columns
Columns returns the number of columns in the table.
table/rows.go:49
Method
Columns
Columns returns the number of columns in the table.
table/rows.go:99
Function
Complete
Complete returns a function that will return the appropriate color based on the given color profile. Example usage: p := colorprofile.Detect(os.Std
color.go:265
Method
Copy
Copy returns a copy of this style, including any underlying string values. Deprecated: to copy just use assignment (i.e. a := b). All methods also re
style.go:229
Function
Dash
Dash is an enumeration using dashes. Example: - Foo - Bar - Baz - Qux.
list/enumerator.go:126
Function
DefaultEnumerator
DefaultEnumerator enumerates a tree. ├── Foo ├── Bar ├── Baz └── Qux.
tree/enumerator.go:23
Function
DefaultIndenter
DefaultIndenter indents a tree for nested trees and multiline content. ├── Foo ├── Bar │ ├── Qux │ ├── Quux │ │ ├── Foo │ │ └── Bar │ └
tree/enumerator.go:69
Function
DefaultStyles
DefaultStyles is a TableStyleFunc that returns a new Style with no attributes.
table/table.go:40
Function
DoubleBorder
DoubleBorder returns a border comprised of two thin strokes.
borders.go:254
← previous
next →
301–400 of 731, ranked by callers