All specs
Interactive · virtualized-list

Virtualized List

Windowed scrollable list for large datasets.

Anatomy

▸ api-gateway      running · us-east-1
· auth-service     running · us-east-1    ▎
· billing-svc      failed · eu-west-1     ▎
· cache-layer      running · ap-south-1
· data-worker      stopped

↑↓ navigate  ctrl+u/d page  ↵ select  esc cancel  1248 items

With search enabled:

▸ bill  3/1248

▸ billing-svc      failed
· billing-api      running
· bill-worker      stopped

↑↓ navigate  ↵ select  esc cancel  3 items

Usage

const item = await virtualizedList({
  items: services.map(s => ({
    value: s.id,
    label: s.name,
    description: `${s.status} · ${s.region}`,
  })),
  height: 20,
  searchable: true,
})

Options

KeyTypeDefaultDescription
itemsVirtualizedItem[]{ value, label, description? }
heightnumber?rows − 4Visible item count
searchableboolean?falseEnable inline filter
filter(query, item) => booleanfuzzy matchCustom filter function

Keyboard

KeyAction
Previous item
Next item
Ctrl+UHalf page up
Ctrl+DHalf page down
Select item
escCancel → null
charsFilter (when searchable)
Feature`search``virtualizedList`
RenderingAll filteredWindowed viewport
ScrollbarNoYes
Ideal for< 100 items100+ items
SearchAlwaysOptional

Out of scope

Multi-select

Grouping/sections

Variable height items

Infinite scroll / lazy loading