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
↓ 93 callers
Method
Update
Update is the update loop for items. All messages in the list's update loop will pass through here except when the user is setting a filter. Use this
list/list.go:60
↓ 50 callers
Function
newTextArea
()
textarea/textarea_test.go:2798
↓ 43 callers
Method
SetWidth
SetWidth sets the width of the textarea to fit exactly within the given width. This means that the textarea will account for the width of the prompt a
textarea/textarea.go:1216
↓ 42 callers
Method
Height
Height is the height of the list item.
list/list.go:51
↓ 37 callers
Method
Render
Render renders the item's view.
list/list.go:48
↓ 32 callers
Method
SetHeight
SetHeight sets the height of the textarea.
textarea/textarea.go:1279
↓ 30 callers
Method
SetValue
SetValue sets the value of the text input.
textarea/textarea.go:526
↓ 29 callers
Method
Error
()
textarea/textarea_test.go:3231
↓ 28 callers
Function
keyPress
(key rune)
textarea/textarea_test.go:2811
↓ 22 callers
Method
Value
Value returns the value of the text input.
textarea/textarea.go:649
↓ 21 callers
Method
SetCursorColumn
SetCursorColumn moves the cursor to the given position. If the position is out of bounds the cursor will be moved to the start or end accordingly. A p
textarea/textarea.go:777
↓ 19 callers
Function
New
New creates a new model for the table widget.
table/table.go:133
↓ 19 callers
Method
YOffset
YOffset returns the vertical offset of the Node.
tree/node.go:69
↓ 18 callers
Function
New
New creates a new model with default settings.
textinput/textinput.go:160
↓ 18 callers
Function
New
New returns a new model with the given width and height as well as default key mappings.
viewport/viewport.go:43
↓ 18 callers
Method
SelectedText
SelectedText returns the selected text, with logical lines joined by "\n". It returns the empty string when nothing is selected.
textarea/selection.go:176
↓ 18 callers
Function
sendString
(m Model, str string)
textarea/textarea_test.go:2815
↓ 16 callers
Method
CursorStart
CursorStart moves the cursor to the start of the input field.
textarea/textarea.go:788
↓ 16 callers
Method
HasSelection
HasSelection reports whether a non-empty selection is active.
textarea/selection.go:157
↓ 16 callers
Method
SetContent
SetContent set the pager's text content. Line endings will be normalized to '\n'.
viewport/viewport.go:223
↓ 16 callers
Function
WithColumns
WithColumns sets the table columns (headers).
table/table.go:153
↓ 16 callers
Function
WithHeight
WithHeight is an initialization option that sets the height of the viewport. Pass as an argument to [New].
viewport/viewport.go:35
↓ 16 callers
Method
updatePagination
Update pagination according to the amount of items for the current state.
list/list.go:815
↓ 15 callers
Method
Focus
Focus sets the focus state on the model. When the model is in focus it can receive keyboard input and the cursor will be hidden.
textarea/textarea.go:813
↓ 15 callers
Function
New
New creates a new timer with the given timeout and default 1s interval.
timer/timer.go:103
↓ 15 callers
Function
WithWidth
WithWidth is an initialization option that sets the width of the viewport. Pass as an argument to [New].
viewport/viewport.go:27
↓ 15 callers
Function
newDynamicTextArea
(minH, maxH int)
textarea/textarea_test.go:2256
↓ 14 callers
Function
NewBinding
NewBinding returns a new keybinding from a set of BindingOpt options.
key/key.go:54
↓ 14 callers
Method
String
Used to print the Node's tree.
tree/node.go:104
↓ 14 callers
Function
WithKeys
WithKeys initializes a keybinding with the given keystrokes.
key/key.go:63
↓ 13 callers
Function
New
New creates a new model with default settings.
textarea/textarea.go:401
↓ 13 callers
Method
SetCursor
SetCursor moves the cursor to the given position. If the position is out of bounds the cursor will be moved to the start or end accordingly.
textinput/textinput.go:250
↓ 13 callers
Method
View
View renders the text area in its current state.
textarea/textarea.go:1637
↓ 13 callers
Function
WithRows
WithRows sets the table rows (data).
table/table.go:160
↓ 13 callers
Method
updateViewport
(movement int)
tree/tree.go:359
↓ 12 callers
Method
Focus
Focus sets the focus state on the model. When the model is in focus it can receive keyboard input and the cursor will be shown.
textinput/textinput.go:272
↓ 12 callers
Method
UpdateViewport
UpdateViewport updates the list content based on the previously defined columns and rows.
table/table.go:264
↓ 12 callers
Function
WithHelp
WithHelp initializes a keybinding with the given help text.
key/key.go:70
↓ 12 callers
Method
YOffset
YOffset returns the current Y offset - the vertical scroll position.
viewport/viewport.go:466
↓ 12 callers
Function
newSelectionTextarea
(t *testing.T, value string)
textarea/selection_test.go:10
↓ 11 callers
Function
Matches
Matches checks if the given key matches the given bindings.
key/key.go:130
↓ 11 callers
Function
New
New creates a new model with defaults.
paginator/paginator.go:129
↓ 10 callers
Method
BeginSelection
BeginSelection starts a selection at the given textarea-relative coordinates, discarding any previous selection, and moves the cursor there. Pair it w
textarea/selection.go:105
↓ 10 callers
Method
EndSelection
EndSelection completes an in-progress drag. The selection itself is retained so it can be read with [Model.SelectedText]; a zero-width selection (a pl
textarea/selection.go:128
↓ 10 callers
Method
ExtendSelection
ExtendSelection extends an in-progress selection to the given textarea-relative coordinates and moves the cursor there. It is a no-op unless [Model.Be
textarea/selection.go:115
↓ 10 callers
Method
Length
Length returns the number of nodes.
tree/node.go:214
↓ 10 callers
Method
SetTotalPages
SetTotalPages is a helper function for calculating the total number of pages from a given number of items. Its use is optional since this pager can be
paginator/paginator.go:64
↓ 10 callers
Method
SetValue
SetValue sets the value of the text input.
textinput/textinput.go:213
↓ 10 callers
Function
WithHeight
WithHeight sets the height of the table.
table/table.go:167
↓ 10 callers
Function
WithInterval
WithInterval is an option for setting the interval between ticks. Pass as an argument to [New].
timer/timer.go:24
↓ 10 callers
Method
cursorLineNumber
cursorLineNumber returns the line number that the cursor is on. This accounts for soft wrapped lines.
textarea/textarea.go:1917
↓ 10 callers
Function
graphemeAt
graphemeAt returns the rune range of the grapheme containing the rune at col. Keeping the public cursor and selection positions as rune offsets preser
textarea/grapheme.go:14
↓ 10 callers
Method
updateKeybindings
Set keybindings according to the filter state.
list/list.go:768
↓ 9 callers
Method
LineInfo
LineInfo returns the number of characters from the start of the (soft-wrapped) line and the (soft-wrapped) line width.
textarea/textarea.go:1093
↓ 9 callers
Method
View
View renders the component.
table/table.go:251
↓ 8 callers
Method
At
At returns the node at the index.
tree/node.go:209
↓ 8 callers
Function
New
New creates a new help view with some useful defaults.
help/help.go:93
↓ 8 callers
Function
Root
Root returns a new tree with the root set.
tree/node.go:396
↓ 8 callers
Method
Running
Running returns whether or not the timer is running. If the timer has timed out this will always return false.
timer/timer.go:124
↓ 8 callers
Method
SetYOffset
SetYOffset sets the Y offset.
viewport/viewport.go:461
↓ 8 callers
Method
VisibleItems
VisibleItems returns the total items available to be shown.
list/list.go:498
↓ 8 callers
Method
Width
Width returns the width of the textarea.
textarea/textarea.go:1165
↓ 8 callers
Function
WithWidth
WithWidth sets the width of the table.
table/table.go:174
↓ 8 callers
Method
totalVisualLines
totalVisualLines returns the total number of display lines across all logical lines, accounting for soft wraps.
textarea/textarea.go:1930
↓ 7 callers
Method
Child
Child adds a child to this tree. If a Child Node is passed without a root, it will be parented to it's sibling child (auto-nesting). tree.Root("Foo
tree/node.go:357
↓ 7 callers
Method
Cursor
Cursor returns the index of the selected row.
table/table.go:347
↓ 7 callers
Method
CursorEnd
CursorEnd moves the cursor to the end of the input field.
textarea/textarea.go:793
↓ 7 callers
Function
New
New returns a new model with sensible defaults.
list/list.go:234
↓ 7 callers
Function
New
New creates a new model with default settings.
tree/tree.go:137
↓ 7 callers
Method
SetSuggestions
SetSuggestions sets the suggestions for the input.
textinput/textinput.go:291
↓ 7 callers
Method
SetWidth
SetWidth sets the width of the text input.
textinput/textinput.go:208
↓ 7 callers
Method
SetYOffset
SetYOffset sets the tree to select the node at the given vertical offset and scrolls to it.
tree/tree.go:644
↓ 7 callers
Method
Value
Value returns the root name of this node.
tree/node.go:144
↓ 7 callers
Method
View
View renders the textinput in its current state.
textinput/textinput.go:676
↓ 7 callers
Method
View
View renders the component.
tree/tree.go:209
↓ 7 callers
Method
activeStyle
activeStyle returns the appropriate set of styles to use depending on whether the textarea is focused or blurred.
textarea/textarea.go:804
↓ 7 callers
Function
clamp
(v, low, high int)
textarea/textarea.go:2159
↓ 7 callers
Function
findNode
findNode starts a DFS search for the node with the given yOffset starting from the given item.
tree/tree.go:730
↓ 7 callers
Method
memoizedWrap
(runes []rune, width int)
textarea/textarea.go:1905
↓ 7 callers
Method
validate
(v []rune)
textinput/textinput.go:906
↓ 6 callers
Method
Children
Children returns the children of an item.
tree/node.go:168
↓ 6 callers
Method
ClearSelection
ClearSelection removes the current selection, if any.
textarea/selection.go:149
↓ 6 callers
Method
Elapsed
Elapsed returns the time elapsed.
stopwatch/stopwatch.go:167
↓ 6 callers
Method
Enabled
Enabled returns whether or not the keybinding is enabled. Disabled keybindings won't be activated and won't show up in help. Keybindings are enabled b
key/key.go:106
↓ 6 callers
Method
GotoBottom
GotoBottom moves the selection to the last row.
table/table.go:421
↓ 6 callers
Function
New
New creates a new stopwatch with 1s interval.
stopwatch/stopwatch.go:67
↓ 6 callers
Method
PositionAt
PositionAt maps coordinates within the textarea's rendered area to a buffer position. Coordinates are relative to the textarea itself: (0, 0) is its t
textarea/selection.go:63
↓ 6 callers
Method
ScrollDown
ScrollDown moves the view down by the given number of lines.
viewport/viewport.go:515
↓ 6 callers
Method
Size
Size returns the number of nodes in the tree. Note that if a child isn't open, its size is 1.
tree/node.go:54
↓ 6 callers
Method
Timedout
Timedout returns whether or not the timer has timed out.
timer/timer.go:132
↓ 6 callers
Method
Value
Value returns the value of the text input.
textinput/textinput.go:239
↓ 6 callers
Method
maxCursorIndex
()
list/list.go:630
↓ 6 callers
Method
maxHeight
maxHeight returns the maximum height of the viewport. It accounts for the frame size.
viewport/viewport.go:323
↓ 6 callers
Method
maxYOffset
maxYOffset returns the maximum possible value of the y-offset based on the viewport's content and set height.
viewport/viewport.go:300
↓ 6 callers
Method
recalculateHeight
recalculateHeight recomputes and applies the textarea height based on content when DynamicHeight is enabled. It is a no-op otherwise.
textarea/textarea.go:1940
↓ 6 callers
Method
repositionView
repositionView repositions the view of the viewport based on the defined scrolling behavior.
textarea/textarea.go:1134
↓ 6 callers
Method
visibleLines
visibleLines returns the lines that should currently be visible in the viewport.
viewport/viewport.go:329
↓ 5 callers
Method
Blink
Blink is a command used to manage cursor blinking.
cursor/cursor.go:183
↓ 5 callers
Method
GotoTop
GotoTop moves the selection to the first row.
table/table.go:416
↓ 5 callers
Method
Index
Index returns the index of the currently selected item as it is stored in the filtered list of items. Using this value with SetItem() might be incorre
list/list.go:532
next →
1–100 of 843, ranked by callers