Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

smartwizard

techlab28.7kMIT6.0.6TypeScript support: definitely-typed

The awesome step wizard plugin for jQuery

jQuery, Wizard, Tabs, Steps, Bootstrap, Plugin, Step, ui, jquery-plugin, Tabs

readme

jQuery Smart Wizard v6

The awesome step wizard plugin for jQuery

Build Status npm version jsDelivr Hits Npm Downloadsl GitHub license GitHub Repo GitHub Sponsor Donate on Paypal

jQuery Smart Wizard is an accessible step wizard plugin for jQuery. Provides a neat, usable and stylish user interface for your forms, checkout screen, registration process, etc. Easy to implement, Bootstrap compatiblity, customizable toolbars, themes and colors, events and Ajax support are few of the features.

Demos

Screenshots

Smart Wizard Demo

Smart Wizard Demo

Smart Wizard Arrows Dark

Smart Wizard Round

Smart Wizard Dots

Requirements

Installation

NPM

npm install smartwizard

Yarn

yarn add smartwizard

CDN - jsDelivr

<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/smartwizard@6/dist/css/smart_wizard_all.min.css" rel="stylesheet" type="text/css" />

<!-- JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/smartwizard@6/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>

CDN - UNPKG

<!-- CSS -->
<link href="https://unpkg.com/smartwizard@6/dist/css/smart_wizard_all.min.css" rel="stylesheet" type="text/css" />

<!-- JavaScript -->
<script src="https://unpkg.com/smartwizard@6/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>

Common JS/Webpack

var $ = require( "jquery" );
require( "smartwizard/dist/css/smart_wizard_all.css");
const smartWizard = require("smartwizard");

$(function() {
    $('#smartwizard').smartWizard();
});

ES6/Babel

import $ from "jquery";
import "smartwizard/dist/css/smart_wizard_all.css";
import smartWizard from 'smartwizard';

$(function() {
    $('#smartwizard').smartWizard();
});

Note: you may have to install the required dependencies

npm i jquery
npm i smartwizard

// If you are using Webpack, install
npm i webpack webpack-cli style-loader css-loader --save-dev

Download

Download from GitHub

Features

  • Easy to implement and minimal HTML required
  • Supports all modern browsers
  • Responsive CSS design
  • Bootstrap compatible
  • Cool themes included and can be easly customize
  • Easy color cusomization using CSS variables
  • Built-in transition animations (none|fade|slideHorizontal|slideVertical|slideSwing|css)
  • Transition animations can be added easly by extending
  • CSS Animations support for transition animations (Supports Animate.css)
  • Form validation support
  • RTL(Right-to-left language) support
  • Accessible controls
  • External controls support
  • Easy ajax content integration
  • Keyboard navigation
  • Auto content height adjustment
  • Customizable toolbar and option to provide extra HTML
  • Buit-in progressbar
  • Buit-in loader
  • Buit-in events
  • UMD (Universal Module Definition) support
  • Compatible with all jQuery versions (jQuery 1.11.1+, jQuery 3.6+, and jQuery Slim)

Usage

Include SmartWizard CSS

<link href="https://cdn.jsdelivr.net/npm/smartwizard@6/dist/css/smart_wizard_all.min.css" rel="stylesheet" type="text/css" />

Include HTML (This is the basic HTML markup for the Smart Wizard. You can customize it by adding your on steps content).

<!-- SmartWizard html -->
<div id="smartwizard">
    <ul class="nav">
        <li class="nav-item">
          <a class="nav-link" href="#step-1">
            <div class="num">1</div>
            Step Title
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#step-2">
            <span class="num">2</span>
            Step Title
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#step-3">
            <span class="num">3</span>
            Step Title
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link " href="#step-4">
            <span class="num">4</span>
            Step Title
          </a>
        </li>
    </ul>

    <div class="tab-content">
        <div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
            Step content
        </div>
        <div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
            Step content
        </div>
        <div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
            Step content
        </div>
        <div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
            Step content
        </div>
    </div>

    <!-- Include optional progressbar HTML -->
    <div class="progress">
      <div class="progress-bar" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
    </div>
</div>

Include jQuery (ignore this if you have already included on the page).

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

Include SmartWizard plugin JavaScript

<script src="https://cdn.jsdelivr.net/npm/smartwizard@6/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>

Initialize the SmartWizard

$(function() {
    $('#smartwizard').smartWizard();
});

That's it!

Please see the detailed documentation for implementation and usage.

All options
$('#smartwizard').smartWizard({
  selected: 0, // Initial selected step, 0 = first step
  theme: 'basic', // theme for the wizard, related css need to include for other than basic theme
  justified: true, // Nav menu justification. true/false
  autoAdjustHeight: true, // Automatically adjust content height
  backButtonSupport: true, // Enable the back button support
  enableUrlHash: true, // Enable selection of the step based on url hash
  transition: {
      animation: 'none', // Animation effect on navigation, none|fade|slideHorizontal|slideVertical|slideSwing|css(Animation CSS class also need to specify)
      speed: '400', // Animation speed. Not used if animation is 'css'
      easing: '', // Animation easing. Not supported without a jQuery easing plugin. Not used if animation is 'css'
      prefixCss: '', // Only used if animation is 'css'. Animation CSS prefix
      fwdShowCss: '', // Only used if animation is 'css'. Step show Animation CSS on forward direction
      fwdHideCss: '', // Only used if animation is 'css'. Step hide Animation CSS on forward direction
      bckShowCss: '', // Only used if animation is 'css'. Step show Animation CSS on backward direction
      bckHideCss: '', // Only used if animation is 'css'. Step hide Animation CSS on backward direction
  },
  toolbar: {
      position: 'bottom', // none|top|bottom|both
      showNextButton: true, // show/hide a Next button
      showPreviousButton: true, // show/hide a Previous button
      extraHtml: '' // Extra html to show on toolbar
  },
  anchor: {
      enableNavigation: true, // Enable/Disable anchor navigation 
      enableNavigationAlways: false, // Activates all anchors clickable always
      enableDoneState: true, // Add done state on visited steps
      markPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
      unDoneOnBackNavigation: false, // While navigate back, done state will be cleared
      enableDoneStateNavigation: true // Enable/Disable the done state navigation
  },
  keyboard: {
      keyNavigation: true, // Enable/Disable keyboard navigation(left and right keys are used if enabled)
      keyLeft: [37], // Left key code
      keyRight: [39] // Right key code
  },
  lang: { // Language variables for button
      next: 'Next',
      previous: 'Previous'
  },
  disabledSteps: [], // Array Steps disabled
  errorSteps: [], // Array Steps error
  warningSteps: [], // Array Steps warning
  hiddenSteps: [], // Hidden steps
  getContent: null // Callback function for content loading
});

License

MIT License

Contribute

If you like the project please support with your contribution.

GitHub Sponsor
Donate on Paypal

Happy Coding :heart:

changelog

CHANGELOG

v6.0.6

v6.0.5

v6.0.4

  • Changed: Code optimizations

v6.0.3

  • Fixed: Navigation not properly maintained when navigate fast
  • Changed: Code optimizations

v6.0.1

v5.1.1

  • Added: Accessibility
  • Added: Dark Mode support for all themes
  • Added: New theme "Progress"
  • Added: leaveStep event has new parameter => nextStepIndex
  • Added: UMD (Universal Module Definition) support
  • Changed: leaveStep event has new parameter => nextStepIndex
  • Fixed: stepDirection on leaveStep event
  • Fixed: Incorrect stepDirection on leaveStep event (#91)

v5.0.0

All new jQuery SmartWizard v5

  • Added: External Ajax content support via Promise
  • Added: New navigation animations
  • Added: New themes
  • Added: New public functions
  • Added: New content loading event
  • Added: Standalone CSS with Bootstrap compatibility
  • Changed: Complete rewrite of JavaScript and CSS
  • Changed: CSS to SCSS
  • Changed: Updated all build packages

v4.4.1

  • Added: Two new public functions, goToStep and hiddenSteps.
  • Changed: Build system packages updated to latest available.

v4.3.1

  • Added: Bootstrap 4 support added
  • Added: Yarn package manager added
  • Added: Ajax loader UI updated
  • Fixed: Fixes and improvements

v4.2.2

  • Added: Example for multiple wizard in a page
  • Fixed: Auto height adjust when content height change after step is shown

v4.2.1

  • Added: Gulp automation tasks
  • Added: Validation and bundling
  • Added: Test file
  • Changed: Repository structure with src, dist, test

v4.1.7

  • Updated: Themes (dots and circles)
  • Updated: Examples pages

v4.1.5

  • Updated: Updated to v4.1.5
  • Added: New option contentCache
  • Added: On or Off caching of step contents on ajax calls, if false content is fetched always from ajax url
  • Added: New option ajaxSettings
  • Added: Extra settings for step ajax content calls

v4.1.2

Patch version

  • Changed: Option markAllPreviousStepsAsDone is enabled for selected option
  • Changed: While reset, set hash is now controllable using showStepURLhash option

v4.1.1

  • Added: New options showStepURLhash, removeDoneStepOnNavigateBack, markAllPreviousStepsAsDone, hiddenSteps
  • Added: New parameter on showStep event, name: stepPosition values: first, final, middle
  • Added: New public method, stepState to Dynamically disable/enable hide/show steps
  • Added: Compatible with latest jQuery versions (jQuery 1.9+, jQuery 2+, jQuery 3+)
  • Changed: Option toolbarExtraButtons now accepts elements as jQuery objects
  • Changed: Code optimized
  • Fixed: General bugs

v4.0.5

  • Added: Get direction navigaion on leaveStep and showStep events
  • Added: New Events beginReset, endReset, themeChanged
  • Updated: Example pages

v4.0.1

  • Changed: Completely rewritten the code from scratch
  • Added: Bootstrap support
  • Added: Theme support
  • Added: Customizable toolbar