Skip to content
Proyectos

Acerca de

Un crate de macros HTML con comprobación de tipos y una velocidad extraordinaria.

Desarrollo web y de aplicaciones

Cómo se miden estas cifras

What you can do

  • Compile-time type checking for element names/attributes, including extensible support for custom frameworks like htmx and Alpine.js
  • #![no_std] support
  • Extremely fast, using lazy rendering to minimize allocation
  • Integration with all major web frameworks

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

hypertext

A blazing fast type checked HTML macro crate.

Features

  • Compile-time type checking for element names/attributes, including extensible support for custom frameworks like htmx and Alpine.js
  • #![no_std] support
  • Extremely fast, using lazy rendering to minimize allocation
  • Integration with all major web frameworks

Example

use hypertext::prelude::*;

let shopping_list = ["milk", "eggs", "bread"];

let shopping_list_maud = maud! {
    div {
        h1 { "Shopping List" }
        ul {
            @for (i, item) in (1..).zip(shopping_list) {
                li.item {
                    input #{ "item-" (i) } type="checkbox";
                    label for={ "item-" (i) } { (item) }
                }
            }
        }
    }
}
.render();

// or, alternatively:

let shopping_list_rsx = rsx! {
    <div>
        <h1>Shopping List</h1>
        <ul>
            @for (i, item) in (1..).zip(shopping_list) {
                <li class="item">
                    <input id={ "item-" (i) } type="checkbox">
                    <label for={ "item-" (i) }>(item)</label>
                </li>
            }
        </ul>
    </div>
}
.render();

Projects Using hypertext

Make a pull request to list your project here!

Explorar proyectos relacionados

Cargando…