souly1 / ng-walkthrough

A walkthrough/on-boarding/tour guide/learning page directive which is responsive, dynamic, easy to use
MIT License
231 stars 65 forks source link

Build Status

ng-walkthrough

After not finding an Angular walkthrough/on-boarding/tour guide/learning page directive which was responsive, dynamic, easy to use and thus good for our Fitness Meal Planner mobile web App I decided to create one.

One of the most common design challenges emerging in mobile design is that of 'invitation' - creating an explanation walk through during user first interaction with the app so to engage him. Following Theresa Neil's design patterns from [Mobile Design Pattern Gallery] (http://www.amazon.com/gp/product/1449314325/ref=as_li_ss_tl?ie=UTF8&tag=uxbo09-20&linkCode=as2&camp=217145&creative=399373&creativeASIN=1449314325)

This angular directive implements a walkthrough via one of the following patterns: the transparency pattern or the tip pattern (an explanation about the different patterns can be found online at ux booth)

Special features

ScreenShots

Transparency walkthrough in Classic, Classic with arrow mode and Totally customizable mode respectively:

alt tag alt tag alt tag

Tip walkthrough mode:

alt tag

Demo

A demo was created to show:

Requirements

Notes

This directive has been originally developed for the Ionic Framework, so it supports both angular and ionic apps.

Installation

Usage

<link rel="stylesheet" href="https://github.com/souly1/ng-walkthrough/blob/master/wherever-you-put-it/ng-walkthrough.css">

<script type="text/javascript" src="https://github.com/souly1/ng-walkthrough/raw/master/wherever-you-put-it/ng-walkthrough.js"></script>

Add dependencies on the ng-walkthrough AngularJS module:

angular.module('myApp', ['ng-walkthrough']);

If you want to use the directives supplied tap icons add this script file:

<script type="text/javascript" src="https://github.com/souly1/ng-walkthrough/raw/master/wherever-you-put-it/ng-walkthrough.tap_icons.js"></script>

You can now use the directive, add the element to your HTML:

<walkthrough walkthrough-type="X">
  ...
</walkthrough>

and use one of the two configurations: 1> Place any HTML code as you like instead of the three dotes as this uses the Angular transclude ability. Make sure to specify walkthrough-type="transparency" or "tip" for this to work. 2> Use the additional optional properties the directive has to quickly create a walkthrough screen.

Usage Example 1 - transparency Non transclude option

<walkthrough
            is-round=true
            walkthrough-type="transparency"
            focus-element-selector="#focusItem"
            icon="single_tap"
            main-caption="This is some text"
            is-active="isActive"
            use-button=true>
</walkthrough>

Usage Example 2 - transparency using transclude option

<walkthrough is-active="isActive" walkthrough-type="transparency">
  <img src="https://github.com/souly1/ng-walkthrough/raw/master/images/ImageTutorialExample.png" style="height: 100vh; width: 100%;">
</walkthrough>

Usage Example 3 - tip type walkthrough

<walkthrough
            walkthrough-type="tip"
            icon="images/myLogo.png"
            tip-icon-location="FRONT"
            tip-location="TOP"
            main-caption="This is some text"
            tip-color="BLACK"
            is-active="isActive"
            use-button=true>
</walkthrough>

Directive Attributes

Testing

Ran on Chrome, Safari, Iphone 4 Emulator and Android S3, For continuous integration with Karma with Jasmine, run on Travis CI for FireFox

License

As AngularJS itself, this module is released under the permissive MIT license. Your contributions are always welcome.