
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
scrollable-cli
Advanced tools
Create independent scrollable areas with ANSI support in the terminal.
npm install scrollable-cli
Create a scrollable area with content and print it:
import Scrollable from 'scrollable-cli';
const box = Scrollable({
content:
"Lorem ipsum is boring but I couldn't think " +
"of anything else, so here's a yellow cat:" +
chalk.yellow(`
|\\---/|
| o_o |
`),
start: { x: 10, y: 3 },
size: { width: 22, height: 4 },
wrapOptions: { trim: false, hard: false, wordWrap: true }
})
.print();
Or use the fluent API:
const box = Scrollable()
.setContent("...")
.setStart({ x: 10, y: 3 })
.setSize({ width: 22, height: 4 })
.setWrapOptions({ trim: false, hard: false, wordWrap: true })
.print();
Scroll the content up and down:
box.scroll(1).print(); // Down
box.scroll(-1).print(); //Up
This package doesn't handle keypress events to make it easier for you to integrate it with your own keypress event handler:
const box = Scrollable(/* ... */);
emitKeypressEvents(process.stdin);
process.stdin.setRawMode(true);
process.stdin.on('keypress', (str, key) => {
switch (key.name) {
case 'up':
box.scroll(-1).print();
break;
case 'down':
box.scroll(1).print();
break;
}
});
git clone https://github.com/pawap90/scrollable-cli.git
npm install
npm run example --file=<example-file-name>
## Or for windows:
npm run example:win --file=<example-file-name>
## E.g:
npm run example --file=1-simple-box
npm run example:win --file=1-simple-box
Example file | Description |
---|---|
1-simple-box | Prints a simple "lorem ipsum" box that scrolls automatically up and down. |
2-keypress-events | Prints 3 independent boxes that can be scrolled up and down with the arrow keys. |
npm test
FAQs
Create independent scrollable areas in the terminal.
The npm package scrollable-cli receives a total of 6 weekly downloads. As such, scrollable-cli popularity was classified as not popular.
We found that scrollable-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.