1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-04-02 04:05:52 +02:00

15 lines
274 B
JavaScript

import { el } from "deka-dom-el";
// Create element with properties
const button = el("button", {
textContent: "Click me",
className: "primary",
disabled: true,
});
// Shorter and more expressive
// than the native approach
// Add to DOM
document.body.append(button);