Railsdesigner iconRailsdesignerSep 17, 2026 ~1 min source read

Custom Actions in Attractive.js: one interface, from small to big

In last week's announcement, I promised that when the built-in actions aren't enough, you can write your own. Let me show you how, because this is what was bugging me most: why pull in another library when Attractive.js can do it as well?

Share this story

Send the public story page.

Useful takeaways from this story.

In last week's announcement, I promised that when the built-in actions aren't enough, you can write your own.

Let me show you how, because this is what was bugging me most: why pull in another library when Attractive.js can do it as well?

Next to that I will also highlight some extra goodies and the bundled extensions that can now be (optionally) added.

Building the complete brief

The page is ready to read now. The fuller skim-friendly version will appear here automatically.

The useful part

In last week's announcement, I promised that when the built-in actions aren't enough, you can write your own. Let me show you how, because this is what was bugging me most: why pull in another library when Attractive.js can do it as well? Next to that I will also highlight some extra goodies and the bundled extensions that can now be (optionally) added.

How it works

  • It goes through the full action pipeline (so all events works as well as …
  • It evaluates a JavaScript expression on the element, so you can do things too small for a full action: 0 (I will become 1) Use it for one-liners only.

Details worth keeping

Start with a one-liner The quickest custom action is the js: prefix.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app