Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/prompt/mod.ts>GenericList

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class GenericList
extends GenericInput<T, V, S>
Re-export
Abstract
import { GenericList } from "https://deno.land/x/cliffy@v0.17.0/prompt/mod.ts";

Generic list prompt representation.

Constructors

new
GenericList(settings: S)

Properties

protected
listIndex: number
protected
listOffset: number
protected
options: S["options"]

Methods

protected
addChar(char: string): void
protected
body(): string | Promise<string>

Render options.

protected
deleteChar(): void
protected
deleteCharRight(): void
protected
getInfo(): string
protected
getList(): string

Render options list.

protected
getListHeight(): number

Get options row height.

protected
abstract
getListItem(item: GenericListOptionSettings, isSelected?: boolean): string

Render option.

protected
getOptionByValue(value: string): GenericListOptionSettings | undefined

Find option by value.

protected
handleEvent(event: KeyEvent): Promise<void>

Handle user input event.

protected
match(): void
protected
message(): string
protected
moveCursorLeft(): void
protected
moveCursorRight(): void
protected
read(): Promise<boolean>

Read user input.

protected
selectNext(): void

Select next option.

protected
selectNextPage(): void

Select next page.

protected
selectPrevious(): void

Select previous option.

protected
selectPreviousPage(): void

Select previous page.

Static Methods

Set list option defaults.

Create list separator.