1.2.1 • Published 2 years ago
@itsy/h v1.2.1
h
install
pnpm add -D @itsy/huse
import { h } from '@itsy/h'
h('h1', { class: 'omg' }, 'Hello world!')api
The h function can take two or three primary arguments. In the three-argument form, an options-object is also available.
tag: The HTML tag to createattrs: An object of HTML attributes - e.g.{ id: 'foo' }would createid="foo"children: A string or array of strings containing child-content for the parentopts: An options-objectopts.escape: Will HTML-escapechildren