Dotnav

Ready Added in 2.0.0

Create a dot navigation to operate slideshows or to scroll to different page sections.

Usage

To create a navigation with dots, use the following classes. This component is built with Flexbox. So to align a dotnav, you can use Flex component.

Class Description
.gls-dotnav Add this class to a <ul> element to define the Dotnav component. Use <a> elements as nav items within the list.
.gls-active Add this class to a list item to apply an active state.
<ul class="gls-dotnav">
    <li class="gls-active"><a href=""></a></li>
    <li><a href=""></a></li>
</ul>
  • <ul class="gls-dotnav">
        <li class="gls-active"><a href="#">Item 1</a></li>
        <li><a href="#">Item 2</a></li>
        <li><a href="#">Item 3</a></li>
        <li><a href="#">Item 4</a></li>
        <li><a href="#">Item 5</a></li>
    </ul>
    

Vertical alignment

The dotnav can also be displayed vertically. Just add the .gls-dotnav-vertical modifier.

<ul class="gls-dotnav gls-dotnav-vertical">...</ul>
  • <ul class="gls-dotnav gls-dotnav-vertical">
        <li class="gls-active"><a href="#">Item 1</a></li>
        <li><a href="#">Item 2</a></li>
        <li><a href="#">Item 3</a></li>
        <li><a href="#">Item 4</a></li>
        <li><a href="#">Item 5</a></li>
    </ul>
    

Position as overlay

To position the dotnav on top of an element or the Slideshow component for example, add one of the .gls-position-* classes from the Position component to a div element wrapping the dotnav. To create a position context on the container, add the .gls-position-relative class.

Use the .gls-light or .gls-dark class from the Inverse component to apply a light or dark color for better visibility.

<div class="gls-position-relative gls-light">

    <!-- The element which is wrapped goes here -->

    <div class="gls-position-bottom-center gls-position-small">
        <ul class="gls-dotnav">...</ul>
    </div>

</div>
  • <div class="gls-position-relative gls-light" gls-slideshow>
    
        <ul class="gls-slideshow-items">
            <li>
                <img src="https://utahhealthcare.github.io/gloss-docs/images/photo.jpg" alt="" gls-cover>
            </li>
            <li>
                <img src="https://utahhealthcare.github.io/gloss-docs/images/dark.jpg" alt="" gls-cover>
            </li>
            <li>
                <img src="https://utahhealthcare.github.io/gloss-docs/images/size1.jpg" alt="" gls-cover>
            </li>
        </ul>
    
        <div class="gls-position-bottom-center gls-position-small">
            <ul class="gls-dotnav">
                <li gls-slideshow-item="0"><a href="#">Item 1</a></li>
                <li gls-slideshow-item="1"><a href="#">Item 2</a></li>
                <li gls-slideshow-item="2"><a href="#">Item 3</a></li>
            </ul>
        </div>
    
    </div>
    

Vertically center in viewport

The dotnav can also be centered vertically inside your viewport by adding the .gls-position-center-right and .gls-position-fixed classes from the Position component. This is useful for typical onepage websites.

<div class="gls-position-center-right gls-position-medium gls-position-fixed">
    <ul class="gls-dotnav gls-dotnav-vertical">...</ul>
</div>