Demo • Getting Started • Options • API • Themes • Customize • Changelog
https://nextapps-de.github.io/winbox/
Hello my name is Thomas, also known as ts-thomas. This is a personal project which I fully made in my free time. It is hosted by the Github account from the company Nextapps where I work to give it more exposure. I have never received any financial support for this project from the company Nextapps as some of you might have guessed, since it is a free and open source project. I'm really happy that WinBox.js is getting so much positive feedback and also feature requests. Please feel free to support me by making a personal donation which helps me a lot to keep this project alive and also to providing all the contribution to keep WinBox.js on a professional top-end level.
Thanks a lot, Thomas (ts-thomas)
Vue 2 and 3 (a wrapper component that adds the ability to mount Vue components in WinBox.js):
https://github.com/wobsoriano/vue-winbox
A React controlled component for WinBox.js, with full Reactful props and state.:
https://github.com/rickonono3/react-winbox
Get Latest Stable Build (Recommended):
| Bundle: (all assets bundled into one single file: js + css + html + icons) | ||
| winbox.bundle.min.js | Download | https://rawcdn.githack.com/nextapps-de/winbox/0.2.82/dist/winbox.bundle.min.js |
| Non-Bundled: (js and css are separated, css includes icons as base64) | ||
| winbox.min.js | Download | https://rawcdn.githack.com/nextapps-de/winbox/0.2.82/dist/js/winbox.min.js |
| winbox.min.css | Download | https://rawcdn.githack.com/nextapps-de/winbox/0.2.82/dist/css/winbox.min.css |
| Sources: (not bundled at all, images as url to original resources) | ||
| ES6 Modules | Download | The /src/js folder of this Github repository |
| LESS Files (source) | Download | The /src/css folder of this Github repository |
| winbox.css (compiled) | Download | https://rawcdn.githack.com/nextapps-de/winbox/0.2.82/src/css/winbox.css |
| src.zip | Download | Download all source files including image original resources. |
Get Latest (NPM):
npm install winbox
The bundled version includes all assets like js, css, html and icon images as base64.
A best practice is to load the library as async and use some modern preloading mechanism:
<html>
<head>
<link rel="preload" href="https://github.com/nextapps-de/winbox/raw/0.2.82/winbox.bundle.min.js" as="script">
</head>
<body>
<script src="https://github.com/nextapps-de/winbox/raw/0.2.82/winbox.bundle.min.js" async></script>
<script src="https://github.com/nextapps-de/winbox/raw/0.2.82/my-script.js" defer></script>
</body>
</html>
When you get troubles with unavailable references then remove the async or defer from this example and invest some minutes later to find out how you can properly load js assets asynchronously today.
The non-bundled version needs to load js and css separately (css already includes icons as base64).
<html>
<head>
<link rel="stylesheet" href="https://github.com/nextapps-de/winbox/raw/0.2.82/winbox.min.css">
<script src="https://github.com/nextapps-de/winbox/raw/0.2.82/winbox.min.js"></script>
</head>
<body></body>
</html>
You can also load the non-bundled version in the same way.
The ES6 modules are located in src/js/. But you need to load the stylesheet file explicitly since this is just automatically loaded by the bundled version.
<head>
<link rel="stylesheet" href="https://github.com/nextapps-de/winbox/raw/0.2.82/dist/css/winbox.min.css">
</head>
<script type="module">
import WinBox from "./src/js/winbox.js";
</script>
You can also load modules via CDN, e.g.:
<script type="module">
import WinBox from "https://unpkg.com/winbox@0.2.82/src/js/winbox.js";
</script>
The ES6 modules are not minified. Please use your favored bundler or build tool for this purpose.
Constructor:
Global methods:
Instance member methods:
Instance properties (readonly):
Instance properties (writable):
Instance state boolean properties (readonly):
Callback methods:
| Option | Values | Description |
| id | number | string | Set a unique id to the window. Used to define custom styles in css, query elements by context or just to identify the corresponding window instance. If no ID was set it will automatically create one for you. |
| index | number | Set the initial z-index of the window to this value (will be increased automatically when unfocused/focused). |
| title | string | The window title. |
| mount | HTMLElement | Mount an element (widget, template, etc.) to the window body. |
| html | string | Set the innerHTML of the window body. |
| url | string | Open URL inside the window (loaded via iframe). |
| width height | number | string | Set the initial width/height of the window (supports units "px" and "%"). |
| minwidth minheight | number | string | Set the minimal width/height of the window (supports u |
$ claude mcp add winbox \
-- python -m otcore.mcp_server <graph>