Widgets
Introduction
Widgets are visual elements embedded into Torii.
You can add widgets to your plugin using the widgets
section within your manifest file.
Plugins that support widgets will have a Widgets tab to preview the added functionality after installation:
Once the plugin is installed and data is available, the widget will appear on the Overview tab when viewing an application:
Widget Schema
Every element within the widgets
section should include the following properties:
Property | Mandatory | Description | Example |
---|---|---|---|
type | ✅ | The type of the widget. (See the Widget Types section below for more details). | KeyValue |
fields | ✅ | List of fields to be displayed within the widget. (See the Widget Fields section below for more details). |
Widget Types
- KeyValue - this widget displays its list of fields as key-value pairs, where the key is the field’s label and the value is the field’s value.
Widget Fields
An array of fields to be displayed within the widget.
Property | Mandatory | Description | Example |
---|---|---|---|
key | ✅ | A unique key, pointing to one of the keys defined within the app fields list. Must match the pattern: app.<key> | app.username |
template | Use this if you want to alter the way the value is displayed. The format is: {{value}} | {{value / 100 }}For: value = 5, it will show: 5 / 100 |
Limitations
- Widgets can only be added if the
app
section is defined within the manifest.
Updated 12 months ago