kiln-app 0.1.0

Native desktop apps from real HTML, CSS and TypeScript, rendered without Chromium or a WebView
<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Kiln — input</title>
    <style>
      body {
        margin: 0;
        padding: 24px;
        background: #0b1226;
        color: #f4e7d3;
        font-family: Helvetica, Arial, sans-serif;
      }
      h1 {
        margin: 0 0 18px;
        font-size: 13px;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: #8fa0c4;
      }
      .lbl {
        margin-bottom: 6px;
        font-family: Menlo, monospace;
        font-size: 10px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #6c7a9c;
      }
      section { margin-bottom: 20px; }
      input {
        width: 300px;
        padding: 9px 11px;
        font-size: 15px;
        color: #f4e7d3;
        background: #131e3d;
        border: 1px solid #22315c;
        border-radius: 7px;
      }
      input:focus { border-color: #f5a93c; }
      #list {
        width: 300px;
        height: 150px;
        overflow: auto;
        border: 1px solid #22315c;
        border-radius: 7px;
        background: #131e3d;
      }
      .item {
        padding: 11px 13px;
        font-size: 14px;
        border-bottom: 1px solid #22315c;
      }
      output {
        display: block;
        margin-top: 10px;
        font-family: Menlo, monospace;
        font-size: 12px;
        color: #f5a93c;
      }
    </style>
  </head>
  <body>
    <h1>Input and scrolling</h1>

    <section>
      <div class="lbl">text input — typed through the engine</div>
      <input id="name" />
      <output id="echo">value: ""</output>
    </section>

    <section>
      <div class="lbl">overflow: auto — driven by the wheel</div>
      <div id="list">
        <div class="item" id="row0">row 0</div>
        <div class="item">row 1</div>
        <div class="item">row 2</div>
        <div class="item">row 3</div>
        <div class="item">row 4</div>
        <div class="item">row 5</div>
        <div class="item">row 6</div>
        <div class="item">row 7</div>
      </div>
      <output id="pos">scrollTop: 0</output>
    </section>

    <script>
      const name = document.querySelector("#name");
      const echo = document.querySelector("#echo");
      name.focus();
      name.addEventListener("input", () => {
        echo.textContent = "value: " + JSON.stringify(name.value);
      });

      const list = document.querySelector("#list");
      const pos = document.querySelector("#pos");
      list.addEventListener("scroll", () => {
        pos.textContent = "scrollTop: " + Math.round(list.scrollTop);
      });
    </script>
  </body>
</html>