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
Go from Data Warehouse to Data and AI platform with BigQuery Icon
Go from Data Warehouse to Data and AI platform with BigQuery

Build, train, and run ML models with simple SQL. Automate data prep, analysis, and predictions with built-in AI assistance from Gemini.

BigQuery is more than a data warehouse—it's an autonomous data-to-AI platform. Use familiar SQL to train ML models, run time-series forecasts, and generate AI-powered insights with native Gemini integration. Built-in agents handle data engineering and data science workflows automatically. Get $300 in free credit, query 1 TB, and store 10 GB free monthly.
Try BigQuery 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