Features/Interactions

Interaction actions

Animate, toggle classes or attributes, show or hide, scroll, redirect, send HTTP requests, set cookies and more.

Actions are what an interaction does. Divhunt has actions for motion (Animate, Split Text, Video, Follow, Cursor), for the page (Class, Attribute, Text, HTML, Visibility, Scroll, Scroll Lock, Focus, State) and for logic (Redirect, HTTP Request, Cookie, Copy to Clipboard, Download File, Language, Notification, Custom JavaScript, Page). Actions can run together or in sequence, on the element itself or on targets found from it. This replaces most small scripts a site normally needs.

How it works

  • Animate: properties with from/to values: opacity, translate/translateX/Y/Z, scale/scaleX/Y, rotate/rotateX/Y/Z, skew/skewX/Y, top/left/right/bottom, width, height, margin*, padding*, fontSize, fontWeight, letterSpacing, lineHeight, color, backgroundColor, borderColor, filters (blur, brightness, contrast, grayscale); units px, %, em, rem, vh, vw, dvh, deg, rad; easing (ease, linear, steps...) and Spring physics (mass, stiffness, damping).
  • Class: add, remove, toggle. Attribute: add, remove, edit, toggle (on/off values). Text: change text. HTML: replace, append, prepend, insertBefore, insertAfter, remove, clear.
  • Visibility: hide, show, toggle with none, fade or slide.
  • Scroll: to the target with an offset. Scroll Lock: lock/unlock page scroll with a named key (no layout jump).
  • Focus: move focus (first, last, next, prev, trigger, self, none), trap focus inside a modal (page behind becomes inert) and release it.
  • State: set, toggle or clear a named state (see Named states).
  • Redirect: URL, _self/_blank, rel values. HTTP Request: GET/POST/PUT/DELETE with parameters, headers and body.
  • Cookie (add/remove/edit), Copy to Clipboard, Download File, Language (switch site language), Notification, Custom JavaScript, Page (change page).
  • Split Text, Video, Follow, Cursor: see their own entries.

When to use it

  • Toggle a class to open a menu
  • Send a webhook on a button click
  • Switch the site language from a custom switcher
  • Copy a coupon code to the clipboard

Limitations

  • Two transform animations on one element: the last one wins; Follow writes separate translate/rotate/scale properties so it can combine with a transform animation.

Availability

  • Works in Designer and MCP.
  • Included in every plan.

How to use it.

  1. In an interaction, add an action.
  2. Pick the action type, set the target and its fields.
  3. Set duration and delay, then save.

Questions.

Can actions run one after another?

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.