Skip to navigation

Set interaction

webflow.interactions.set(params)

Update an existing interaction. Absent keys are left unchanged, provided values replace, and null clears nullable optionals. A provided timelines array fully replaces the interaction’s timeline set. The change reflects live on the canvas and is undoable.

Syntax

webflow.interactions.set(params: InteractionSetInput): Promise<Interaction>

Parameters

  • params.id : string - The interaction id.
  • params.name : string - Replacement display name.
  • params.scope : InteractionScopeInput - Replacement scope.
  • params.triggers : InteractionTrigger[] - Replacement trigger list.
  • params.timelines : InteractionTimelineInput[] - Full replacement of the resolved timeline set.
  • params.conditionalPlayback : InteractionConditionalPlaybackItem[] | null - Replacement rows, or null to clear.

Omit timelineDefaults. set rejects any non-null value; pass null to clear a stored value.

For every field and value these parameters accept, see Interaction schema.

Returns

Promise<Interaction>

A Promise that resolves to the updated interaction with its timelines resolved inline.

Example

created.id is the id returned by Create interaction.

await webflow.interactions.set({
id: created.id,
name: 'Fade in (slower)',
});

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canModifyInteractionsAnyMainCanvasDesign