JSFiddle - React, Tailwind, and code Playground

by taffrail

HTML

<div class="framer-8xadul" data-framer-name="Embed" name="Embed"><div class="framer-1qufylu-container"><iframe srcdoc="
<html>
    <head>
        <style>
            html, body {
                margin: 0;
                padding: 0;
            }

            body {
                display: flex;
                justify-content: center;
                align-items: center;
                min-height: 100vh;
            }

            :root {
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
            }

            * {
                box-sizing: border-box;
                -webkit-font-smoothing: inherit;
            }

            h1, h2, h3, h4, h5, h6, p, figure {
                margin: 0;
            }

            body, input, textarea, select, button {
                font-size: 12px;
                font-family: sans-serif;
            }
        </style>
    </head>
    <body>
        <div class=&quot;taffrail-embed&quot;><div class=&quot;taffrail-rw&quot;><a data-tr-url data-tr-key=&quot;TFfos5FOyMtIBdFiN1u91Ml.wJqr-v3ywxaJv6zMI746R1i0fkS79jM3IUPWLcXtZc&quot; href=&quot;https://www.staging-advice.taffrail.com/c/TFUwuzjp0nULY9wgqJE4q8M/iframe?&quot;></a></div></div><script src=&quot;https://www.staging-advice.taffrail.com/4db0ae47/dist/js/embed.bundle.js&quot; async charset=&quot;utf-8&quot;></script>
        <script type=&quot;module&quot;>
            let height = 0

            function sendEmbedHeight() {
                window.parent.postMessage({
                    embedHeight: height
                }, &quot;*&quot;)
            }

            const observer = new ResizeObserver((entries) => {
                if (entries.length !== 1) return
                const entry = entries[0]
                if (entry.target !== document.body) return

                height = entry.contentRect.height
                sendEmbedHeight()
            })

            observer.observe(document.body)

      ...