Skip to content

Widgets

Psycho edited this page Oct 4, 2019 · 4 revisions

What are they

Widgets are small tiles that can be added by any user to their Project Alice interface. Those widgets usually present some useful information or quick actions the user would want to see on its interface.

How do I create widgets?

Module developers can add widgets to their modules very simply. If you know that you'll be adding widgets to your module beforehand, then you have the option in the "moduler" tool to create them. If you want to add them after your module was generated you will need to add a few files to your module:

  • Create a "widgets" directory into your module main directory
  • Create the following directories in the "widgets" directory:
    • css
    • fonts
    • js
    • lang
    • template

Each module has to be uniquely named and needs its own files. Let's take an exemple! We want to create a widget that displays the current year for the module DateDayTimeYear. This is how the module directory tree would look like:

Click on the filenames to view their default content!