Provides an interactive list UI with keyboard navigation for browsing items. Supports arrow key navigation, detail view, and customizable rendering.
View on GitHub →local interactiveList = require("tac.lib.interactive_list")
-- Simple list
local items = {
{name = "Item 1", description = "First item"},
{name = "Item 2", description = "Second item"}
}
local selected = interactiveList.show({
title = "Select an Item",
items = items,
formatItem = function(item) return item.name end,
formatDetails = function(item)
return {
"Name: " .. item.name,
"Description: " .. item.description
}
end
})
interactiveList.show(options)Show an interactive list with navigation
options (table): - Configuration optionsinteractiveList.menu(title, options)Show a simple menu with text options
title (string): - Menu titleoptions (table): - Array of option strings