v0.0.6
What's new
Added support for all frameworks ✨
You can now use meshgrad
with Svelte, React, Vanilla Javascript and more!
New usage
JSX
import { generateJSXMeshGradient } from 'meshgrad'
// same syntax (generateJSXMeshGradient(6))
Svelte
<script>
import { generateMeshGradient } from 'meshgrad';
// Number of color stops
const ELEMENTS = 6;
</script>
<div style={generateMeshGradient(ELEMENTS)} class="..."/>
Vanilla
// Add cdn from skypack
<script type="module">
import { generateMeshGradient } from "https://cdn.skypack.dev/meshgrad";
// Number of color stops
const ELEMENTS = 6;
document.getElementById("box");
box.style = generateMeshGradient(ELEMENTS);
</script>
<div id="box" class="..." />