mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[PR #120] [MERGED] feat: add scroll-box component #302
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#302
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/120
Author: @KurtGokhan
Created: 8/31/2025
Status: ✅ Merged
Merged: 9/2/2025
Merged by: @kommander
Base:
main← Head:add-scrollbox-component📝 Commits (10+)
902c001feat: add scroll-box component0d8bce5better content sizinge51fba2improve keyboard handling048d9e4use dedicated callbacks instead of event emittera94d940overflow:scroll7f5b740remove drag to scroll for nowcd7dc6atweak default styling62a425cfix format655ee32tweak options03666b9make shift+scroll work📊 Changes
7 files changed (+621 additions, -10 deletions)
View changed files
📝
packages/core/src/Renderable.ts(+12 -0)📝
packages/core/src/examples/index.ts(+7 -0)➕
packages/core/src/examples/scroll-example.ts(+90 -0)📝
packages/core/src/lib/parse.mouse.ts(+10 -10)➕
packages/core/src/renderables/ScrollBar.ts(+322 -0)➕
packages/core/src/renderables/ScrollBox.ts(+178 -0)📝
packages/core/src/types.ts(+2 -0)📄 Description
Buffering the content for better performance(postponed indefinitely)Clipping(Solved in #121)Keyboard events(done)Shift + wheel to do horizontal scroll(done)Nice to have future improvements
old video
https://github.com/user-attachments/assets/3a4ca7e5-9951-49b2-bdc0-7a0a70692d68
New video with clipping:
https://github.com/user-attachments/assets/e5cf89b9-07b6-4f12-b242-233c592764eb
Here is the default styling
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.