Skip to content

Repository files navigation

🧲

Attractive.js

A light-weight library for declarative DOM actions using data attributes.

Quick example:

<button @action="toggleClass#active" @target="content">Toggle</button>

<p id="content">This element should toggle the `active` class.</p>

There are many more actions, like: addAttribute, copy (to clipboard), openModal and setStyle.

Documentation

📑 See documentation (built with Perron)

Sponsored By Rails Designer

Rails Designer

Release

npm run release  # patch bump (0.12.x → 0.12.y)
npm run release -- minor  # minor bump (0.12.x → 0.13.0)
npm run release -- major  # major bump (0.12.x → 1.0.0)

# Pre-release (alpha)
npm run release -- premajor --preid alpha  # 0.12.x → 1.0.0-alpha.0
npm run release -- prerelease --preid alpha # 1.0.0-alpha.0 → 1.0.0-alpha.1

License

Attractive.js is released under the MIT License.

About

A humble set of declarative HTML actions. Extensible when you need more.

Resources

Stars

51 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages