Scrollbar
feedback
Show begin/end arrow symbols
Terminal
$termuijs render scrollbar
Installation
$ bunx termuijs add scrollbar
Copies the source into src/components/scrollbar/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Scrollbar } from '@termuijs/widgets'ts
new Scrollbar(style: Partial<Style> = {}, opts: ScrollbarOptions)API Reference
Scrollbar
| Prop | Type | Required | Description |
|---|---|---|---|
contentLength | number | required | Total number of content items |
viewportLength | number | required | Number of items visible in the viewport |
position | number | optional | Current scroll position (0-based) |
orientation | ScrollbarOrientation | optional | Scrollbar orientation |
thumbColor | Color | optional | Color of the thumb |
trackColor | Color | optional | Color of the track |
showArrows | boolean | optional | Show begin/end arrow symbols |