Skip to content

vadimdemedes/ink-progress-bar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ink-progress-bar

Build Status

Progress bar component for Ink.

Install

$ npm install --save ink-progress-bar

Usage

See examples/basic.js for an example app. Run it with ./examples/run basic.

const {h} = require('ink');
const ProgressBar = require('ink-progrss-bar');

<ProgressBar
	char="x"
	progress={0.5}
	left={5}
	right={0}
	green
/>

Props

All props except the ones below are passed to <Text> as-is.

char

Type: string
Default: '█'

The character to use for each step.

progress

Type: number
Default: 0

The percentage (between 0 and 1) of progress.

left

right

Type: number
Default: 0

The number of characters to subtract from each side of the progress bar. Commonly used if you want text before/after the progress bar on the same line. See examples/basic.js for an example.

License

MIT © Frankie Bagnardi

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%