-
Notifications
You must be signed in to change notification settings - Fork 323
Writing a new widget
Smashing contains several widgets ready to use when you create a new dashboard. Or you can use one of the many community contributed widgets.
Finally, you are also able to create a completely new widget from scratch. The easiest way to get started writing a new widget, is by looking at one of the widgets bundled with Smashing, or one of the community contributed widgets. Just find one that looks similar to the one you need, and adapt it to your needs.
If the widget is in a gist file, you can use the Smashing command smashing install GIST_ID
, and it will copy all the files in place. Be sure to check out the gist's README to see if you need to do any extra configuration.
The easiest way to share a widget is to create a gist with the required files. Be sure to include a README with some instructions on how to use it. Bonus points for including pictures or a link to a live demo.
If you think your widget could be used by other users, feel free to share it with the community.
- Your dashboard will not be working properly if your widget has an empty HTML file. A workaround is including any content to your widget HTML, for example
<!---->
(empty HTML comment),
(HTML non blank white space), etc… This is a limitation from batman.js which is unfortunately not supported anymore.
- Home
- Dashing Workshop
- Installation
- Widgets
- Configuration
- Security
- Troubleshooting
- Deploying dashboards
- How Tos
- How to: post data to your dashboard and widgets
- How to: Define a data model and store history data to database
- How to: Prevent a job from overlapping with itself
- How to: Send HTML data to your widgets
- How to: Send mysql data to your widgets
- How to: Setup a Graph
- How to: Store data to and display from database
- How to: Update a Dashboard using a spreadsheet
- How to: update dashboard in Django
- How to: Update font awesome fonts from version 3 to 4
- How to: Use New Relic with Dashing
- How to: precompile assets
- Development