Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
W

winbox

> 编程语言
Open source

WinBox is a modern HTML5 window manager for the Web.

6.4K stars0 likes3 views
WebsiteGitHub

About

WinBox is a modern HTML5 window manager for the Web.

Modern window manager for the web: lightweight, outstanding performance, no dependencies, fully customizable, open source!

Demo  •  Getting Started  •  Options  •  API  •  Themes  •  Customize  •  Changelog

Live Demo and Code Examples

https://nextapps-de.github.io/winbox/

Support this Project

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)

Plugins / Add-ons / Extensions

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

Getting Started

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):

cmd
npm install winbox

Use Bundled Version (Recommended)

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:

xml
<html>
<head>
    <link rel="preload" href="winbox.bundle.min.js" as="script">
</head>
<body>
    
    
    <script src="winbox.bundle.min.js" async></script>
    
    <script src="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.

Use Non-Bundled Version

The non-bundled version needs to load js and css separately (css already includes icons as base64).

xml
<html>
<head>
    <link rel="stylesheet" href="winbox.min.css">
    <script src="winbox.min.js"></script>
</head>
<body></body>
</html>

You can also load the non-bundled version in the same way.

ES6 Modules

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.

xml
<head>
    <link rel="stylesheet" href="dist/css/winbox.min.css">
</head>
xml
<script type="module">
  import WinBox from "./src/js/winbox.js";
</script>

You can also load modules via CDN, e.g.:

xml
<script type="module">
  import WinBox from "https://unpkg.com/[email protected]/src/js/winbox.js";
</script>

The ES6 modules are not minified. Please use your favored bundler or build tool for this purpose.

Overview

Constructor:

  • new WinBox(title, options<key: value>) : winbox

Global methods:

  • WinBox.new(title, options<key: value>) : winbox
  • WinBox.stack() : Array<winbox>

Instance member methods:

  • winbox.mount(src)
  • winbox.unmount(dest)
  • winbox.setUrl(string)
  • winbox.setTitle(string)
  • winbox.setIcon(url)
  • winbox.move(x, y)
  • winbox.resize(width, height)
  • winbox.close(boolean)
  • winbox.focus(state)
  • winbox.blur(state)
  • winbox.hide(state)
  • winbox.show(state)
  • winbox.minimize(state)
  • winbox.maximize(state)
  • winbox.fullscreen(state)
  • winbox.restore(state)
  • winbox.setBackground(string)
  • winbox.addClass(name)
  • winbox.removeClass(name)
  • winbox.hasClass(name)
  • winbox.toggleClass(name)
  • winbox.addControl(options)
  • winbox.removeControl(name)

Instance properties (readonly):

  • winbox.id
  • winbox.index
  • winbox.window
  • winbox.body

Instance properties (writable):

  • winbox.x
  • winbox.y
  • winbox.width
  • winbox.height
  • winbox.top
  • winbox.right
  • winbox.bottom
  • winbox.left
  • winbox.minwidth
  • winbox.minheight
  • winbox.maxwidth
  • winbox.maxheight

Instance state boolean properties (readonly):

  • winbox.min
  • winbox.max
  • winbox.full
  • winbox.hidden
  • winbox.focused

Callback methods:

  • winbox.oncreate
  • winbox.onshow
  • winbox.onhide
  • winbox.onclose
  • winbox.onfocus
  • winbox.onblur
  • winbox.onmove
  • winbox.onresize
  • winbox.onfullscreen
  • winbox.onmaximize
  • winbox.onminimize
  • winbox.onrestore

Options

t
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).

Issues· 27 open

View all issuesOpen on GitHub
  • #194

    Could minimized width ba an option

    Updated Sep 7, 2025
  • #189

    How to custom hide position

    Updated Jun 26, 2025
  • #193

    When a Winbox window is fully scrolled, further scroll events affect the background elements

    Updated Jun 11, 2025
  • #179

    Feature Request: Enable/disable taskbar buttons always visible

    Updated Jan 16, 2025
  • #192

    Exposing index_counter ?

    Updated Dec 15, 2024
  • #188

    Async function does not take affect

    Updated Dec 9, 2024
  • #191

    Left an Top are always 0

    Updated Nov 28, 2024
  • #183

    Feature Request: Window snapping

    Updated Oct 16, 2024
  • #178

    Scripts in html content of winbox are ignored

    Updated Aug 15, 2024
  • #176

    Migrate away from Less

    Updated Aug 15, 2024

> Tags

JavaScriptboxdesktopdesktop-appdesktop-widget

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 24, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言