Package Manager
npm
> npm install winjs
NuGet
> Install-Package WinJS
CDN
cdnjs: http://cdnjs.com/libraries/winjs
<link href="https://cdnjs.cloudflare.com/ajax/libs/winjs/4.2.0/css/ui-light.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/winjs/4.2.0/js/base.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/winjs/4.2.0/js/ui.js"></script>
Usage
-
Loose files. If you want to include WinJS as loose files in your project, you'll need to reference it in your HTML as follows.
<link href="winjs/css/ui-light.css" rel="stylesheet" />
<script src="winjs/js/base.js"></script>
<script src="winjs/js/ui.js"></script> -
Bundler. If you're using a bundler such as browserify or webpack, you'll need to require the WinJS package as follows.
var WinJS = require('winjs');
Note that this will only import the JavaScript. You'll need to use another mechanism for the CSS.
In addition to ui-light.css
, WinJS comes with a dark theme called ui-dark.css
Custom Builds
Follow our custom build instruction.