@stack54/island
v0.3.2
Published
## Directives
Downloads
142
Readme
stack54 island
Directives
load
<script island="load"></script>
idle
<script island="idle"></script>
media query
<script island="media" value="(max-width: 50em)"></script>
visible
<script island="visible"></script>
<!-- or -->
<script island="visible" value='{"rootMargin": "200px", "threshold": 1}'></script>
value
has to be a valid JSON
Setup
npm install @stack54/island
// stack.config.js
import island from "@stack54/island";
import { defineConfig } from "stack54/config";
export default defineConfig({
integrations: [island()],
});