html★
A platform-native hypermedia framework for modern browsers
~8KB
Gzipped
17
Data Attributes
0
Dependencies
100%
Valid HTML
Quick Start
Add html★ to your page and start using data attributes:
<!-- Add the script --><script src="https://unpkg.com/html-star"></script> <!-- AJAX-enable your navigation --><nav data-target="#main" data-push> <a href="/home">Home</a> <a href="/about">About</a></nav> <main id="main"> <!-- Content loads here --></main>
Key Features
Attribute Cascade
Set data-target once on a container and all child links inherit it. Just like CSS!
Smart Inference
URLs from href/action, methods from method. No redundant attributes.
View Transitions
Native View Transitions API support for smooth, animated page changes.
Valid HTML
All configuration via standard data-* attributes. No custom syntax.
Tiny & Fast
Under 8KB gzipped. No dependencies. No build step required.
Progressive Enhancement
Links work without JavaScript. html★ makes them better.
The Key Insight
This nav requires one attribute to AJAX-enable five links:
<nav data-target="#main" data-push> <a href="/">Home</a> <a href="/users">Users</a> <a href="/settings">Settings</a> <a href="/about">About</a> <a href="/help">Help</a></nav> <main id="main"><!-- Content loads here --></main>
Without JS, they're normal links. With JS, they become SPA navigation with View Transitions and browser history.
Comparison
| Feature | HTMX | Hotwired | html★ |
|---|---|---|---|
| Size (gzip) | 14KB | ~20KB | ~8KB |
| Attribute cascade | No | No | Yes |
| URL inference | No | Partial | Yes |
| View Transitions | Plugin | Partial | Native |
| Valid HTML | No (hx-*) | No | Yes |
Examples
Explore interactive demos showcasing html★ features:
CRM Dashboard
Customer pipeline with filtering, deals, and contact details.
Product Catalog
E-commerce store with sort, pagination, and quick view.
Project Board
Kanban board with task editing and team views.
Admin Dashboard
Stats, activity, and CRUD modals.
SPA Navigation
Cascading nav with view transitions.
Forms
Validation and submission patterns.
Live Search
Debounced search with cached results.
Infinite Scroll
Append-on-intersection pattern.