Custom Widgets
Each shortcut group exposes a .custom() factory for widgets you’ve implemented yourself. The shape mirrors the built-in shortcuts but takes the widget type as the first argument.
Per-group factories
Section titled “Per-group factories”import { gui } from '@golemui/gui-shared';
// Custom layoutgui.layouts.custom('productCard', [/* children */], { title: 'My Product' });
// Custom inputgui.inputs.custom('productRating', 'product.rating', { maxRating: 10, validator: { type: 'number', required: true },});
// Custom displaygui.displays.custom('productDescription', { img: 'assets/product.png', description: '### Cool product',});
// Custom actiongui.actions.custom('productShare', { onClick: 'shareEvent' });The first arg is the widget type string — it must match the key you register in formConfig.widgetLoaders.
Validators on custom inputs
Section titled “Validators on custom inputs”Custom inputs accept a validator prop typed as the union of all built-in validator types. Use { type: 'string'/'number'/'boolean'/'array'/'custom', ... }.
See also
Section titled “See also”- Extending GolemUI / Widgets — implementing the widget itself.
- Features / Widget Loaders — registering the loader.