Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


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


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.


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.


    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        .inactive {
            opacity: 0.5;

    <div id="my-scrollbar">
        <ul class="nave-list">
            <li class="nave-list-item skewElem">
                <a href="">Hello mom</a>
            <li class="nave-list-item skewElem">
                <a href="">salam baba</a>
            <li class="nave-list-item skewElem">
                <a href="">hi daddy</a>
            <li class="nave-list-item skewElem">
                <a href="">hi mommy</a>
            <li class="nave-list-item skewElem">
                <a href="">hi saadatrugs</a>
            <li class="nave-list-item skewElem">
                <a href="">hi saadat</a>


                body { 
  font-family: "Signika Negative", sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;

#my-scrollbar {

ul {
    list-style: none;
    transform-origin: top left;

li {
    font-size: 11.5vw;
    margin: 30vh 0;
    transform-origin: top left;

a {
    color: #f8f7f1;
    text-decoration: none;
    transform-origin: top left;


                document.querySelectorAll('.nave-list li').forEach(item => {
            item.addEventListener('mouseenter', event => {
      , function (child) {
                    if (child !== item) {
            item.addEventListener('mouseleave', event => {
      , function (child) {
                    if (child !== item) {


        // var Scrollbar = window.Scrollbar;
        const scroller = document.querySelector('#my-scrollbar');

        const options = {
            damping: 0.05,
            delegateTo: document,
            alwaysShowTracks: true,

        let bodyScrollBar = Scrollbar.init(scroller, options);

        ScrollTrigger.scrollerProxy("#my-scrollbar", {
            scrollTop(value) {
                if (arguments.length) {
                    bodyScrollBar.scrollTop = value;
                return bodyScrollBar.scrollTop;
            // getBoundingClientRect() {
            //     return {
            //         top: 0,
            //         left: 0,
            //         width: window.innerWidth,
            //         height: window.innerHeight
            //     };
            // }

      ScrollTrigger.defaults({ scroller: scroller });

//         bodyScrollBar.addListener(ScrollTrigger.update);

//         bodyScrollBar.track.yAxis.element.remove();

        let proxy = {
                skew: 0
            skewSetter = gsap.quickSetter(".skewElem", "skewY", "deg") // fast
            // clamp = gsap.utils.clamp(-5, 5); // don't let the skew go beyond 20 degrees. 

            scroller: "#my-scrollbar",
             scrub: true,
             markers: true,
            onUpdate: (self) => {
                let skew = (self.getVelocity() / -2000);
                // only do something if the skew is MORE severe. Remember, we're always tweening back to 0, so if the user slows their scrolling quickly, it's more natural to just let the tween handle that smoothly rather than jumping to the smaller skew.
                if (Math.abs(skew) > Math.abs(proxy.skew)) {
                    proxy.skew = skew;
          , {
                        skew: 0,
                        duration: 0.5,
                        ease: "power3.easeInOut",
                        overwrite: true,
                        onUpdate: () => skewSetter(proxy.skew)

        // make the right edge "stick" to the scroll bar. force3D: true improves performance
        // gsap.set(".skewElem", {
        //     force3D: true
        // });