Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 278e792 Jan 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
.editorconfig
.gitignore
.npmignore
.travis.yml
README.md
license
package.json
yarn.lock

README.md

ink-progress-bar

Build Status

Progress bar component for Ink.

Install

$ npm install 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-progress-bar');

<ProgressBar
	character="x"
	percent={0.5}
	left={5}
	right={0}
	green
/>

Props

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

character

Type: string
Default: '█'

The character to use for each step.

percent

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

You can’t perform that action at this time.