Components/List (fuzzy filter)

List (fuzzy filter)

New

A full-featured list: incremental fuzzy/subsequence filtering, item descriptions, a status bar, viewport scrolling and per-element styling. Press / to filter, type to narrow, Esc to clear.

Install the package

Every component ships in the single dart_tui package.

$dart pub add dart_tui
list (fuzzy filter) · dart_tui
List (fuzzy filter) demo

ListModel

PropertyTypeDescription
itemsList<ListItem>Full (unfiltered) item list. Each ListItem has a title and description.
titleStringHeading shown above the list.
heightintVisible rows (viewport height). Defaults to 10.
filterStringActive filter query.
filterModeboolWhether the filter input is focused.
showDescriptionboolRender each item's description line.
showStatusBarboolShow the count / filter status bar.

Keybindings

↑ / k, ↓ / jMove cursor
/Enter filter mode
escClear filter
enterSelect the highlighted item

Related