JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdn.plot.ly/plotly-2.16.2.min.js"></script>
<div id="myDiv"></div>

JavaScript

const z = Array.from({length: 1000}, () => Array.from({length: 1000}, () => Math.floor(Math.random() * 1000)));
const steps = Array.from({length: 1000}, (_, i) => ({label: i, method: 'restyle', args: ['zmin', i]}));
Plotly.newPlot('myDiv',  [{z: z, colorscale: 'Jet', type: 'heatmap', zsmooth: 'best'}], {sliders: [{steps: steps}]});