Skip to content
Statecharts for the rest of javascript
Find file
Latest commit 5191bc7 Nov 12, 2014 @etgryphon Merge pull request #92 from Katahdin/master
added in tests for history state
Failed to load latest commit information.
libs Provide a build of the latest updates Mar 11, 2014
.gitignore Added build_log to .gitignore and removed the eventable libs Mar 11, 2014
AUTHORS Release 0.10.0 Jun 27, 2013
Makefile Removed Eventable from the make file Mar 11, 2014 Update github username May 28, 2013
bower.json Release 0.10.0 Jun 28, 2013
license.js Bumped the copywriter and added no evil clause. Feb 1, 2013
stativus.d.ts add typescript declarations Oct 17, 2012
stativus.js Keep Stativus logging from blowing up in IE Mar 11, 2014

Stativus: Statecharts for the Rest of Us!

Stativus is a micro-framework that has full functionality of Statecharts for your application. It can work in any library such as:

Statecharts are a great way to organize your web application and make it more robust and increase code reuse.


Stativus comes in two versions:

  • Debug Mode: This is the file named stativus.js and it is more readable and you get the following
    • All enterState are documented with 'ENTER: state_name'
    • All exitState are documented with 'EXIT: state_name
    • All events are documented with 'EVENT: state_name fired [event_name] with n argument(s)'
    • Any time your application is configured in such a way that it will break, you will get a console or exception
    • All Async starts and stops will be outputted to the console.
    • Will warn you if you forgot to return true when using willEnterState()
  • Minified: this is the file named stativus-min.js and is a minified version for production use (gzipped: <3k)


A list of all demos can be found at Stativus Demos

You can see a working version using only HTML5 Canvas / JQuery / Stativus called RedFlix You can see the code at stativus-demo

Readings and Tutorials on Statecharts

Here are a list of resources for learning about state charts (Thanks: Johnny Luu):


Please read the complete API documentation at


  1. Make sure that you have UglifyJS installed
  2. Make sure that you have PreprocessorJS installed
  3. Clone the repository: git clone git://
  4. make


  • Architect: Evin Grano
  • Contributors:
    • Seth Carney :: twitter: @SethCarney :: github: @scarney81
    • Mike Atkins :: github: @apechimp
  • Beta Tester: Johnny Luu


Stativus is under the MIT license that can be read in license.js Just remember who brought this to you.

TypeScript declaration file

There is a TypeScript declartion file (stativus.d.ts) available for TypeScript users.

Something went wrong with that request. Please try again.