Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-material-tabs

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-material-tabs

Vue.js tabs component based in material design

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Vue material tabs 🚀

MIT npm Version Vulnerabilities

Tab component based on material design, used to show content one at a time, it can also be used as a browser between pages.

Demo

⚓ Features

  • Touch swippe.
  • Vertical and animation support.
  • Flexible and customizable.
  • Zero dependencies.

🚚 Install

 yarn add vue-material-tabs  // npm install --save vue-material-tabs

🚀 Usage

Global

import Vue from "vue";
import VueMaterialTabs from "vue-material-tabs";

Vue.use(VueMaterialTabs);

Local

import { Tabs, TabItem } from "vue-material-tabs";

export default {
  components: {
    Tabs,
    TabItem,
  },
};

📌 Examples

<Tabs>
  <TabItem name="Foo">
    <div class="first-tab">First tab</div>
  </TabItem>
  <TabItem name="Bar">
    <div class="second-tab">Second tab</div>
  </TabItem>
</Tabs>
Do use #name slot to customize the nav title (When the slot #name is used, the prop name is replaced)
<Tabs>
  <TabItem>
    <template #name>
        My custom title 🍉
    </template>

    <div class="first-tab">
      First tab
    </div>
  </TabItem>
</Tabs>

👑 Themes

There are some themes available to customize your tab nav.
  • default
  • purple
  • red
  • pink
  • cyan
  • green
Example
<Tabs theme="cyan">....</Tabs>

You can create your own custom themes, with theme prop.

Example
<Tabs :theme="theme" >
  ....
</Tabs>
....
<script>
  export default {
    data: () => ({
      theme: {
        nav: "#4A148C",
        navItem: "#BDBDBD",
        navActiveItem: "#fff",
        slider: "#CE93D8",
        arrow: "#f3f3f3",
      },
    }),
  };
</script>

Tabs

Props

NametypeDefaultdescription
valueStringundefinedThe designated model value for the component.
themeString - Object'default'Apply an available or customized theme.
verticalBooleanfalseUses a vertical transition when changing windows.
rippleBooleantrueRipple tab nav effect.
slideDurationString - Number200Set slide duration in ms.
slideVerticalBooleanfalseVertical slide animation.
slideBoolean - ObjectfalseEnable/disable slide or set object with props.
navAutoBooleanfalseOrganize tab nav items auto
navSliderBooleantrueNav bar slider.
noTouchBooleanfalseSwippe tab by touch.

Slots

NameDescriptionProps
navSlot to replace the nav menu.{ navItems: Array, active: String }

Events

NameDescription
inputEmitted when tab is changed.

TabItem

Props

NametypeDefaultdescription
nameString'Tab Item'Tab item title
disabledBooleanfalseRemoves the ability to click or target the component.

Slots

NameDescription
nameCustom tab nav name

🔖 License

MIT

Keywords

FAQs

Package last updated on 21 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc