4.0.1 • Published 1 year ago

@mtcmedia/vue-tabs-accordion v4.0.1

Weekly downloads
104
License
-
Repository
-
Last release
1 year ago

npm version

@mtcmedia/vue-tabs-accordion

This component is wrapper for MtcCollapsible. It groups MtcCollapsible into an accordion component. There is also a tabs mode. The modes can be flipped between using the responsive prop.

Install to production site

npm install @mtcmedia/vue-tabs-accordion

Usage

import MtcTabsAccordion from '@mtcmedia/vue-tabs-accordion'
import MtcCollapsible from '@mtcmedia/vue-collapsible'
import '@mtcmedia/vue-vue-tabs-accordion/dist/MtcTabsAccordion.css'
import '@mtcmedia/vue-collapsible/dist/MtcCollapsible.css'

Vue.component('MtcTabsAccordion', MtcTabsAccordion)
Vue.component('MtcCollapsible', MtcCollapsible)
<MtcTabsAccordion>
  <!-- you can loop over data to add multiple collapsible components -->
  <MtcCollapsible v-for="(tab, index) in data" :key="index" :active="tab.active">
    <template #title-text>{{ tab.title }}</template>
      <template #default>
        <div v-html="tab.content"></div>
      </template>
  </MtcCollapsible>

  <!-- or you can add them individually or a combination of both -->
  <MtcCollapsible :active="false">
    <template #title-text>This is a fourth Tab</template>
    <template #default>
      <h1>Here is some silly content.</h1>
    </template>
  </MtcCollapsible>
</MtcTabsAccordion>

Props

The component accepts these props:

AttributeTypeDefaultDescription
modeStringaccordionCan be set as tabs
responsiveObject{}Define mode for certain window widths

This component is mobile first.

{
    640: {
        mode: 'tabs'
    },
    1200: {
        mode: 'accordion'
    }
}

Slots

The component accepts these slots:

  • default : Must use MtcCollapsible component within the slot.

Development Setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your unit tests

npm run test:unit

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

4.0.1

1 year ago

4.0.0

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.2.2

3 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago

0.0.0

4 years ago