tac.lib.interactive_list v1.0.2

Provides an interactive list UI with keyboard navigation for browsing items. Supports arrow key navigation, detail view, and customizable rendering.

Author: Twijn
View on GitHub →

Examples

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
})

Functions

interactiveList.show(options)

View source

Show an interactive list with navigation

Parameters:
Returns: table|nil - Selected item or nil if cancelled

interactiveList.menu(title, options)

View source

Show a simple menu with text options

Parameters:
Returns: string|nil - Selected option or nil if cancelled