
The
Widget
API is experimental and may change in the future. It has been marked as @deprecated
to remind the developer that it is experimental. It is not "deprecated", just experimental. Please don't use it in production versions of your app. We do not guarantee backward compatibility, or that the API will remain stable.recordWidget
will register a record widget
Before your record widget will appear on a record page, you will need to go to “Configure page”,
click on “Add Widget”, and select your widget.
Example
TypeScript
The widget will always display your app’s icon, which you set in the Developer
dashboard.
Arguments
The unique identifier for this widget.It is only used internally; never shown to the user.
A human-readable label of the widget that will be shown to the user in the widget picker.
The base hexadecimal color of the gradient displayed in the background of the widget.
A React component that will render the widget.It can suspend while loading data.Must return a one of the following components as the root element:
A single slug or an array of slugs to select which types of record the record action will apply to.Defaults to
undefined
, which will cause the action to show on all types of records.The built-in slugs are