Shards Vue

Documentation

    Tabs

    Using the <d-tabs> component you can easily create tabbable panes of content.

    
    <d-tabs>
        <d-tab title="Tab 1" active>
            <div class="p-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin efficitur eros tellus. Fusce mollis felis a lorem euismod sollicitudin. Maecenas et porttitor mauris.</div>
        </d-tab>
        <d-tab title="Tab 2">
            <div class="p-3">Sed at lacus efficitur, imperdiet purus et, pretium arcu. Mauris vulputate, libero in dignissim auctor, nunc tortor interdum elit, ac dignissim ex enim vitae diam.</div>
        </d-tab>
    </d-tabs>
    
    <!-- tabs-1.vue -->
    

    Cards

    Wrapping the <d-tabs> component inside a <d-card> component you can also display the tabs as cards.

    
    <d-card>
        <d-tabs card>
            <d-tab title="Tab 1" active>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin efficitur eros tellus. Fusce mollis felis a lorem euismod sollicitudin. Maecenas et porttitor mauris.
            </d-tab>
            <d-tab title="Tab 2">
                Sed at lacus efficitur, imperdiet purus et, pretium arcu. Mauris vulputate, libero in dignissim auctor, nunc tortor interdum elit, ac dignissim ex enim vitae diam.
            </d-tab>
        </d-tabs>
    </d-card>
    
    <!-- tabs-2.vue -->
    

    Pills

    Using the pills prop you can turn your tab controls into 'pill' buttons.

    
    <d-card>
        <d-tabs card pills>
            <d-tab title="Tab 1" active>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin efficitur eros tellus. Fusce mollis felis a lorem euismod sollicitudin. Maecenas et porttitor mauris.
            </d-tab>
            <d-tab title="Tab 2">
                Sed at lacus efficitur, imperdiet purus et, pretium arcu. Mauris vulputate, libero in dignissim auctor, nunc tortor interdum elit, ac dignissim ex enim vitae diam.
            </d-tab>
        </d-tabs>
    </d-card>
    
    <!-- tabs-3.vue -->
    

    Vertical Tabs

    Placing the tab controls vertically can be easily achieved using the vertical prop.

    
    <d-card>
        <d-tabs card pills vertical>
            <d-tab title="Tab 1" active>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin efficitur eros tellus. Fusce mollis felis a lorem euismod sollicitudin. Maecenas et porttitor mauris.
            </d-tab>
            <d-tab title="Tab 2">
                Sed at lacus efficitur, imperdiet purus et, pretium arcu. Mauris vulputate, libero in dignissim auctor, nunc tortor interdum elit, ac dignissim ex enim vitae diam.
            </d-tab>
        </d-tabs>
    </d-card>
    
    <!-- tabs-4.vue -->
    

    Disabled Tab Controls

    You can set some of your tab controls as disabled, using the disabled prop

    
    <d-card>
        <d-tabs card pills vertical>
            <d-tab title="Tab 1" active>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin efficitur eros tellus. Fusce mollis felis a lorem euismod sollicitudin. Maecenas et porttitor mauris.
            </d-tab>
            <d-tab title="Disabled" disabled>
                Sed at lacus efficitur, imperdiet purus et, pretium arcu. Mauris vulputate, libero in dignissim auctor, nunc tortor interdum elit, ac dignissim ex enim vitae diam.
            </d-tab>
        </d-tabs>
    </d-card>
    
    <!-- tabs-5.vue -->
    

    Props

    PropDescriptionTypeDefaultRequired
    :idThe element ID.StringnullFalse
    :tagThe element tag.String"div"False
    :cardWhether it should be displayed as a card, or not.BooleanfalseFalse
    :valueThe value used to set the current tab.NumbernullFalse
    :pillsWhether the tab controls should be displayed as pills, or not.BooleanfalseFalse
    :verticalWhether the tab controls should be displayed vertically, or not.BooleanfalseFalse
    :content-classThe content class.StringnullFalse
    :nav-classThe nav class.StringnullFalse
    :nav-wrapper-classThe nav wrapper class.StringnullFalse

    Subcomponents

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

    <d-tab/>

    Props
    PropDescriptionTypeDefaultRequired
    :idThe element ID.StringnullFalse
    :activeThe active state.BooleanfalseFalse
    :tagThe element tag.String"div"False
    :button-idThe button ID.String""False
    :titleThe title.String""False
    :disabledThe disabled state.BooleanfalseFalse
    :no-bodyWhether the card should display the body, or not.BooleanfalseFalse