CnHeaderWidgetForm
Config sub-form for the header widget — title, subtitle, background, overlay, CTA.
Part of the dashboard widget library (v2). Registered with the dashboard widget registry and consumed by LaunchPad's widget grid. See the widget library overview and docs/architecture/cards-and-widgets.md.
Reference
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
editingWidget | {content: object}|null | null | The placement being edited, or null in create mode. | |
value | object | \{ ...DEFAULT_CONTENT \} | Initial content values — used when not editing and the parent supplies registry defaults. | |
fileUploadFn | Function|null | null | Optional raw-file upload transport async (file: File) => ({ url }) (named fileUploadFn, matching CnAddWidgetModal's File-typed sub-form transport). Called by commit() on submit (never on selection) with the raw picked file; the returned hosted URL is stored as backgroundImageUrl (rejected if it uses an unsafe scheme). When omitted, the file is embedded as a data URL on commit instead — allowed only when the raw file is ≤ 1 MB (~1.37 MB once base64-encoded and stored) so a huge inline blob can't freeze the tab. | |
uploadFn | Function|null | null | Deprecated — use fileUploadFn. Legacy base64 transport async (dataUrl: string) => ({ url }), kept for backward compatibility. When fileUploadFn is not set but this is, commit() reads the file to a data URL and hands it to this function (a one-time console.warn is emitted). fileUploadFn wins when both are set. |
Events
| Name | Payload | Description |
|---|---|---|
update:content | — | Emitted with the assembled content blob on every field change. |