1.4.0 • Published 6 years ago

fa-header v1.4.0

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Vue.js Header Components

This component provides typical header layout and functionality for responsive websites.

Demo

https://jsfiddle.net/du7pzdgs/2/

Getting Started

CDN:

https://unpkg.com/fa-header

NPM:

import FaHeader from 'fa-header'
Vue.use(FaHeader)

To use specific components:

import FaHeader from 'fa-header/src/components/Header.vue'
import FaNavigation from 'fa-header/src/components/Navigation.vue'
import FaSearch from 'fa-header/src/components/Search.vue'

new Vue({
    el: '#header',
    components: {
        FaHeader,
        FaNavigation,
        FaSearch
    }
});

Components

Header

This provides a wrapper for everything in the header that will become sticky at the specified point.

Example Usage

<fa-header :breakpoint="800" :sticky="-50">
    <div class="logo">LOGO</div>
    <fa-search :breakpoint="800">
        <form method="post">
            <input type="text" name="search" />
        </form>
    </fa-search>
   <fa-navigation :breakpoint="800" burgersticky>
       <ul>
           <li><a href="#">Link</a></li>
           <li><a href="#">Link</a></li>
       </ul>
   <fa-navigation>
</fa-header>

Options

PropDescriptionTypeDefault
breakpointWhen does the class header--desktop get appliedNumber1024
stickyThe point of when the header becomes sticky / adds the class header--sticky. To disable set the value to -1.Number-1

Classes

ClassDescription
header--desktopApplied when screen resolution is greater or equal to the breakpoint prop value.
header--stickyApplied if the header element has reached the top of the screen inc offset set by the sticky prop.

Navigation

This will display as normal on desktop but on mobile will move everything contained within it to a menu that scrolls in from the side.

Example Usage

<fa-navigation :breakpoint="800" burgersticky>
   <ul>
       <li><a href="#">Link</a></li>
       <li><a href="#">Link</a></li>
   </ul>
<fa-navigation>

Options

PropDescriptionTypeDefault
breakpointWhen does the class nav--desktop get applied.Number1024
burgerstickyOptionally show the burger menu when the header--sticky class is applied.Booleanfalse

Classes

ClassDescription
nav--desktopApplied when screen resolution is greater or equal to the breakpoint prop value.
nav--burgerstickyApplied if the burgersticky prop value is set to true.
nav--showApplied when the burger menu is opened.

Slots

NameDescription
iconOptionally set the icon content. By default a :before element will be applied with a FontAwesome icon, if using this slot you may want to hide that :before pseudo element with CSS.

Search

This will display as normal on desktop but on mobile will be replaced by a search icon which when clicked will open the contents in an absolutely positioned container.

Example usage

<fa-search :breakpoint="800">
    <form method="post">
        <input type="text" name="search" />
    </form>
</fa-search>

Options

PropDescriptionTypeDefault
breakpointWhen does the class search--desktop get applied.Number1024
iconstickyOptionally show the search icon when the header--sticky class is applied.Booleanfalse

Classes

ClassDescription
search--desktopApplied when screen resolution is greater or equal to the breakpoint prop value.
search--iconstickyApplied if the iconsticky prop value is set to true.
search--showApplied when the search icon is clicked.

Slots

NameDescription
iconOptionally set the icon content. By default a :before element will be applied with a FontAwesome icon, if using this slot you may want to hide that :before pseudo element with CSS.

MegaMenu

Moved to: https://github.com/FutureActivities/Vuejs-Menu

1.4.0

6 years ago

1.3.15

6 years ago

1.3.14

6 years ago

1.3.13

6 years ago

1.3.12

6 years ago

1.3.11

6 years ago

1.3.10

6 years ago

1.3.9

6 years ago

1.3.8

6 years ago

1.3.7

6 years ago

1.3.6

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.20

7 years ago

1.1.19

7 years ago

1.1.18

7 years ago

1.1.17

7 years ago

1.1.16

7 years ago

1.1.15

7 years ago

1.1.14

7 years ago

1.1.13

7 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago