Skip to content

Scrollbar

widgetsfeedback

Show begin/end arrow symbols

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

PropTypeRequiredDescription
contentLengthnumberrequiredTotal number of content items
viewportLengthnumberrequiredNumber of items visible in the viewport
positionnumberoptionalCurrent scroll position (0-based)
orientationScrollbarOrientationoptionalScrollbar orientation
thumbColorColoroptionalColor of the thumb
trackColorColoroptionalColor of the track
showArrowsbooleanoptionalShow begin/end arrow symbols
#feedback#scrollbar