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.1
  • Source
  • npm
  • Socket score

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

Vue material tabs 🚀

MIT npm Version Vulnerabilities

Vue material tabs it's a tab component based in material design, is used for show one content at a time, also can use with a navigator between of page.

Demo

⚓ Features

  • Dynamic and touchscreen pagination.
  • Vertical nav and animation support.
  • Very flexible and customizable.
  • Many themes.
  • 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>
Use #name slot to customize the nav title (When the slot #name it's used, the prop name is disabled)
<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.
  • default (Set by 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
valueStringundefinedThe 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.
noTouchBooleanfalseEnable/disable slider tabs 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 '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 25 Nov 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