Browse documentation

Custom Widgets

Pair widget metadata with a backend renderer and a supported frontend widget type.

Widget contract

QWidgetMetaData defines a widget's name, type, and code reference. A backend renderer produces the data expected by the selected frontend component. The Material Dashboard 0.41.0 types include statistics, charts, tables, and HTML-oriented displays; their data shapes are specific to each renderer.

A working starting point

The application template widget pairs WidgetType.STATISTICS with StatisticsData and AbstractWidgetRenderer. Follow its imports and render method signature instead of treating QWidgetMetaData as an annotation.

The sample widget dashboard contains complete examples of supported widget types. Register the widget in QInstance and reference its name from app metadata.

Custom frontend work

A new React component needs an explicit integration into the frontend's widget registry and packaging. Adding a JSX file to a Java application's repository does not automatically register it. Validate empty/loading/error states, permissions, output escaping, and layout with the actual dashboard version.

Powered by qqq