1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-11 00:12:15 +02:00
Files
deka-dom-el/docs/components/examples/elements/dde-dom-create.js
2025-03-19 13:57:16 +01: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);