Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/charmbracelet/bubbles
/ functions
Functions
843 in github.com/charmbracelet/bubbles
⨍
Functions
843
◇
Types & classes
115
↓ 1 callers
Function
WithSpinner
WithSpinner is an option to set the spinner. Pass this to [Spinner.New].
spinner/spinner.go:200
↓ 1 callers
Function
WithoutPercentage
WithoutPercentage hides the numeric percentage.
progress/progress.go:142
↓ 1 callers
Method
Word
Word returns the word at the cursor position. A word is delimited by spaces or line-breaks.
textarea/textarea.go:838
↓ 1 callers
Function
abs
(n int)
textarea/textarea.go:2166
↓ 1 callers
Function
ansiStrip
(s string)
table/table_test.go:358
↓ 1 callers
Method
arabicView
()
paginator/paginator.go:199
↓ 1 callers
Method
atContentLimit
atContentLimit reports whether the textarea has reached its content limit. When MaxContentHeight is set (> 0), it checks total visual lines. Otherwise
textarea/textarea.go:1960
↓ 1 callers
Method
barView
(b *strings.Builder, percent float64, textWidth int)
progress/progress.go:361
↓ 1 callers
Method
before
before reports whether p sorts before q in the buffer.
textarea/selection.go:19
↓ 1 callers
Method
capitalizeRight
capitalizeRight changes the word to the right to title case.
textarea/textarea.go:1083
↓ 1 callers
Function
clamp
(v, low, high int)
textinput/textinput.go:801
↓ 1 callers
Method
completionView
(offset, maxWidth int)
textinput/textinput.go:808
↓ 1 callers
Method
computedCursorLineNumber
()
textarea/textarea.go:232
↓ 1 callers
Method
computedLineNumber
()
textarea/textarea.go:243
↓ 1 callers
Method
computedPlaceholder
()
textarea/textarea.go:247
↓ 1 callers
Method
computedPrompt
()
textarea/textarea.go:251
↓ 1 callers
Method
computedSelection
()
textarea/textarea.go:259
↓ 1 callers
Method
coords
coords returns the line x column of this highlight.
viewport/highlight.go:129
↓ 1 callers
Function
countEnabledBindings
(groups [][]key.Binding)
list/list.go:1344
↓ 1 callers
Method
deleteAfterCursor
deleteAfterCursor deletes all text after the cursor. Returns whether or not the cursor blink should be reset. If input is masked delete everything aft
textarea/textarea.go:891
↓ 1 callers
Method
deleteBeforeCursor
deleteBeforeCursor deletes all text before the cursor. Returns whether or not the cursor blink should be reset.
textarea/textarea.go:883
↓ 1 callers
Method
deleteWordBackward
deleteWordBackward deletes the word left to the cursor.
textinput/textinput.go:420
↓ 1 callers
Method
deleteWordForward
deleteWordForward deletes the word right to the cursor. If input is masked delete everything after the cursor so as not to reveal word breaks in the m
textinput/textinput.go:467
↓ 1 callers
Function
deletesWhole
deletesWhole reports whether Backspace should remove the grapheme as a unit. Emoji and variation sequences are; anything else loses one code point at
textarea/grapheme.go:43
↓ 1 callers
Method
dotsView
()
paginator/paginator.go:187
↓ 1 callers
Method
echoTransform
(v string)
textinput/textinput.go:558
↓ 1 callers
Method
getEnumeratorStyle
()
tree/node.go:123
↓ 1 callers
Method
getIndenterStyle
()
tree/node.go:134
↓ 1 callers
Method
getItemOpts
()
tree/tree.go:705
↓ 1 callers
Method
handleBrowsing
Updates for when a user is browsing the list.
list/list.go:892
↓ 1 callers
Method
handleFiltering
Updates for when a user is in the filter editing interface.
list/list.go:950
↓ 1 callers
Method
highlightLines
highlightLines highlights the lines with [Model.HighlightStyle] and [Model.SelectedHighlightStyle].
viewport/viewport.go:377
↓ 1 callers
Function
insertItemIntoSlice
(items []Item, item Item, index int)
list/list.go:1318
↓ 1 callers
Method
insertRunesFromUserInput
(v []rune)
textinput/textinput.go:311
↓ 1 callers
Method
items
()
list/list.go:71
↓ 1 callers
Method
lowercaseRight
lowercaseRight changes the word to the right to lowercase.
textarea/textarea.go:1076
↓ 1 callers
Function
makeHighlightRanges
( highlights []highlightInfo, line int, style lipgloss.Style, )
viewport/highlight.go:140
↓ 1 callers
Function
maxLineWidth
(lines []string)
viewport/viewport.go:756
↓ 1 callers
Method
maxXOffset
maxXOffset returns the maximum possible value of the x-offset based on the viewport's content and set width.
viewport/viewport.go:307
↓ 1 callers
Method
mergeLineAbove
mergeLineAbove merges the current line the cursor is on with the line above.
textarea/textarea.go:2020
↓ 1 callers
Method
mergeLineBelow
mergeLineBelow merges the current line the cursor is on with the line below.
textarea/textarea.go:2000
↓ 1 callers
Function
newStack
()
filepicker/filepicker.go:170
↓ 1 callers
Function
nextID
()
progress/progress.go:28
↓ 1 callers
Function
nextID
()
stopwatch/stopwatch.go:13
↓ 1 callers
Function
nextID
()
cursor/cursor.go:20
↓ 1 callers
Function
nextID
()
filepicker/filepicker.go:22
↓ 1 callers
Function
nextID
()
timer/timer.go:13
↓ 1 callers
Function
nextID
()
spinner/spinner.go:16
↓ 1 callers
Function
numDigits
numDigits returns the number of digits in an integer.
textarea/textarea.go:2146
↓ 1 callers
Function
parseMatches
parseMatches converts the given matches into highlight ranges. Assumptions: - matches are measured in bytes, e.g. what [regex.FindAllStringIndex] wou
viewport/highlight.go:19
↓ 1 callers
Method
percentageView
(percent float64)
progress/progress.go:427
↓ 1 callers
Method
placeholderView
placeholderView returns the prompt and placeholder, if any.
textarea/textarea.go:1699
↓ 1 callers
Method
placeholderView
placeholderView returns the prompt and placeholder view, if any.
textinput/textinput.go:745
↓ 1 callers
Method
popView
()
filepicker/filepicker.go:193
↓ 1 callers
Method
populatedView
()
list/list.go:1244
↓ 1 callers
Method
previousSuggestion
previousSuggestion selects the previous suggestion.
textinput/textinput.go:899
↓ 1 callers
Method
pushView
(selected, minimum, maximum int)
filepicker/filepicker.go:187
↓ 1 callers
Function
removeItemFromSlice
Remove an item from a slice of items at the given index. This runs in O(n).
list/list.go:1335
↓ 1 callers
Function
repeatSpaces
(n int)
textarea/textarea.go:2141
↓ 1 callers
Method
rootStyle
()
tree/tree.go:714
↓ 1 callers
Function
runeIndexForColumn
runeIndexForColumn returns the index of the first rune of the grapheme occupying the given display column within runes, accounting for wide and multi-
textarea/selection.go:40
↓ 1 callers
Method
san
san initializes or retrieves the rune sanitizer.
textarea/textarea.go:872
↓ 1 callers
Method
selectionSpanFor
selectionSpanFor returns the half-open rune range [from, to) of the given logical row that is selected, restricted to the wrapped segment covering [ba
textarea/selection.go:226
↓ 1 callers
Function
sendString
(m Model, str string)
textinput/textinput_test.go:218
↓ 1 callers
Function
setYOffsets
setYOffsets updates each Node's yOffset based on how many items are "above" it, as well as its lineOffset based on how many rendered lines are "above"
tree/tree.go:611
↓ 1 callers
Method
setupGutter
setupGutter sets up the left gutter using [Model.LeftGutterFunc].
viewport/viewport.go:445
↓ 1 callers
Function
shouldRenderColumn
(b []key.Binding)
help/help.go:252
↓ 1 callers
Method
softWrap
(lines []string, maxWidth, maxHeight, total, ridx, voffset int)
viewport/viewport.go:403
↓ 1 callers
Function
softWrappedLineCount
(m Model)
textarea/textarea_test.go:208
↓ 1 callers
Method
splitLine
(row, col int)
textarea/textarea.go:2042
↓ 1 callers
Method
startKeyboardSelection
startKeyboardSelection begins a keyboard-driven selection at the current cursor position if one is not already active.
textarea/textarea.go:1891
↓ 1 callers
Method
styleLines
styleLines styles the lines using [Model.StyleLineFunc].
viewport/viewport.go:365
↓ 1 callers
Method
tick
(id, tag int)
spinner/spinner.go:184
↓ 1 callers
Method
timedout
()
timer/timer.go:205
↓ 1 callers
Method
updateAsModel
Author's note: this method has been broken out to make it easier to potentially transition Update to satisfy tea.Model.
viewport/viewport.go:660
↓ 1 callers
Method
updateKeyboardSelection
updateKeyboardSelection updates the selection head to the current cursor position after a keyboard movement.
textarea/textarea.go:1901
↓ 1 callers
Function
updateWithTick
updateWithTick executes cmd (expected to eventually deliver a TickMsg, possibly wrapped in a batch/sequence by the runtime), feeds the resulting TickM
timer/timer_test.go:397
↓ 1 callers
Method
uppercaseRight
uppercaseRight changes the word to the right to uppercase.
textarea/textarea.go:1069
↓ 1 callers
Method
visualLinesForInsert
visualLinesForInsert estimates how many additional visual lines would result from inserting the given lines at the current cursor position. The first
textarea/textarea.go:1970
↓ 1 callers
Function
withSuffix
withSuffix is a helper to add a temporary suffix to the test name. Primarily useful for golden tests since there is currently no way to have multiple
viewport/viewport_test.go:27
↓ 1 callers
Method
wordBackward
wordBackward moves the cursor one word to the left. If input is masked, move input to the start so as not to reveal word breaks in the masked input.
textinput/textinput.go:496
↓ 1 callers
Method
wordForward
wordForward moves the cursor one word to the right. If the input is masked, move input to the end so as not to reveal word breaks in the masked input.
textinput/textinput.go:528
Method
AvailableSuggestions
AvailableSuggestions returns the list of available suggestions.
textinput/textinput.go:835
Function
BenchmarkView
(b *testing.B)
viewport/viewport_test.go:809
Function
Blink
Blink returns the blink command for the virtual cursor.
textarea/textarea.go:1781
Function
Blink
Blink is a command used to initialize cursor blinking.
textinput/textinput.go:788
Method
Columns
Columns returns the current columns.
table/table.go:301
Method
CurrentSuggestionIndex
CurrentSuggestionIndex returns the currently selected suggestion index.
textinput/textinput.go:845
Method
Cursor
Cursor returns the index of the cursor on the current page.
list/list.go:549
Method
DecrPercent
DecrPercent decrements the percentage by a given amount, returning a command necessary to animate the progress bar to the new percentage. If you're r
progress/progress.go:323
Function
DefaultFilter
DefaultFilter uses the sahilm/fuzzy to filter through the list. This is set by default.
list/list.go:98
Function
DefaultLightStyles
DefaultLightStyles returns the default styles for a light background.
textarea/textarea.go:472
Function
DefaultLightStyles
DefaultLightStyles returns the default styles for a light background.
textinput/styles.go:38
Function
DefaultLightStyles
DefaultLightStyles returns a set of default styles for light backgrounds.
help/help.go:72
Function
DefaultLightStyles
DefaultLightStyles returns a set of default styles for light backgrounds.
tree/styles.go:106
Method
DeleteSelection
DeleteSelection deletes the currently selected text, positions the cursor at the start of the former selection, and clears the selection state. It is
textarea/textarea.go:1870
Method
DisableQuitKeybindings
DisableQuitKeybindings is a helper for disabling the keybindings used for quitting, in case you want to handle this elsewhere in your application.
list/list.go:700
Method
Enumerator
Enumerator sets the enumerator implementation. This can be used to change the way the branches indicators look. Lipgloss includes predefined enumerat
tree/node.go:251
Method
EnumeratorStyle
EnumeratorStyle sets a static style for all enumerators. Use EnumeratorStyleFunc to conditionally set styles based on the tree node.
tree/node.go:285
Method
Error
()
textinput/textinput_test.go:230
← previous
next →
401–500 of 843, ranked by callers