Take a name as an attribute and a HTML template, and create an HTML custom element you can use as a widget. i.e.

<!-- Your custom widget to display a customer... -->
<solid-widget name="my-custom-widget">
    <h2>Customer name: ${}</h2>

<!-- ... used in a solid-display -->
  fields="name, customer"

In a solid-widget, you have access to these values:

  • id: id of the displayed resource

  • value: all the values of the current resources

  • name: name of the current field

  • label: if defined, label of the current field

  • range: if defined, range of the current field

NB: Do not forget to define your custom template in a <template> tag. Otherwise, your widget will not be declared properly.