Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
rbardini/htmlTiny html tag function for no-build JSX-like syntax, compatible with all modern browsers and runtimes.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
JSR Score
100%
Published
4 months ago (1.0.1)
@rbardini/html
Tiny html
tag function for no-build JSX-like syntax, compatible with all
modern browsers and runtimes.
import { html } from '@rbardini/html' const heading = ({ level = 1, children }) => html`<h${level}>${children}</h${level}>` const list = ({ title, items }) => html` ${title && heading(title)} <ul> ${items.map((item) => html`<li>${item}</li>`)} </ul> `
Inspired by jimniels/html.
Usage
# Deno deno add @rbardini/html # npm (one of the below, depending on your package manager) npx jsr add @rbardini/html yarn dlx jsr add @rbardini/html pnpm dlx jsr add @rbardini/html bunx jsr add @rbardini/html
Or copy-paste the contents of mod.ts
.
Built and signed on
View transparency logGitHub Actions
Add Package
deno add jsr:@rbardini/html
Import symbol
import * as html from "@rbardini/html";
---- OR ----
Import directly with a jsr specifier
import * as html from "jsr:@rbardini/html";
Add Package
npx jsr add @rbardini/html
Import symbol
import * as html from "@rbardini/html";
Add Package
yarn dlx jsr add @rbardini/html
Import symbol
import * as html from "@rbardini/html";
Add Package
pnpm dlx jsr add @rbardini/html
Import symbol
import * as html from "@rbardini/html";
Add Package
bunx jsr add @rbardini/html
Import symbol
import * as html from "@rbardini/html";