Skip to content

Embedding Mint #144

@manveru

Description

@manveru

I'd like to embed a mint component inside an existing webpage, but right now Mint is replacing the whole <body>.
I'd like to do something like this:

mint build --output main.js

And then use it like this in my HTML:

<!DOCTYPE HTML>
<html>
<head>
  <meta charset="UTF-8">
  <title>Main</title>
  <link rel="stylesheet" href="whatever-you-want.css">
  <script src="main.js"></script>
</head>

<body>
  <div id="mint"></div>
  <script>
    Mint.Program.init({
      node: document.getElementById('mint')
    });
  </script>
</body>
</html>

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions