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

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
746
increased by9.87%
Maintainers
1
Weekly downloads
 
Created
Source

vue-material-tabs

Vue 2 tabs component ❤

Demo

⚓ Features

  • Pagination of nav and tabs
  • Pagination touchable
  • Vertical support
  • Very flexible and customizable
  • Multiple style themes

🚚 Install

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

🚀 Usage

Global

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

Vue.use(Tabs);

Local

import { tabs, tab } 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>
You can customize the name in the nav by slot #name (This removes the use of the prop name)
<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, you can apply them through the "theme" prop.

The default theme is, guess what, default, curious isn't it?!
  • default
  • purple
  • red
  • pink
  • cyan
  • green
Example
<Tabs theme="cyan" >
  ....
</Tabs>

You can create your own personalized themes, passing an object with the properties through the "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
valueString''The designated model value for the component.
themeString - Object'default'Apply a custom theme
verticalBooleanfalseUses a vertical transition when changing windows.
rippleBooleantrueEnalbe/disable ripple buttons effects.
slideDurationString - Number200Set time in ms slide duration.
slideVerticalBooleanfalseEnable vertical slide animation.
slideBoolean - ObjectfalseEnable/disable slide or set object with props.
navAutoBooleanfalseSet nav auto items.
navSliderBooleantrueEnable/disable slider under nav item.

Slots

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

Events

NameDescription
inputEmitted when tab is changed.
changeEmitted when tab is changed by user interaction.

TabItem

Props

NametypeDefaultdescription
nameString'Tab Item 'Sets the tab value in the nav menu.
disabledBooleanfalseRemoves the ability to click or target the component.

Slots

NameDescription
nameSlot for cutom name in nav

🔖 License

MIT

Keywords

FAQs

Package last updated on 13 Jun 2021

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