Volver al ranking

jacoborus/nanobar

JavaScriptnanobar.jacoborus.codes

Very lightweight progress bars. No jQuery

progressbarminimalist
Crecimiento de estrellas
Estrellas
2.8k
Forks
262
Crecimiento semanal
Issues
8
1k2k
feb 2014mar 2018may 2022jul 2026
Artefactosnpmnpm install nanobar
README

nanobar

Very lightweight progress bars (~699 bytes gzipped).

Compatibility: iE7+ and the rest of the world

npm version Bower version

Demo

See nanobar.jacoborus.codes

Installation

Download and extract the latest release or install with package manager:

Bower:

$ bower install nanobar

npm:

$ npm install nanobar

Usage

Load

Link nanobar.js from your html file

<script src="path/to/nanobar.min.js"></script>

or require it:

var Nanobar = require('path/to/nanobar');

Generate progressbar

var nanobar = new Nanobar( options );

options

  • id <String>: (optional) id for nanobar div
  • classname <String>: (optional) class for nanobar div
  • target <DOM Element>: (optional) Where to put the progress bar, nanobar will be fixed to top of document if no target is passed

Move bar

Resize the bar with nanobar.go(percentage)

arguments

  • percentage <Number> : percentage width of nanobar

Example

Create bar

var options = {
	classname: 'my-class',
  id: 'my-id',
	target: document.getElementById('myDivId')
};

var nanobar = new Nanobar( options );

//move bar
nanobar.go( 30 ); // size bar 30%
nanobar.go( 76 ); // size bar 76%

// size bar 100% and and finish
nanobar.go(100);

Customize bars

Nanobar injects a style tag in your HTML head. Bar divs has class .bar, and its containers .nanobar, so you can overwrite its values.

Default css:

.nanobar {
  width: 100%;
  height: 4px;
  z-index: 9999;
  top:0
}
.bar {
  width: 0;
  height: 100%;
  transition: height .3s;
  background:#000;
}

You should know what to do with that ;)




© 2016 jacoborus - Released under MIT License

Repositorios relacionados
tqdm/tqdm

:zap: A Fast, Extensible Progress Bar for Python and CLI

PythonPyPIOtherprogressbarprogressmeter
tqdm.github.io
31.2k1.5k
Tamsiree/RxTool

Android开发人员不得不收集的工具类集合 | 支付宝支付 | 微信支付(统一下单) | 微信分享 | Zip4j压缩(支持分卷压缩与加密) | 一键集成UCrop选择圆形头像 | 一键集成二维码和条形码的扫描与生成 | 常用Dialog | WebView的封装可播放视频 | 仿斗鱼滑动验证码 | Toast封装 | 震动 | GPS | Location定位 | 图片缩放 | Exif 图片添加地理位置信息(经纬度) | 蛛网等级 | 颜色选择器 | ArcGis | VTPK | 编译运行一下说不定会找到惊喜

KotlinApache License 2.0dialogprogressbar
12.3k2.8k
kimmobrunfeldt/progressbar.js

Responsive and slick progress bars

JavaScriptnpmMIT Licenseprogressbarjavascript
kimmobrunfeldt.github.io/progressbar.js
7.9k1.4k
rsalmei/alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!

PythonPyPIMIT Licenseprogressbar
6.3k235
pterm/pterm

✨ PTerm is a modern Go module to easily beautify console output. Featuring charts, progressbars, tables, trees, text input, select menus and much more 🚀 It's completely configurable and 100% cross-platform compatible.

GoGo ModulesMIT Licensegogolang
pterm.sh
5.5k220
schollz/progressbar

A really basic thread-safe progress bar for Golang applications

GoGo ModulesMIT Licenseprogress-bargolang
pkg.go.dev/github.com/schollz/progressbar/v3
4.7k254
jedib0t/go-pretty

Table-writer and more in golang!

GoGo ModulesMIT Licensegolangtablewriter
3.5k135
davidhu2000/react-spinners

A collection of loading spinner components for react

TypeScriptnpmMIT Licenseloaderreact
davidhu.io/react-spinners
3.3k283
relatedcode/ProgressHUD

ProgressHUD is a lightweight and easy-to-use HUD for iOS. Over 5000+ animations.

SwiftMIT Licenseprogresshudprogressbar
relatedcode.com
3k507
briandowns/spinner

Go (golang) package with 90 configurable terminal spinner/progress indicators.

GoGo ModulesApache License 2.0gogolang
2.5k130
unjs/webpackbar

Elegant ProgressBar and Profiler for Webpack 3 , 4 and 5

TypeScriptnpmMIT Licensewebpackprofile
2.1k65
jfelchner/ruby-progressbar

Ruby/ProgressBar is a text progress bar library for Ruby.

RubyRubyGemsMIT Licenseprogress-barprogressbar
1.6k131