DEV Community

Discussion on: A Typewriter, but using a New HTML Tag

Collapse
 
auroratide profile image
Timothy Foster

I haven't used Next before, but it should be possible to put the following in Head:

<link rel="stylesheet" href="https://unpkg.com/@auroratide/typewritten-text/lib/style.css" />
<script type="module" src="https://unpkg.com/@auroratide/typewritten-text/lib/define.js"></script>
Enter fullscreen mode Exit fullscreen mode

If there's a way to import from node modules in Next, you can do that too; you only have to be careful not to import in a server context, because a server does not know how to define a custom element like a browser does.