# @rbardini/html

> Tiny html tag function for no-build JSX-like syntax, compatible with all modern browsers and runtimes.

Latest version **1.0.1** (published 2024-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rbardini/html
pnpm add @rbardini/html
yarn add @rbardini/html
bun add @rbardini/html
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities; has provenance.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-09-02 |
| First published | 2024-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | Rafael Bardini |
| Maintainers | rbardini |
| Keywords | html, tagged, template, string, literal, jsx |

## Links

- npm: https://www.npmjs.com/package/@rbardini/html
- Repository: https://github.com/rbardini/html
- Issues: https://github.com/rbardini/html/issues
- npm.io page: https://npm.io/package/@rbardini/html

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2024-09-02

## README

# @rbardini/html

![JSR](https://img.shields.io/jsr/v/@rbardini/html)
![npm](https://img.shields.io/npm/v/@rbardini/html)

Tiny `html` tag function for no-build JSX-like syntax, compatible with all
modern browsers and runtimes.

```ts
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](https://github.com/jimniels/html).

## Usage

```sh
# Deno
deno add @rbardini/html

# npm
npm install @rbardini/html
```

Or copy-paste the contents of [`mod.ts`](./mod.ts).

---
_Source: https://npm.io/package/@rbardini/html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
