HTML & CDN Usage
Add effects purely with HTML attributes — no bundler or JavaScript boilerplate required when using the CDN bundle.
Attribute Naming Rules
FluxEngine.parseDatasetOptions() converts data-fx-* attributes via DOM dataset camelCasing:
data-fx="prism-3d"— space-separated list of effect names to mount on the element.data-fx-max-tilt="14"→maxTilt: 14(numbers auto-parsed).data-fx-glare="true"or baredata-fx-glare→glare: true.data-fx-colors="#6366f1, #06b6d4, #f472b6"→colors: ['#6366f1', '#06b6d4', '#f472b6'](comma-split forcolors,lightColors,darkColors,scrollColors).- Use
data-fx-color1(notcolor-1) becausedatasetturnscolor-1intocolor-1or unexpected casing if hyphenated before digits.
index.html • html
<section
data-fx="prism-3d"
data-fx-shape="torus"
data-fx-depth="1.1"
data-fx-gloss="1.2"
data-fx-colors="#6366f1, #06b6d4, #f472b6"
style="min-height: 70vh;"
>
<div data-fx="tilt-3d" data-fx-max-tilt="10" style="padding: 2rem;">
<h2>Interactive Card</h2>
<button data-fx="magnetic" data-fx-strength="0.35">Explore</button>
</div>
</section>
<script src="https://unpkg.com/@votax572002/fluxfx/dist/fluxfx.min.js"></script>