Ga naar hoofdinhoud

CnLinkButtonWidget

Link / button widget with single and list display modes; emits internal-action/create-file for host-handled actions.

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
contentobject\{\}Persisted widget content. Single-button shape: {label, url, icon, actionType, backgroundColor, textColor}. List shape adds {displayMode: 'list', listOrientation, listItemGap, links: [{label, url, icon, actionType, value?, backgroundColor?, textColor?}, …]}.
isAdminbooleanfalseWhether the current user is an admin. Combined with canEdit to suppress click handlers in edit mode.
canEditbooleanfalseWhether the surrounding dashboard shell is in edit mode. Suppresses click handlers when both this and isAdmin are true.

Events​

NamePayloadDescription
internal-action—Emitted on an internal action click so a host app can dispatch its own handler.
create-file—Emitted on a createFile action click; payload is the extension token (e.g. 'docx').