HTML/CSS rendering engine

To install, run:

haxelib install cocktail 1.0.0-beta.5 

See using Haxelib in Haxelib documentation for more information.

Cocktail, an HTML/CSS rendering engine for the Haxe language

  • Cocktail is implementing the W3C HTML and CSS standards in Haxe.

  • With Cocktail, write HTML/CSS applications in Haxe and build them for NME and flash/Air. As Cocktail uses the standard DOM API, you can also build your app to regular JavaScript.

  • Use it by embedding it inside your app/game, like a webview, and create your UI in HTML/CSS.

Project home page

For tutorials, demos and community support :

See you there !


Cocktail is a library for the Haxe programming language, you should be familiar with it to use Cocktail. Being familiar with NME (another Haxe library) can also help but is not required to use Cocktail.


  1. Cocktail is written for Haxe 2.10, you need to download and install it first:

  2. Cocktail is available on haxelib, once Haxe is installed, open you command prompt and type:

haxelib install cocktail

  1. Optionnaly, if you also want to build for NME as well as flash/Air :

haxelib install nme

  1. You can build now ! You should start with the samples provided in the folder of the cocktail haxelib. Haxelib are installed in the folder of your Haxe installation.
  2. Once you're familiar with the samples, you can use the template in the template folder to start your own project. Have fun !


Cocktail is open-source, released under the MIT licence, see licence.txt.

5 years ago

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser!

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github