OS.js is an open-source web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more.
This is the Widgets module for OS.js
First, install the module:
npm install @osjs/widgets
In your client bootstrap (src/client/index.js
):
import {WidgetServiceProvider} from '@osjs/widgets';
osjs.register(WidgetServiceProvider);
And in your stylesheet (src/client/index.scss
):
@import "~@osjs/widgets/dist/main.css";
To set up a default set of widgets in the user settings, modify your client configuration file (src/client/config.js
):
{
desktop: {
settings: {
widgets: [{
name: 'digitalclock'
}]
}
}
}
A contextmenu entry on the desktop is automatically added so users can add these themselves.
See the Official Manuals for articles, tutorials and guides.