Skip to main content

Overview

The SelectRenderable component provides a scrollable list of options with keyboard navigation, mouse support, and extensive visual customization. It supports both text-based and ASCII font rendering.

Basic Usage

Props

SelectOption[]
default:"[]"
Array of options to display. Each option has name, description, and optional value.
number
default:"0"
Initially selected option index
ColorInput
default:"'transparent'"
Background color when unfocused
ColorInput
default:"'#FFFFFF'"
Text color for unselected items
ColorInput
default:"'#1a1a1a'"
Background color when focused
ColorInput
default:"'#FFFFFF'"
Text color when focused
ColorInput
default:"'#334455'"
Background color of selected item
ColorInput
default:"'#FFFF00'"
Text color of selected item
ColorInput
default:"'#888888'"
Color for item descriptions
ColorInput
default:"'#CCCCCC'"
Color for selected item description
boolean
default:"false"
Show scroll position indicator on the right edge
boolean
default:"false"
Whether to wrap selection from last to first item (and vice versa)
boolean
default:"true"
Whether to show option descriptions
keyof typeof fonts
ASCII font to use for rendering option names (e.g., “block”, “standard”)
number
default:"0"
Vertical spacing between items in rows
number
default:"5"
Number of items to skip when fast scrolling (Shift+Up/Down)
SelectKeyBinding[]
Custom key bindings
KeyAliasMap
Custom key aliases

Types

SelectOption

Events

selectionChanged

Fired when the selected item changes (via keyboard or programmatically).

itemSelected

Fired when the user presses Enter on an item.

Methods

options

Get or set the list of options.

getSelectedOption()

Returns the currently selected option or null.

getSelectedIndex()

Returns the index of the currently selected option.

setSelectedIndex()

Programmatically select an option by index.

moveUp() / moveDown()

Move selection up or down by a specified number of steps.

selectCurrent()

Trigger selection of the current item (fires itemSelected event).

Keyboard Shortcuts

Examples

Simple Menu

Dynamic Options

With ASCII Font

With Scroll Indicator

File Picker

Settings Menu