Widgets
Widgets are stand-alone components, suitable for report-oriented graphical elements like charts, graphs, maps or tables.
Widget component
All widget components must lie inside a container element with the widget-container
class in order to expose all their features as intended. A widget component is formed by the following:
- A widget header, that is consisted of the widget title and optionally export options and widget-specific settings.
- An optional widget settings sidebar that may or may not consist of an optional action footer
- An optional widget menu bar that consists of the chart display options and the chart time controls - on the right side of the chart time controls, an optional vertical progress bar may be used to indicate chart time intervals.
- The widget body is the area where the data are represented in the form of a chart, a graph, a map, a table or a combination of either
- An optional scrollable widget legend block that contains chart labels when necessary
- An optional widget footer that holds any drill-in/out options
A fully-featured widget component is rendered in the example below.
Compact widget component
Applying a class widget-compact
on the widget
element transforms a widget to its compact form, which is essentially a smaller height widget, that is particularly useful for widgets that contain sparklines or any other similar charts focused on information trends rather than actual values. The use of compact widgets leads to more compact dashboards, able to fit more information on-screen.
Widget dashboards
Groups of widgets form dashboards.
Content page layout widget dashboards
In content page layouts widget dashboards are formed using the responsive grid. Widgets are contained inside a widget-row
container and their width depends on the column grid classes that are applied directly on the widget.
HTML markup
<div class="widget-row">
<div class="widget col-xs-12">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget col-xs-12 col-sm-6 col-md-4">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget col-xs-12 col-sm-6 col-md-4">
<!-- WIDGET COMPONENT MARKUP -->
</div>
</div> <!-- widget-row END -->
Application layout widget dashboards
In application layouts widgets are contained inside a widget-container
and come in three different width variations; the normal widget, the widget-medium
and the widget-large
variation.
Widget dashboards in application layouts were designed having in mind that they could be dynamic and populated by casual users (aka not developers), so they had to be flexible and aesthetically pleasing at the same time.
In order to achieve this flexibility, it is essential for widgets to be ordered in transparent logical groups depending on their width - all widget-large
widgets first, followed by widget-medium
widgets, followed by normal width widgets.
HTML markup
<div class="widget-container">
<div class="widget widget-large">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget widget-large">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget widget-large">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget widget-medium">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget widget-medium">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget">
<!-- WIDGET COMPONENT MARKUP -->
</div>
<div class="widget">
<!-- WIDGET COMPONENT MARKUP -->
</div>
</div> <!-- widget-container END -->
Consult the widget dashboard application layout sample for more details.
Depending on the screen resolution, it is possible for different width variation widgets to end up having the same width.