Shards Vue

Documentation

    Breadcrumbs

    Breadcrumbs are a great component for indicating the current page's location within a navigation.

    Basic Example

    The <d-breadcrumb> component comes with an :items prop that accepts an array of objects representing each breadcrumb menu item.

    <template>
      <d-breadcrumb :items="breadcrumbItems"/>
    </template>
    
    <script>
    export default {
      data () {
        return {
          breadcrumbItems: [{
            text: 'Products',
            href: '#'
          }, {
            text: 'Home',
            href: '#'
          }, {
            text: 'Lightbulbs',
            active: true
          }]
        }
      }
    }
    </script>
    
    <!-- breadcrumb-1.vue -->
    

    Manual Breadcrumbs

    You can also compose your own breadscumb structures using the <d-breadcrumb-item> component.

    
    <d-breadcrumb>
        <d-breadcrumb-item :active="false" text="Products" href="#" />
        <d-breadcrumb-item :active="false" text="Home" href="#" />
        <d-breadcrumb-item :active="true" text="Lightbulbs" href="#" />
    </d-breadcrumb>
    
    <!-- breadcrumb-2.vue -->
    

    Props

    PropDescriptionTypeDefaultRequired
    :itemsThe breadcrumb items array.ArraynullFalse

    Subcomponents

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

    <d-breadcrumb-item/>

    Props
    PropDescriptionTypeDefaultRequired
    :textThe breadcrumb item text.StringnullFalse
    :hrefThe breadcrumb item href.String"#"False
    :activeWhether it is active, or not.BooleanfalseFalse

    <d-breadcrumb-link/>

    This subcomponent is inheriting Link component's props.

    Props
    PropDescriptionTypeDefaultRequired
    :text-StringnullFalse
    :active-BooleanfalseFalse
    :href-String"#"False
    :aria-current-String"location"False