Shards Vue

Documentation

    Navbars

    Using the <d-navbar> component you can create powerful and responsive navigation headers.

    Basic Example

    
    <d-navbar toggleable="md" type="dark" theme="primary">
      <d-navbar-toggle target="nav-collapse"></d-navbar-toggle>
      <d-navbar-brand>
          <h6 class="text-white my-auto mr-4">Shards Vue</h6>
      </d-navbar-brand>
    
      <d-collapse is-nav id="nav-collapse">
        <d-navbar-nav>
            <d-nav-item href="#">Link</d-nav-item>
            <d-nav-item href="#" disabled>Disabled</d-nav-item>
            <d-dropdown text="Dropdown" is-nav>
                <d-dropdown-item>Action</d-dropdown-item>
                <d-dropdown-item>Another action</d-dropdown-item>
                <d-dropdown-item>Something else here</d-dropdown-item>
                <d-dropdown-divider />
                <d-dropdown-item>Separated link</d-dropdown-item>
            </d-dropdown>
        </d-navbar-nav>
    
        <d-navbar-nav class="ml-auto">
            <d-input-group seamless>
                <d-input-group-text slot="prepend">
                    <fa :icon="['fas', 'search']" />
                </d-input-group-text>
                <d-input size="sm" placeholder="Search..."/>
            </d-input-group>
        </d-navbar-nav>
    
      </d-collapse>
    </d-navbar>
    
    <!-- navbar-1.vue -->
    

    Themes and Text Colors

    The <d-navbar> component supports all available color themes as well as text color types such as dark or light.

    Placement

    You an control the placement of the navbar component using the fixed and sticky props.

    Props

    PropDescriptionTypeDefaultRequired
    :tagThe element tag.String"nav"False
    :typeThe navbar type.String"light"False
    :themeThe theme color.StringFalse
    :toggleableWhether the navbar is toggleable, or not. Also accepts String for breakpoint definition.String | BooleanfalseFalse
    :fixedFix the navbar to either `top` or `bottom`.StringFalse
    :stickyWhether the navbar should be sticky.BooleanfalseFalse

    Subcomponents

    The following subcomponents are available for the <d-navbar/> component:

    <d-navbar-brand/>

    This subcomponent is inheriting Link component's props.

    Props
    PropDescriptionTypeDefaultRequired
    :tag-String"div"False

    <d-navbar-nav/>

    Props
    PropDescriptionTypeDefaultRequired
    :tagThe element tag.String"ul"False
    :fillWhether it should fill the entire space, or not.BooleanfalseFalse
    :justifiedWhether to proportionally fill all abailable space, or not.BooleanfalseFalse

    <d-navbar-toggle/>

    Props
    PropDescriptionTypeDefaultRequired
    :labelThe label value.String"Toggle navigation"False
    :targetThe toggle target.StringTrue