Hello World

Create a new widget from template

Select the menuitem "Create Widget..." from RainWidget's tray menu, it will auto create a new blank widget from template and open the widget's folder ,then you can see all the files of the new widget is "index.html" , "widget.json", we can modify them to build our own widgets.

Modify Widget Information

  1. You can modify the widget folder name "NewWidget" to any other you want.

  2. Open the widget file "widget.json" with Notepad or Notepad++ , then you can see all the widget information and you can modify the name,author,widget size width/height to any other you want.

Modify Widget UI

  1. Open the widget file "index.html" with Notepad or Notepad++

  2. Modify the text between <div id="widget"> and </div> to "Hello World", save this file and close.

  3. Add this widget to your desktop or refresh it (right click widget select menuitem"Refresh" or click the widget and press key "F5"), then you can see the widget display the text "Hello World" on your desktop.

Last updated