0.0.4 • Published 4 years ago

vue-ant-steps v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

vue-ant-steps

Vue 2 steps/wizard ❤

Demo

⚓ Features

  • Zero dependencies
  • Typescript support
  • Pagination
  • Pagination touchable
  • Very flexible and customizable

🚚 Install

 yarn add vue-ant-steps  // npm install --save vue-ant-steps

🚀 Usage

Global

import Vue from "vue";
import Steps from "vue-ant-steps";
import "vue-ant-steps.min.css";

Vue.use(Steps);

Local

import { Steps, Step } from "vue-ant-steps";
import "vue-ant-steps.min.css";

export default {
  components: {
    Steps,
    Step,
  },
};

📌 Examples

<Steps>
  <Step name="Foo">
    <div class="first-step">First step</div>
  </Step>
  <Step name="Bar">
    <div class="second-step">Second step</div>
  </Step>
</Steps>

You can customize the title/description in the nav by the slot #title/#description (This removes the use of the prop title/description)

Example:

<Steps>
  <Step>
    <template #title>
        My custom title 🍉
    </template>

    <template #description>
         My custom description 🍉
    <template>

    <div class="first-step">
        First step
    </div>
  </Step>
</Steps>

Steps

Props

NametypeDefaultdescription
valuenumberundefinedThe designated model value for the component.
nonLinearbooleanfalseAllow user to jump to any step
heightstring - numberundefinedSets the height for the component.
widthstring - numberundefinedSets the width for the component.
maxHeightstring - numberundefinedSets the maximum height for the component.
maxWidthstring - numberundefinedSets the maximum width for the component.
minHeightstring - numberundefinedSets the minimum height for the component.
minWidthstring - numberundefinedSets the minimum width for the component.

Events

NameDescription
inputEmitted when tab is changed.

Step

Props

NametypeDefaultdescription
titlestring'Step'Set the title in the step item
descriptionstringundefinedSet the description in the step item

Slots

NameDescription
titleSlot for cutom title in nav
descriptionSlot for cutom description in nav

🔖 License

MIT

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago