htm is JSX-like syntax in plain JavaScript, no transpiler necessary. Develop with React/Preact directly in the browser, then compile htm away for production. It uses standard JavaScript Tagged Templates and works in all modern browsers. The syntax you write when using HTM is as close as possible to JSX. htm actually takes the JSX-style syntax a couple steps further! No transpiler necessary. HTML's optional quotes: <div class=foo>. Component end-tags: <${Footer}>footer content<//>. Syntax highlighting and language support via the lit-html VSCode extension and vim-jsx-pretty plugin. Multiple root element (fragments): <div /><div />. Support for HTML-style comments: <div><!-- comment --></div>. htm is published to npm, and accessible via the unpkg.com CDN. If you're using Preact or React, we've included off-the-shelf bindings to make your life easier. They also have the added benefit of sharing a template cache across all modules.

Features

  • Develop with React/Preact directly in the browser
  • The syntax you write when using HTM is as close as possible to JSX
  • < 600 bytes when used directly in the browser
  • < 500 bytes when used with Preact
  • < 450 byte htm/mini version
  • 0 bytes if compiled using babel-plugin-htm

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow HTM

HTM Web Site

Other Useful Business Software
Try Google Cloud Risk-Free With $300 in Credit Icon
Try Google Cloud Risk-Free With $300 in Credit

No hidden charges. No surprise bills. Cancel anytime.

Use your credit across every product. Compute, storage, AI, analytics. When it runs out, 20+ products stay free. You only pay when you choose to.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of HTM!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Software Development Software, JavaScript Admin Templates

Registered

2021-08-06