nanobar

WebJar for nanobar

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

nanobar
Последняя версия

Последняя версия

0.4.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

nanobar
WebJar for nanobar
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/jacoborus/nanobar

Скачать nanobar

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/nanobar/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>nanobar</artifactId>
    <version>0.4.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/nanobar/
implementation 'org.webjars.bower:nanobar:0.4.2'
// https://jarcasting.com/artifacts/org.webjars.bower/nanobar/
implementation ("org.webjars.bower:nanobar:0.4.2")
'org.webjars.bower:nanobar:jar:0.4.2'
<dependency org="org.webjars.bower" name="nanobar" rev="0.4.2">
  <artifact name="nanobar" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='nanobar', version='0.4.2')
)
libraryDependencies += "org.webjars.bower" % "nanobar" % "0.4.2"
[org.webjars.bower/nanobar "0.4.2"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

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

Версии библиотеки

Версия
0.4.2