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
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
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