Skip to main content
A company Widget Package lives in a generated portal project. The project registers its packages in src/widgets.config.ts and publishes their runtime artifacts with the portal CLI.

Create a widget

From the portal project root:
The widget name must use kebab case. Use --category when it belongs in a builder palette category other than components.

Define the package

The scaffold adds widget source and updates src/widgets.config.ts. Import worker APIs only from:
Keep package identity, widget registrations, defaults, property schemas, and declared uses together in the package definition. See defineWidget and defineWidgetPackage for the exact authoring contracts.

Preview and validate

Preview the widget through the portal host. Verify empty data, keyboard use, focus, theme modes, and narrow layouts.

Check publication without writing

The dry run builds and validates the package without publishing it.

Publish company widget artifacts

This command publishes company widget runtime artifacts from src/widgets.config.ts. It does not push Portal Definition JSON or activate a portal version.
After publication, place the published widget through the supported portal authoring flow. Portal JSON and Widget Package definitions remain separate contracts.