Check out example codes for "change scrollbar color". It will help you in understanding the concepts better.

Code Example 1

.scrollable-element {
  scrollbar-color: red yellow; /* red is for the thumb and yellow is for the track */
}

Code Example 2

/* The emerging W3C standard
   that is currently Firefox-only */
* {
  scrollbar-width: thin;
  scrollbar-color: blue orange;
}

/* Works on Chrome/Edge/Safari */
*::-webkit-scrollbar {
  width: 12px;
}
*::-webkit-scrollbar-track {
  background: orange;
}
*::-webkit-scrollbar-thumb {
  background-color: blue;
  border-radius: 20px;
  border: 3px solid orange;
}

Learn ReactJs, React Native from akashmittal.com