<div id='preview'>
  <p class='inner-content'>
    Text generated by Cat Ipsum.
    Hey! you there, with the hands find empty spot in cupboard and sleep all day. You are a captive audience
    sitting on the toilet, pet me play with twist ties good morning sunshine but leave dead animals as gifts
    cat door for ambush 10 times before coming in for what the heck just happened, something feels fishy. Check
    door for ambush 10 times before coming in fall asleep on the washing machine. Put claws in the eye of the
    beholder groom yourself 4 hours - checked, have your beauty sleep 18 hours - checked, be fabulous for the
    of the day - checked. Cat sit like bread purr wack the mini furry mouse. Make muffins. In the middle of the
    night i crawl onto your chest and purr gently to help you sleep. Poop in the plant pot gnaw the corn cob,
    munch salmono peer out window, chatter at birds, lure them to mouth do not try to mix old food with new one
    fool me!.

    I'm going to lap some water out of my master's cup meow chew foot, so stare at ceiling please stop looking
    your phone and pet me so licks paws. Meow find something else more interesting, yet kitty pounce, trip,
    faceplant you didn't see that no you didn't definitely didn't lick, lick, lick, and preen away the
    embarrassment. Lick the plastic bag eat from dog's food put toy mouse in food bowl run out of litter box at
    speed kitty scratches couch bad kitty massacre a bird in the living room and then look like the cutest and
    innocent animal on the planet howl on top of tall thing but waffles. Toy mouse squeak roll over eat my own
    and catty ipsum but if it fits i sits dream about hunting birds. Stuff and things mew. I shredded your
    for you. Mew give me some of your food give me some of your food give me some of your food meh, i don't want
    step on your keyboard while you're gaming and then turn in a circle . Look at dog hiiiiiisssss i could pee
    this if i had the energy. Lick arm hair ask to go outside and ask to come inside and ask to go outside and
    to come inside 𝕄𝔼𝕆𝕎 poop on grasses. Destroy couch cat snacks sit in a box for hours run off
    persian cat jump eat fish so mew mew catch small lizards, bring them into house, then unable to find them on
    carpet sugar, my siamese, stalks me (in a good way), day and night . Russian blue. Stinky cat drool at four
    the morning wake up owner meeeeeeooww scratch at legs and beg for food then cry and yowl until they wake up
    two pm jump on window and sleep while observing the bootyful cat next door that u really like but who
    has a boyfriend end up making babies with her and let her move in but lie on your belly and purr when you
    asleep sit on human.

    Poop on couch. Have my breakfast spaghetti yarn dismember a mouse and then regurgitate parts of it on the
    room floor yet cats go for world domination lick the other cats kitty pounce, trip, faceplant you didn't see
    that no you didn't definitely didn't lick, lick, lick, and preen away the embarrassment, meow meow pee in
    and sweet beast. Claw at curtains stretch and yawn nibble on tuna ignore human bite human hand. My slave
    didn't give me any food so i pooped on the floor jump on counter removed by human jump on counter again
    by human meow before jumping on counter this time to let the human know am coming back. Fight an alligator
    win leave hair on owner's clothes or poop in litter box, scratch the walls cat walks in keyboard and play
    twist ties the door is opening! how exciting oh, it's you, meh. Knock dish off table head butt cant eat out
    my own dish grab pompom in mouth and put in water dish so i'm bored inside, let me out i'm lonely outside,
    me in i can't make up my mind whether to go in or out, guess i'll just stand partway in and partway out,
    contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in
    greatest offense! but pee in human's bed until he cleans the litter box. Push your water glass on the floor.
    in circles bury the poop bury it deep, for grab pompom in mouth and put in water dish. Cat mojo chew
    slippers. Meowzer. Break lamps and curl up into a ball howl on top of tall thing take a big fluffing crap
    sit and stare bite the neighbor's bratty kid.

<div id="form-container">
  <div id="form">
    <div id='size-inputs'>
        <label for="scrollbar-width">Scrollbar Width (px)</label>
        <input id="scrollbar-width" name="scrollbar-width" type="number" min="0" step="10" value="20" />
        <label for="scrollbar-height">Scrollbar Height (px)</label>
        <input id="scrollbar-height" name="scrollbar-height" type="number" min="0" step="10" value="20" />
        <label for="scrollbar-border-radius">Border Radius (px)</label>
        <input id="scrollbar-border-radius" name="scrollbar-border-radius" type="number" min="0" step="2" value="8" />
    <div id="color-inputs">
        <label for="scrollbar-thumb-color">Thumb</label>
        <button id="thumb-color-picker" title="thumb-color-picker" />
        <label for="scrollbar-track-color">Track</label>
        <button id="track-color-picker" title="track-color-picker" />
        <label for="scrollbar-corner-color">Corner</label>
        <button id="corner-color-picker" title="corner-color-picker" />
body {
  font-family: "PT Mono", monospace;
  display: flex;
  flex-direction: row;
  margin: auto;
  padding: 24px;
  color: white;
  background-color: #000000;
  height: 100%;

#form-container {
  width: 50%;
  min-width: 30%;
  display: flex;
  align-items: center;
  justify-items: center;

#form {
  display: flex;
  justify-items: center;
  flex-direction: column;

#color-inputs {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;

#color-inputs > div {
  display: grid;
  place-items: center;
  margin-block-end: 16px;

#preview {
  margin: auto;
  width: 300px;
  height: 400px;
  resize: both;
  overflow: auto;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid white;
  color: black;
  background: rgba(255, 255, 255, 0.8);

#preview::-webkit-scrollbar {
  width: var(--scrollbar-width, 20px);
  height: var(--scrollbar-height, 20px);

#preview::-webkit-scrollbar-track {
  background: var(--scrollbar-track-color, #a1a1aa);

#preview::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-color, #3b82f6);
  border-radius: var(--scrollbar-border-radius, 8px);
const scrollbarDiv = document.getElementById("preview");
const heightInput = document.getElementById("scrollbar-height");
const widthInput = document.getElementById("scrollbar-width");
const borderRadiusInput = document.getElementById("scrollbar-border-radius");

const sizePropertyArray = [
    el: heightInput,
    property: "--scrollbar-height"
    el: widthInput,
    property: "--scrollbar-width"
    el: borderRadiusInput,
    property: "--scrollbar-border-radius"

const setSizeFieldOnChange = (el, property) => {
  el.onchange = () => {
    scrollbarDiv.style.setProperty(property, `${el.value}px`);

sizePropertyArray.forEach(({ el, property }) =>
  setSizeFieldOnChange(el, property)

// color

const bindColorPicker = (el, property, defaultColor) => {
  const pickr = Pickr.create({
    default: defaultColor,
    theme: "nano",
    swatches: [
      "rgba(244, 67, 54, 1)",
      "rgba(233, 30, 99, 0.95)",
      "rgba(156, 39, 176, 0.9)",
      "rgba(103, 58, 183, 0.85)",
      "rgba(63, 81, 181, 0.8)",
      "rgba(33, 150, 243, 0.75)",
      "rgba(3, 169, 244, 0.7)",
      "rgba(0, 188, 212, 0.7)",
      "rgba(0, 150, 136, 0.75)",
      "rgba(76, 175, 80, 0.8)",
      "rgba(139, 195, 74, 0.85)",
      "rgba(205, 220, 57, 0.9)",
      "rgba(255, 235, 59, 0.95)",
      "rgba(255, 193, 7, 1)"
    comparison: false,
    components: {
      preview: true,
      opacity: true,
      hue: true,
      interaction: {
        hex: true,
        rgba: true,
        hsla: true,
        hsva: true,
        cmyk: true,
        input: true,
        clear: true,
        save: true

    .on("change", (color, instance) => {
      scrollbarDiv.style.setProperty(property, color.toHEXA());
    .on("save", () => {});

const colorsPropertyArray = [
    el: "#thumb-color-picker",
    property: "--scrollbar-thumb-color",
    defaultColor: "#3B82F6"
    el: "#track-color-picker",
    property: "--scrollbar-track-color",
    defaultColor: "#A1A1AA"
    el: "#corner-color-picker",
    property: "--scrollbar-corner-color",
    defaultColor: "#FFFFFF"

colorsPropertyArray.forEach(({ el, property, defaultColor }) =>
  bindColorPicker(el, property, defaultColor)

External CSS

  1. https://fonts.googleapis.com/css2?family=PT+Mono&amp;display=swap
  2. https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css

External JavaScript

  1. https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js