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

You Might Also Like
Top-Rated Free CRM Software Icon
Top-Rated Free CRM Software

216,000+ customers in over 135 countries grow their businesses with HubSpot

HubSpot is an AI-powered customer platform with all the software, integrations, and resources you need to connect your marketing, sales, and customer service. HubSpot's connected platform enables you to grow your business faster by focusing on what matters most: your customers.
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