Anchor progress bar to element border

See here for the original answer.

I was able to get your example working with a few CSS changes, below are the only two parts I needed to change:

.App {
  overflow: hidden;
}

.emptyProgressBar {
  border-radius: 0px;
}

.fillingProgressBar {
  width: 102%;
}

Then in App.tsx, change your left style to -101, like the following:

left: props.percent - 101 + "%",

A working example forked from your sandbox is available here.


Tags

  1. css (Private)
  2. typescript (Private)
  3. react (Private)
  4. stack-overflow (Private)
  5. answer (Private)