Get started with smooth-scrollbar CDN

MIT licensed

The smooth-scrollbar library is a lightweight JS solution for adding custom, visually appealing scrollbars with smooth scrolling functionality to any HTML element.

Tags:
  • scrollbar
  • customize
  • acceleration
  • performance

Stable version

Copied!

How to start using smooth-scrollbar CDN


<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="styles.css">
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/smooth-scrollbar.min.js"></script>
</head>
<body>
    <div id="container" style="height: 2000px;">
        <!-- Your content here -->
    </div>
    <script>
        document.addEventListener('DOMContentLoaded', () => {
            const container = document.querySelector('#container');
            SmoothScrollbar.init(container);
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions