Viewport renders a fixed-size window over content that is larger than the screen. The user can scroll vertically (and optionally horizontally) with keyboard shortcuts or the mouse wheel.
Quick start
Constructors
Setting content
Dimensions
Programmatic scrolling
Scroll position
Horizontal scrolling
Styling
Mouse wheel
Mouse wheel scrolling is enabled by default. The scroll delta (lines per notch) defaults to 3.High-performance rendering
When running inside a full-screenAltScreen layout, enable high-performance rendering to let the renderer diff only the changed lines rather than redrawing the full viewport on every frame:
Keyboard navigation
Textarea
Editable multi-line input.
Components overview
Back to all components.