nanobar icon indicating copy to clipboard operation
nanobar copied to clipboard

Progress Percentage inside loading bar

Open gaarenstroom opened this issue 9 years ago • 1 comments

Hello,

I would like to know if its possible to show the progress of the loading bar. For example: http://www.tennodrops.com/relics/

I recreated the page above with the Nanobar (the one above conflicts allot(html css build)) But i can't figure out a way to add the percentage numbers inside the bar.

Thankyou

gaarenstroom avatar Aug 09 '16 23:08 gaarenstroom

Hello, I didn't design the progress bar to do that, but you can try changing the innerHTML of the element:

const progress = nanobar({
  id: 'my-id'
})

function go (x) {
  progress.go(x)
  progress.el.lastChild.innerHTML(x)
}

go(30)

jacoborus avatar Aug 23 '16 00:08 jacoborus