Skip to Content
DashboardsReferenceWidget catalog

Widget catalog

Each widget type has a componentId, stored in the document, and a registry function in the UI library that teaches a page to draw it. A page draws only the types whose registries it includes.

Every registry function is available from @microboxlabs/miot-dashboard-ui/react, /embed and the self-contained /browser build, except charts, which have their own entries.

Text and cards

componentIdShowsRegistryMain settings
text_cardText, with templatescreateTextCardRegistrytext, align, italic
info_cardA card with a value and a descriptor that can hold nested widgetscreateInfoCardRegistrytitle, value, descriptor, icon, viewMoreUrl, viewMoreLabel

Statistics

componentIdShowsRegistryMain settings
percentage_valueA labelled bar, value out of a maximumcreatePercentageValueRegistrytitle, value, max, barColor, barColorRules
stat_circularA ring, value out of a maximumcreateCircularStatRegistrytitle, value, maxValue, unit, ringColor, ringColorRules
stat_progressProgress toward a target, with quarter markscreateProgressStatRegistrytitle, value, target, unit, thresholds, barColorRules
stat_statusA status value with an optional icon and colored bordercreateStatusStatRegistrytitle, value, subtitle, icon, color, valueColorRules
stat_iconA value next to an icon, with an optional descriptioncreateIconStatRegistrytitle, subtitle, value, unit, icon, cardVariant, goToUrl
stat_sensitiveA value hidden until the viewer reveals itcreateSensitiveStatRegistrytitle, value, unit, isSensitive, thresholds
stat_stackedParts of a whole, as a stacked bar or donutcreateStackedStatRegistrytitle, items, chartType, unit, showHeader
stat_expandableA value with details that open on demandcreateExpandableStatRegistrytitle, value, unit, details, valueColorRules
stat_detailedA value with a comparison, a trend and progress to a targetcreateDetailedStatRegistrytitle, value, unit, description, previousValue, target
stat_sparklineA value with a small trend linecreateSparklineStatRegistrytitle, value, unit, sparkline, thresholds

stat_sensitive hides the value on screen only. It does not replace access control: anyone who can load the dashboard can load its data.

Tables and lists

componentIdShowsRegistry
data_tableRows in a table with templates, filters, sorting, actions and CSV exportcreateDataTableRegistry
data_table_v2The same, with resizable columns and row linkscreateResizableDataTableRegistry
data_listRows as cards with badges and metricscreateDataListRegistry

Viewers can filter, sort and resize locally. Their changes are not saved to the dashboard.

Charts

componentIdShowsRegistry
chartLine, bar, scatter, pie and gauge chartscreateChartRegistry
chart_v2The same, with mixed series and dual axescreateChartRegistry

Charts need ECharts 6, which your page loads and passes in through createEngine. Import createChartRegistry from @microboxlabs/miot-dashboard-ui/react-charts in React, or from /browser-charts instead of /browser in plain HTML. The default browser build leaves charts out to stay small.

Host widgets

These types exist in the ModularIoT web app but are not in the library. A page that does not provide them shows “not available” in their place:

componentIdShows
containerA grid or labelled group of other widgets
geographic_mapA map
fileUpload, batchImportUpload and import tools

Data for any widget

Every data-bound widget reads either staticData or a saved query result, set by dataMode:

{ "dataMode": "planner", "plannerVariableName": "trips" }

Single-value widgets use the first row. Tables, lists and charts use every row. Text settings accept templates.

Register widgets

const labels = { loadingLabel: "Loading…", errorLabel: "Could not load the data.", unsupportedDataLabel: "This widget needs a saved query.", }; const definitions = [ ...createTextCardRegistry({ ...labels, defaultText: "" }).all(), ...createCircularStatRegistry({ ...labels, defaultTitle: "Value", defaultUnit: "", formatTotal: (max) => `of ${max}`, }).all(), ];

Each registry takes your translated labels, so the widgets speak your page’s language. Combine them with createWidgetRegistry from /core, or with an object that has a get(id) method.

The full option list for each registry is in the UI library README .

Last updated on