Todo:

  • Add active state
  • Resize icons on page scroll
  • Add Icon hover effect
<nav class="product-nav-wrap" data-sticky="true">
    <div class="product-nav-wrap__inner">
        <ul class="product-nav">
            <li class="product-nav__item">
                <a href="#" class="product-nav__link active">
					<span class="icon product-nav__icon"><i class="ss-check"></i></span>
					Features
				</a>
            </li>
            <li class="product-nav__item">
                <a href="#" class="product-nav__link">
					<span class="icon product-nav__icon"><i class="ss-thumbnails"></i></span>
					Extensions
				</a>
            </li>
            <li class="product-nav__item">
                <a href="#" class="product-nav__link">
					<span class="icon product-nav__icon"><i class="ss-openbook"></i></span>
					Documentation
				</a>
            </li>
            <li class="product-nav__item">
                <a href="#" class="product-nav__link">
					<span class="icon product-nav__icon"><i class="ss-help"></i></span>
					FAQs
				</a>
            </li>
            <li class="product-nav__item">
                <a href="#" class="product-nav__link">
					<span class="icon product-nav__icon"><i class="ss-flask"></i></span>
					Development
				</a>
            </li>
            <li class="product-nav__item">
                <a href="#" class="product-nav__link product-nav__link--highlight">
					<span class="icon product-nav__icon"><i class="ss-cart"></i></span>
					Buy&nbsp;License
				</a>
            </li>
        </ul>
    </div>
</nav>
{
  "links": [
    {
      "name": "Features",
      "icon": "check",
      "url": "#"
    },
    {
      "name": "Extensions",
      "icon": "thumbnails",
      "url": "#"
    },
    {
      "name": "Documentation",
      "icon": "openbook",
      "url": "#"
    },
    {
      "name": "FAQs",
      "icon": "help",
      "url": "#"
    },
    {
      "name": "Development",
      "icon": "flask",
      "url": "#"
    },
    {
      "name": "Buy&nbsp;License",
      "icon": "cart",
      "url": "#",
      "class": "product-nav__link--highlight"
    }
  ]
}
  • Content:
    /*------------------------------------*\
    	Product nav
    \*------------------------------------*/
    
    .product-nav-wrap {
    	position: sticky;
    	top: 0;
    	padding: 0;
    	width: 100%;
    	background: transparent;
    	text-align: center;
    	z-index: z-scale(navigation);
    }
    
    .product-nav-wrap__inner {
    	background: #fff;
    	border-bottom: 1px solid $color-grey-light;
    	transition: transform 300ms ease;
    	width: 100%;
    	overflow-x: scroll;
        overflow-y: hidden;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    
        &::-webkit-scrollbar-thumb,
        &::-webkit-scrollbar,
        &::-webkit-scrollbar-track {
            background-color: transparent;
            display: none;
        }
    }
    
    .product-nav {
    	@include reset-list();
    	display: inline-flex;
    	flex-wrap: no-wrap;
    	justify-content: center;
    	align-items: center;
    	width: auto;
    }
    
    .product-nav__item {
    	margin: 0 0.5rem;
    }
    
    .product-nav__link {
    	display: block;
    	padding: 0.8em 1em 0.7em;
    	text-align: center;
    	color: $color-grey-base;
    	border-bottom: 2px solid #fff;
    	transition: all 300ms ease-in-out;
    
    	&.active {
    		border-bottom: 2px solid $color-primary;
    		color: $color-primary;
    	}
    
    	&--highlight {
    		font-weight: bold;
    	}
    
    	&:hover {
    		text-decoration: none;
    		color: $color-primary;
    		border-bottom: 2px solid $color-primary;
    	}
    }
    
    .product-nav__icon {
    	display: block;
    	font-size: $font-size-h3;
    	opacity: 1;
    	transition: opacity 300ms ease;
    }
    
    .product-nav-wrap.is-top {
    	.product-nav-wrap__inner {
    		transform: translateY(-35px);
    	}
    
    	.product-nav__icon {
    		opacity: 0;
    	}
    }
    
    @include mq(medium) {
    	.product-nav-wrap.is-top .product-nav-wrap__inner {
    		transform: translateY(-40px);
    	}
    
    	.product-nav__link {
    		padding: 1em 1em 0.9em;
    	}
    
    	.product-nav__icon {
    		font-size: $font-size-h2;
    	}
    }
    
    @include mq(large) {
    	.product-nav-wrap.is-top .product-nav-wrap__inner {
    		transform: translateY(-48px);
    	}
    
    	.product-nav__item {
    		margin: 0 1em;
    	}
    
    	.product-nav__link {
    		display: block;
    		padding: 1.4em 1em 1.3em;
    	}
    
    	.product-nav__icon {
    		font-size: $font-size-h1;
    	}
    }
    
  • URL: /components/raw/product-nav/product-nav.scss
  • Filesystem Path: components/02-components/product-nav/product-nav.scss
  • Size: 2 KB