2
0
mirror of https://github.com/tenrok/vue-form-wizard.git synced 2026-05-17 05:09:37 +03:00
cristijora 1088e57362 Support shape types (circle, square and simple tabs)
Support any kind of icons and display numbers if icons are not provided
Getting rid of many bootstrap dependencies: progress-bar, navs (WIP for buttons)
2017-04-17 13:49:26 +03:00
2017-04-16 13:06:20 +03:00
2017-04-16 13:05:09 +03:00
2017-04-16 13:01:16 +03:00
2017-04-16 18:49:09 +03:00

WIP vue-tab-wizard

A dynamic tab wizard to split your forms easier

Vue-tab-wizard is a vue based component which simplifies tab wizard management and allows you to focus on the functional part of your app rather than wasting time on details. Just forget about id's, external scripts and jQuery dependencies

Demo

Refer to this fiddle Vue-tab-wizard is bootstrap dependent for now and won't work without the css from bootstrap (working on making it bootstrap free). Also vue-tab-wizard works with themify-icons only (WIP)

Usage

<tab-wizard>
  <tab-content title="Personal details">
    My first tab content
  </tab-content>
  <tab-content title="Additional Info">
      My second tab content
   </tab-content>
   <tab-content title="Last step">
     Yuhuuu! This seems pretty damn simple
   </tab-content>
</tab-wizard>

Props

Tab Wizard props

props: {
  title: {
    type: String,
    default: 'Awesome Wizard'
  },
  subtitle: {
    type: String,
    default: 'Split a complicated flow in multiple steps'
  },
  nextButtonText: {
    type: String,
    default: 'Next'
  },
  backButtonText: {
    type: String,
    default: 'Back'
  },
  finishButtonText: {
    type: String,
    default: 'Finish'
  },
  /***
  * Applies to text, border and circle
  */
  color: {
    type: String,
    default: '#e74c3c' //circle, border and text color
  },
  /**
  * name of the transition when transition between steps
  */
  transition: {
    type: String,
    default: '' //name of the transition when transition between steps 
  },
  /***
  * Index of the initial tab to display
  */
  startIndex: {
    type: Number,
    default: 0
  }
}

Tab content props

props: {
  title: {
    type: String,
    default: ''
  },
  /***
   * Icon name for the upper circle corresponding to the tab
   * Supports themify icons only for now.
   */
  icon: {
    type: String,
    default: ''
  },
  /***
   * Function to execute before tab switch. Return value must be boolean
   * If the return result is false, tab switch is restricted
   */
  beforeChange: {
    type: Function
  }
}

Slots

  • Default - Used for tab-contents
  • title - Upper title section including sub-title
  • prev - Previous button content (no need to worry about handling the button functionality)
  • next - Next button content
  • finish - Finish button content
S
Description
No description provided
Readme 1.2 MiB
Languages
Vue 51.5%
JavaScript 32.4%
CSS 13.1%
TypeScript 2.7%
HTML 0.3%