Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <html>
  <head>
  </head>
  <body class="py-5">
    <div class="container">
      <button type="button" class="my-5 btn neumorphic-btn">Button</button>
      <div class="text-center">
        <div class="neumorphic-progress">
          <div class="neumorphic-progress__back"></div>
          <div class="neumorphic-progress__line"></div>
        </div>
        <div class="neumorphic-slider" onselectstart="return false" style="margin-top: 100px;">
          <div class="neumorphic-slider__back"></div>
          <div class="neumorphic-slider__line"></div>
          <div class="neumorphic-slider__thumb"></div>
          <div class="neumorphic-slider__popover">40%</div>
        </div>
      </div>
      <div class="my-5 row justify-content-center">
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <label class="neumorphic-text">Do you have Tripophobia?</label>
      </div>
      <div class="mt-5 row justify-content-center">
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
      </div>
      <div class="mt-2 row justify-content-center">
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
      </div>
      <div class="mt-2 row justify-content-center">
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
      </div>
      <div class="mt-2 row justify-content-center">
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
      </div>
      <div class="mt-2 row justify-content-center">
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
      </div>
      <div class="mt-2 row justify-content-center">
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
        <button type="button" class="btn neumorphic-btn neumorphic-checkbox"></button>
      </div>
    </div>
    <div class="container p-4">
      <div class="neumorphic-card mx-auto">
        <label class="neumorphic-label" for="login__input">Login</label>
        <input class="neumorphic-input" id="login__input" type="text" />
        <label class="neumorphic-label" for="password_input">Password</label>
        <input class="neumorphic-input" id="password_input" type="text" />
        <button type="button" class="btn neumorphic-btn mt-5 mb-3">Log in</button>
      </div>
    </div>
    <div class="container card-collection p-4">
      <div class="neumorphic-card mx-auto">
        <div class="neumorphic-card__outer">
          <image class="neumorphic-image" height="300" src="https://images.unsplash.com/photo-1562883676-8c7feb83f09b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=661&q=80" /><!-- Photo by @alfonstaekema https://unsplash.com/photos/lvXeO04CxwQ -->
        </div>
        <div class="neumorphic-card__title">Barcelona</div>
        <div class="neumorphic-card__text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
      </div>
      <div class="neumorphic-card mx-auto">
        <div class="neumorphic-card__outer">
          <image class="neumorphic-image" height="300" src="https://images.unsplash.com/photo-1517824488624-8d6e5cdbf991?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" /><!-- Photo by @martenbjork https://unsplash.com/photos/zr-zkaQd7f4 -->
        </div>
        <div class="neumorphic-card__title">Stockholm</div>
        <div class="neumorphic-card__text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
      </div><div class="neumorphic-card mx-auto">
        <div class="neumorphic-card__outer">
          <image class="neumorphic-image" height="300" src="https://images.unsplash.com/photo-1517736996303-4eec4a66bb17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" /><!-- Photo by @robinoode https://unsplash.com/photos/4ZtYoQavCVI -->
        </div>
        <div class="neumorphic-card__title">Amsterdam</div>
        <div class="neumorphic-card__text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
      </div>
    </div>
    <div class="container">
      <div class="neumorphic-outer mx-auto p-5 neumorphic-tab-container" style="width: 600px;">
        <div class="neumorphic-tab-container__controls">
          <div class="neumorphic-tab-container__control neumorphic-tab-container__control_active" data-target="barcelona">Barcelona</div>
          <div class="neumorphic-tab-container__control" data-target="stockholm">Stockholm</div>
          <div class="neumorphic-tab-container__control" data-target="amsterdam">Amsterdam</div>
        </div>
        <div class="neumorphic-inner neumorphic-tab-container__tab neumorphic-tab-container__tab_shown" id="barcelona">
          <image class="neumorphic-image" height="300" src="https://images.unsplash.com/photo-1562883676-8c7feb83f09b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=661&q=80" /><!-- Photo by @alfonstaekema https://unsplash.com/photos/lvXeO04CxwQ -->
          <div class="py-2 px-4 text-left">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
        </div>
        <div class="neumorphic-inner neumorphic-tab-container__tab" id="stockholm">
          <image class="neumorphic-image" height="300" src="https://images.unsplash.com/photo-1517824488624-8d6e5cdbf991?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" /><!-- Photo by @martenbjork https://unsplash.com/photos/zr-zkaQd7f4 -->
          <div class="py-2 px-4 text-left">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
        </div>
        <div class="neumorphic-inner neumorphic-tab-container__tab" id="amsterdam">
          <image class="neumorphic-image" height="300" src="https://images.unsplash.com/photo-1517736996303-4eec4a66bb17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" /><!-- Photo by @robinoode https://unsplash.com/photos/4ZtYoQavCVI -->
          <div class="py-2 px-4 text-left">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
        </div>
      </div>
    </div>
    <div class="container py-5 card-collection">
      <div class="neumorphic-card" style="min-width: 300px;">
        <div class="neumorphic-image__wrapper">
          <image class="neumorphic-image" src="https://i.pinimg.com/originals/cb/98/4a/cb984a8d358ee8ff8355b6ab3d9dbe4b.jpg" width="100" />
        </div>
        <h4 class="neumorphic-card__title text-center">Emily Blunt</h4>
        <div class="neumorphic-card__text">British-American actress. I hope nobody minds me using picture of her, she's just pretty.</div>
      </div>
      <div class="neumorphic-card" style="min-width: 300px;">
        <div class="neumorphic-image__wrapper">
          <div class="neumorphic-image__placeholder">JD</div>
        </div>
        <h4 class="neumorphic-card__title text-center">John Doe</h4>
        <div class="neumorphic-card__text">Name instance for somebody abstract. At least you won't get charged fee for him.</div>
      </div>
    </div>
  </body>
</html>
              
            
!

CSS

              
                :root {
  --value: 40%;
  --back-color: #EBECF0;
}

body {
  background-color: var(--back-color);
  text-align: center;
  justify-content: center;
}

.btn:focus {
  outline:none !important;
}

.neumorphic-btn {
  font-size: 20px;
  border: none;
  padding: 10px 40px;
  border-radius: 40px;
  color: #6D7587;
  background-color: var(--back-color);
  /*box-shadow: 3px 4px 6px 1px rgba(0, 0, 0, 0.3), 
              -2px -2px 4px 2px rgba(255, 255, 255, 1), 
              inset -14px -14px 20px -10px rgba(0, 0, 0, 0.1),
              inset 14px 14px 20px -10px rgba(255, 255, 255, 0.5) !important;  */
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              inset 0px 0px 4px rgba(255, 255, 255, .2),
              inset 7px 7px 15px rgba(55, 84, 170, 0),
              inset -7px -7px 20px rgba(255, 255, 255, 0),
              0px 0px 4px rgba(255, 255, 255, 0) !important;
  transition: box-shadow .25s ease !important;
}

.neumorphic-btn:active {  
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              inset 0px 0px 4px rgba(255, 255, 255, 0),
              inset 7px 7px 15px rgba(55, 84, 170, .15),
              inset -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important;
}

.neumorphic-progress, .neumorphic-slider {
  width: 260px;
  margin: auto;
}

.neumorphic-progress__back, .neumorphic-slider__back {
  height: 24px;
  background-color: var(--back-color);
  border-radius: 10px;
  border: 4px solid #f3f4f7;
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              inset 0px 0px 4px rgba(255, 255, 255, 0),
              inset 7px 7px 15px rgba(55, 84, 170, .15),
              inset -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important;
}

.neumorphic-slider {
  width: 240px;
}

.neumorphic-slider__back {
  width: calc(100% + 20px);
  margin-left: -10px;
}

.neumorphic-progress__line {
  width: var(--value);
  height: 16px;
  background-color: #185BF1;
  margin-top: -20px;
  margin-left: 4px;
  border-radius: 8px;
  opacity: 1;
  animation: sliding 3s ease infinite;
}

@keyframes sliding {
  0% {
    width: 0;
  }
  100% {
    width: calc(100% - 8px);
  }
}

.neumorphic-slider {
  position: relative;
}

.neumorphic-slider__line {
  height: 16px;
  background-color: #185BF1;
  margin-top: -20px;
  margin-left: -6px;
  border-radius: 8px;
  opacity: 1;
  width: calc(var(--value) + 4px);
}

.neumorphic-slider__thumb {
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15), 0px 0px 15px rgba(55, 84, 170, .3);
  width: 20px;
  height: 20px;
  position: absolute;
  border-radius: 50%;
  background-color: var(--back-color);
  left: var(--value);
  top: 2px;
  margin-left: -10px;
  cursor: pointer;
}

.neumorphic-slider__popover {
  position: absolute;
  background-color: var(--back-color);
  left: var(--value);
  width: 60px;
  height: 40px;
  top: -60px;
  margin-left: -30px;
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2);    
  color: #6D7587;    
  padding: 8px 0;
}

.neumorphic-slider__popover::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  bottom: -6px;
  left: 50%;
  margin-left: -6px;
  border-style: solid;
  border-width: 6px 6px 0 6px;
  border-color: var(--back-color) transparent transparent transparent;
}

.neumorphic-text {
  color: #a3aab9;
  margin: auto 30px;
  font-size: 22px;
}

.neumorphic-checkbox {
  padding: 20px;
  position: relative;
  margin: 0 5px;
  transition: all .25s ease;
}

.neumorphic-checkbox::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #a3aab9;
  background: transparent;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all .25s ease;
}

.neumorphic-checkbox_active {  
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              inset 0px 0px 4px rgba(255, 255, 255, 0),
              inset 7px 7px 15px rgba(55, 84, 170, .15),
              inset -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important;
}

.neumorphic-checkbox_active::after {
  background-color: #a3aab9;
}

.neumorphic-card {
  display: block;    
  background-color: var(--back-color);
  padding: 40px;  
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important;
  border-radius: 30px;
  max-width: 300px;
  width: min-content;
}

.neumorphic-card__title {
  color: #555F76;
  font-size: 22px;
  padding: 20px 0 10px;
  text-align: start;
}

.neumorphic-card__text {
  padding: 0 0 10px;
  text-align: start;
  color: #8D96A8;
}

.neumorphic-card__outer {
  background-color: #f3f4f7;
  border-radius: 10px;
  border: 5px solid #f3f4f7;
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important;  
  margin: -5px;
}

.neumorphic-label {
  color: #868b98;
  display: block;
  text-align: start;
  margin: 25px 10px 5px;
}

.neumorphic-input {
  background-color: var(--back-color);
  border-radius: 10px;
  border: 3px solid #f3f4f7;
  box-shadow: 2px 2px 3px rgba(55, 84, 170, .15),
              inset 0px 0px 4px rgba(255, 255, 255, 0),
              inset 7px 7px 15px rgba(55, 84, 170, .15),
              inset -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important;
  padding: 5px 15px;
  outline: none !important;
  color: #535D74;
}

.neumorphic-image {
  border-radius: 10px;
}

.neumorphic-image__wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50% !important;
  overflow: hidden;
  margin: 0 auto;
  border: 2px solid var(--back-color);
  box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0),
              inset 3px 3px 5px rgba(55, 84, 170, .15),
              inset -3px -3px 5px rgba(255, 255, 255, .5),
              0px 0px 4px rgba(255, 255, 255, .2) !important;
}

.neumorphic-image__placeholder {
    color: #565e74;
    font-size: 30px;
    padding: 25px 0 0 0;
}

.card-collection .neumorphic-card {
  display: inline-block;
  margin: 0 10px !important;
}

.neumorphic-outer {
  box-shadow: 7px 7px 15px rgba(55, 84, 170, .15),
              -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important;
  background-color: var(--back-color);
  border-radius: 30px;
}

.neumorphic-inner {
  box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0),
              inset 7px 7px 15px rgba(55, 84, 170, .15),
              inset -7px -7px 20px rgba(255, 255, 255, 1),
              0px 0px 4px rgba(255, 255, 255, .2) !important; 
  border-radius: 10px;
}

.neumorphic-tab-container {
  display: flex;
  flex-direction: column;
}

.neumorphic-tab-container__controls {       
  display: flex;
  border: 4px solid var(--back-color);
  width: min-content;
  background-color: var(--back-color);
  border-radius: 15px;
  margin-bottom: 15px;
}

.neumorphic-tab-container__control {
  padding: 10px 10px;
  color: #535D74;
  background-color: var(--back-color);
  box-shadow: inset 0px 0px 4px rgba(255, 255, 255, .2), inset 7px 7px 15px rgba(55, 84, 170, 0), inset -7px -7px 20px rgba(255, 255, 255, 0);
  transition: box-shadow .4s ease;
  cursor: pointer;
}

.neumorphic-tab-container__control:first-child {
    border-top-left-radius: 11px;
    border-bottom-left-radius: 11px;
}

.neumorphic-tab-container__control:last-child {
    border-top-right-radius: 11px;
    border-bottom-right-radius: 11px;
}

.neumorphic-tab-container__control_active {
  box-shadow: inset 0px 0px 4px rgba(255, 255, 255, 0), inset 7px 7px 15px rgba(55, 84, 170, .15), inset -7px -7px 20px rgba(255, 255, 255, 1);
}

.neumorphic-tab-container__tab {
  display: none;
  padding: 20px;
}

.neumorphic-tab-container__tab_shown {
  display: flex;
}
              
            
!

JS

              
                $('.neumorphic-checkbox').on('click', function(){
  $(this).toggleClass('neumorphic-checkbox_active');
});

$('.neumorphic-tab-container__control').on('click', function(){
  if ($(this).hasClass('neumorphic-tab-container__control_active')){
    return false;
  }
  $('.neumorphic-tab-container__tab_shown').removeClass('neumorphic-tab-container__tab_shown');
  $('.neumorphic-tab-container__control_active').removeClass('neumorphic-tab-container__control_active');
  $(this).addClass('neumorphic-tab-container__control_active');
  $('#'+$(this).data('target')).addClass('neumorphic-tab-container__tab_shown');
});

$('.neumorphic-slider__thumb').on('mousedown', function(){
  $(document).on('mousemove.mm', function(e){
    var new_value = 0;
    if (e.clientX < $('.neumorphic-slider').offset().left) {
      new_value = '0%';
    } else if (e.clientX > $('.neumorphic-slider').offset().left + $('.neumorphic-slider').width() - 10) {
      new_value = '100%';
    } else {
      new_value = ((e.clientX - $('.neumorphic-slider').offset().left) / ($('.neumorphic-slider').width() - 10) * 100).toFixed(0) + '%';
    }
    document.documentElement.style.setProperty('--value', new_value);
    $('.neumorphic-slider__popover').text(new_value);
  });
  $(document).on('mouseup.mu', function(){
    $(document).off('mousemove.mm');
    $('.neumorphic-slider__thumb').off('mouseup.mu');
  });
});
              
            
!
999px

Console