Custom control
Control.extendA custom control is a subclass of sap.ui.core.Control with a metadata section (properties, aggregations, associations, events) from which UI5 generates getters, setters and other accessors, and a renderer that writes the control's HTML through the RenderManager. The Developing Controls topic says a custom control can live inside an app or component, and that for reuse across applications SAP recommends a library containing the controls.
Packages in UI5sap.ui.define([
"sap/ui/core/Control"
], (Control) => {
"use strict";
return Control.extend("ui5.walkthrough.control.ProductRating", {
metadata : {},
init() {},
renderer(oRM, oControl) {}
});
});