class RatatuiRuby::List
A widget that displays a list of selectable items.
- items
-
An array of strings to display in the list.
- selected_index
-
The index of the currently selected item, or nil if none.
- style
-
The base style for all items.
- highlight_style
-
The style for the selected item.
- highlight_symbol
-
The symbol to display in front of the selected item.
- block
-
An optional
Blockwidget to wrap the list.
Public Class Methods
Source
# File lib/ratatui_ruby/schema/list.rb, line 24 def initialize(items: [], selected_index: nil, style: nil, highlight_style: nil, highlight_symbol: "> ", block: nil) super end
- items
-
An array of strings to display in the list.
- selected_index
-
The index of the currently selected item, or nil if none.
- style
-
The base style for all items.
- highlight_style
-
The style for the selected item.
- highlight_symbol
-
The symbol to display in front of the selected item.
- block
-
An optional
Blockwidget to wrap the list.
Calls superclass method