MCPcopy Create free account

hub / github.com/charmbracelet/lipgloss / functions

Functions746 in github.com/charmbracelet/lipgloss

FunctionDash
Dash is an enumeration using dashes. Example: - Foo - Bar - Baz - Qux.
list/enumerator.go:133
FunctionDefaultEnumerator
DefaultEnumerator enumerates a tree. ├── Foo ├── Bar ├── Baz └── Qux.
tree/enumerator.go:23
FunctionDefaultIndenter
DefaultIndenter indents a tree for nested trees and multiline content. ├── Foo ├── Bar │ ├── Qux │ ├── Quux │ │ ├── Foo │ │ └── Bar │ └
tree/enumerator.go:69
FunctionDefaultStyles
DefaultStyles is a TableStyleFunc that returns a new Style with no attributes.
table/table.go:40
FunctionDoubleBorder
DoubleBorder returns a border comprised of two thin strokes.
borders.go:254
MethodDraw
Draw draws all layers onto the given [uv.Screen] in z-index order.
layer.go:278
MethodEmpty
Empty returns true if the LayerHit represents no hit.
layer.go:166
FunctionEnableLegacyWindowsANSI
EnableLegacyWindowsANSI is only needed on Windows.
ansi_unix.go:8
FunctionEnableLegacyWindowsANSI
EnableLegacyWindowsANSI enables support for ANSI color sequences in the Windows default console (cmd.exe and the PowerShell application). Note that th
ansi_windows.go:15
FunctionEnumerator
(children tree.Children, index int)
examples/tree/selection/main.go:144
FunctionExampleLeaf_SetHidden
Leaf Examples
tree/example_test.go:12
FunctionExampleLeaf_SetValue
()
tree/example_test.go:68
FunctionExampleNewLeaf
()
tree/example_test.go:38
FunctionExampleTable_Wrap
Examples
table/table_test.go:1464
FunctionExampleTree_Hide
Tree Examples
tree/example_test.go:99
FunctionExampleTree_SetHidden
()
tree/example_test.go:123
MethodFirstVisibleRowIndex
FirstVisibleRowIndex returns the index of the first visible row in the table.
table/table.go:302
FunctionFprint
Fprint pritnts to the given writer, automatically downsampling colors when necessary. Example: str := NewStyle(). Foreground(lipgloss.Color("#
writer.go:67
FunctionFprintf
Fprintf prints text to a writer, against the given format, automatically downsampling colors when necessary. Example: str := NewStyle(). Foreg
writer.go:95
FunctionFprintln
Fprintln prints to the given writer, automatically downsampling colors when necessary, and ending with a trailing newline. Example: str := NewStyle
writer.go:81
MethodGetAlign
GetAlign returns the style's implicit horizontal alignment setting. If no alignment is set Position.Left is returned.
get.go:89
MethodGetAlignHorizontal
GetAlignHorizontal returns the style's implicit horizontal alignment setting. If no alignment is set Position.Left is returned.
get.go:99
MethodGetAlignVertical
GetAlignVertical returns the style's implicit vertical alignment setting. If no alignment is set Position.Top is returned.
get.go:109
MethodGetBorder
GetBorder returns the style's border style (type Border) and value for the top, right, bottom, and left in that order. If no value is set for the bord
get.go:237
MethodGetBorderBottom
GetBorderBottom gets the bottom border.
table/table.go:226
MethodGetBorderBottomBackground
GetBorderBottomBackground returns the style's border bottom background color. If no value is set NoColor{} is returned.
get.go:325
MethodGetBorderBottomForeground
GetBorderBottomForeground returns the style's border bottom foreground color. If no value is set NoColor{} is returned.
get.go:289
MethodGetBorderColumn
GetBorderColumn gets the column border separator.
table/table.go:246
MethodGetBorderForegroundBlend
GetBorderForegroundBlend returns the style's border blend foreground colors. If no value is set, nil is returned.
get.go:301
MethodGetBorderForegroundBlendOffset
GetBorderForegroundBlendOffset returns the style's border blend offset. If no value is set, 0 is returned.
get.go:307
MethodGetBorderHeader
GetBorderHeader gets the header separator border.
table/table.go:241
MethodGetBorderLeft
GetBorderLeft gets the left border.
table/table.go:231
MethodGetBorderLeftBackground
GetBorderLeftBackground returns the style's border left background color. If no value is set NoColor{} is returned.
get.go:331
MethodGetBorderLeftForeground
GetBorderLeftForeground returns the style's border left foreground color. If no value is set NoColor{} is returned.
get.go:295
MethodGetBorderRight
GetBorderRight gets the right border.
table/table.go:236
MethodGetBorderRightBackground
GetBorderRightBackground returns the style's border right background color. If no value is set NoColor{} is returned.
get.go:319
MethodGetBorderRightForeground
GetBorderRightForeground returns the style's border right foreground color. If no value is set NoColor{} is returned.
get.go:283
MethodGetBorderRow
GetBorderRow gets the row border separator.
table/table.go:251
MethodGetBorderStyle
GetBorderStyle returns the style's border style (type Border). If no value is set Border{} is returned.
get.go:247
MethodGetBorderTop
GetBorderTop gets the top border.
table/table.go:221
MethodGetBorderTopBackground
GetBorderTopBackground returns the style's border top background color. If no value is set NoColor{} is returned.
get.go:313
MethodGetBorderTopForeground
GetBorderTopForeground returns the style's border top foreground color. If no value is set NoColor{} is returned.
get.go:277
MethodGetBorderTopWidth
GetBorderTopWidth 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:340
MethodGetColorWhitespace
GetColorWhitespace returns the style's whitespace coloring setting. If no value is set false is returned.
get.go:174
MethodGetContent
GetContent returns the content of the Layer.
layer.go:31
MethodGetData
GetData returns the table data.
table/table.go:131
MethodGetFrameSize
GetFrameSize returns the sum of the margins, padding and border width for both the horizontal and vertical margins.
get.go:464
MethodGetHeaders
GetHeaders returns the table headers.
table/table.go:162
MethodGetHeight
GetHeight returns the style's height setting. If no height is set 0 is returned.
get.go:83
MethodGetID
GetID returns the ID of the Layer.
layer.go:46
MethodGetLayer
GetLayer returns a descendant layer by its ID, or nil if not found. Layers with empty IDs are skipped.
layer.go:105
MethodGetLayer
GetLayer returns a layer by its ID, or nil if not found. Layers with empty IDs are not indexed and cannot be retrieved.
layer.go:307
MethodGetMargin
GetMargin returns the style's top, right, bottom, and left margins, in that order. 0 is returned for unset values.
get.go:180
MethodGetMarginChar
GetMarginChar returns the style's padding character. If no value is set a space is returned.
get.go:213
MethodGetMaxHeight
GetMaxHeight returns the style's max height setting. If no value is set 0 is returned.
get.go:424
MethodGetMaxWidth
GetMaxWidth returns the style's max width setting. If no value is set 0 is returned.
get.go:418
MethodGetPadding
GetPadding returns the style's top, right, bottom, and left padding values, in that order. 0 is returned for unset values.
get.go:119
MethodGetTransform
GetTransform returns the transform set on the style. If no transform is set nil is returned.
get.go:470
MethodGetUnderlineStyle
GetUnderlineStyle returns the style's underline style. If no value is set UnderlineNone is returned.
get.go:29
MethodGetX
GetX returns the x-coordinate of the Layer relative to its parent.
layer.go:75
MethodGetY
GetY returns the y-coordinate of the Layer relative to its parent.
layer.go:80
MethodGetYOffset
GetYOffset returns the table rendering offset.
table/table.go:297
MethodGetZ
GetZ returns the z-index of the Layer relative to its parent.
layer.go:85
FunctionHasDarkBackground
HasDarkBackground detects whether the terminal has a light or dark background. Typically, you'll want to query against stdin and either stdout or std
query.go:86
MethodHeight
Height returns the height of the Layer.
layer.go:41
MethodHidden
Hidden returns whether this list is hidden.
list/list.go:84
MethodHidden
()
examples/tree/selection/main.go:67
MethodHidden
Hidden returns whether a Leaf node is hidden.
tree/tree.go:84
MethodHidden
Hidden returns whether a Tree node is hidden.
tree/tree.go:109
FunctionHiddenBorder
HiddenBorder returns a border that renders as a series of single-cell spaces. It's useful for cases when you want to remove a standard border but main
borders.go:262
MethodHide
Hide hides this list. If this list is hidden, it will not be shown when rendered.
list/list.go:90
MethodHit
Hit performs a hit test at the given (x, y) coordinates. If a layer is hit, it returns the ID of the top-most layer at that point. Layers with empty I
layer.go:289
MethodID
ID sets the ID of the Layer.
layer.go:51
MethodID
ID returns the ID of the hit Layer.
layer.go:171
FunctionIndenter
(children tree.Children, index int)
examples/tree/selection/main.go:148
MethodIndenterStyleFunc
IndenterStyleFunc sets the indentation style function. Use this function for conditional styling. t := tree.New(). IndenterStyleFunc(func(_ tree.C
tree/tree.go:286
MethodInit
()
examples/compat/bubbletea/main.go:66
MethodInit
()
examples/blending/border-blend-rotation/bubbletea/main.go:31
MethodInit
()
examples/blending/linear-2d/bubbletea/main.go:92
MethodInit
()
examples/blending/linear-1d/bubbletea/main.go:100
MethodInit
()
examples/color/bubbletea/main.go:73
FunctionInnerHalfBlockBorder
InnerHalfBlockBorder returns a half-block border that sits inside the frame.
borders.go:243
MethodLastVisibleRowIndex
LastVisibleRowIndex returns the index of the last visible row in the table.
table/table.go:307
MethodLayer
Layer returns the layer that was hit.
layer.go:176
MethodLength
Length returns the number of children in the list.
tree/children.go:33
MethodLength
Length returns the number of children in the tree.
tree/children.go:92
FunctionLightDark
LightDark is a simple helper type that can be used to choose the appropriate color based on whether the terminal has a light or dark background. lig
color.go:200
MethodLink
Link returns the current pen link.
wrap.go:63
MethodMarginChar
MarginChar sets the character used for the margin. This is useful for rendering blocks with a specific character, such as a space or a dot.
set.go:462
FunctionMarkdownBorder
MarkdownBorder return a table border in markdown style. Make sure to disable top and bottom border for the best result. This will ensure that the out
borders.go:272
MethodMaxZ
MaxZ returns the maximum z-index among this layer and all its descendants.
layer.go:121
FunctionNewCompositor
NewCompositor creates a new Compositor with an internal root layer. Optional layers can be provided which will be added as children of the root. The l
layer.go:206
MethodOffset
Offset sets the start and end offset for the list. Example: l := list.New("A", "B", "C", "D"). Offset(1, -1) fmt.Println(l) • B • C •
list/list.go:106
FunctionOuterHalfBlockBorder
OuterHalfBlockBorder returns a half-block border that sits outside the frame.
borders.go:238
FunctionPlace
Place places a string or text block vertically in an unstyled box of a given width or height.
position.go:36
FunctionPrint
Print to stdout, automatically downsampling colors when necessary. Example: str := NewStyle(). Foreground(lipgloss.Color("#6a00ff")). Ren
writer.go:53
FunctionPrintf
Printf prints formatted text to stdout, automatically downsampling colors when necessary. Example: str := NewStyle(). Foreground(lipgloss.Color(
writer.go:40
FunctionPrintln
Println to stdout, automatically downsampling colors when necessary, ending with a trailing newline. Example: str := NewStyle(). Foreground(li
writer.go:26
MethodRGBA
RGBA returns the RGBA value of this color. This satisfies the Go Color interface.
compat/color.go:74
MethodRGBA
RGBA returns the RGBA value of this color. This satisfies the Go Color interface.
compat/color.go:96
← previousnext →401–500 of 746, ranked by callers