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
Get full visibility and control over your tasks and projects with Wrike. Icon
Get full visibility and control over your tasks and projects with Wrike.

A cloud-based collaboration, work management, and project management software

Wrike offers world-class features that empower cross-functional, distributed, or growing teams take their projects from the initial request stage all the way to tracking work progress and reporting results.
Learn More
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