Skip to main content

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​

NameTypeRequiredDefaultDescription
editingWidget{content: object}|nullnullThe placement being edited, or null in create mode.
valueobject\{ ...DEFAULT_CONTENT \}Initial content values — used when not editing and the parent supplies registry defaults.
fileUploadFnFunction|nullnullOptional 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.
uploadFnFunction|nullnullDeprecated — 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​

NamePayloadDescription
update:content—Emitted with the assembled content blob on every field change.