← Back

Implement This Scrollbar

Copy both lines and paste in your HTML <head> tag
<!-- init.Ovi Custom Scrollbar Implementation --> <link rel="stylesheet" href="https://iamovi.github.io/bar/bar.css"> <script src="https://iamovi.github.io/bar/bar.js"></script>

What You Get

This implementation combines both visual styling and smooth scrolling behavior to create a premium browsing experience.

How It Works

The bar.css file styles your scrollbar with a dynamic rainbow gradient that animates based on scroll position. The scrollbar smoothly transitions through the color spectrum as you navigate the page.

The bar.js file adds intelligent smooth scrolling behavior. On desktop, it provides a slow, cinematic scroll with slight overshoot for a luxurious feel. On mobile and touch devices, it uses native scrolling to ensure the best performance and user experience.

Scroll down to experience the magic
Notice the smooth scrolling...

The Scrollbar Design

The scrollbar features a vibrant rainbow gradient that continuously animates as you scroll. Each position on the page corresponds to a different hue, creating a dynamic visual feedback system.

The design includes subtle glow effects on hover and active states, making the scrollbar feel interactive and modern.

Keep going...

Smooth Scroll Behavior

On desktop devices, the custom JavaScript adds a cinematic scrolling experience with carefully tuned physics. The scroll has momentum, easing, and a tiny overshoot that makes navigation feel luxurious.

On mobile and touch devices, the script automatically detects the input method and falls back to native scrolling, ensuring optimal performance and respecting user preferences.

Almost there...

That's It!

Just two lines of code in your HTML <head> section, and you're ready to go. Both the styling and smooth scroll behavior will work automatically across all modern browsers.