
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
🚀 dotElement is a lightweight utility similar to React.createElement, but for vanilla JavaScript. It allows you to create and manage DOM elements efficiently with a JSX-like approach.
className or an inline style object (like: {backgroundColor: "red"}).onClick, onChange, etc.).Install via npm or pnpm:
npm install dotElement
Or using pnpm:
pnpm add dotElement
import { createElement } from "dotElement";
document.body.appendChild(
createElement("button", {
className: "btn-primary",
style: { backgroundColor: "blue", color: "white", padding: "10px" },
onClick: () => alert("Button Clicked!"),
}, "Click Me!")
);
const container = createElement("div", { className: "container" },
createElement("h1", {}, "Hello, dotElement!"),
createElement("p", {}, "This is a lightweight JSX alternative for vanilla JS."),
createElement("button", {
onClick: () => alert("Clicked!"),
style: { padding: "10px", backgroundColor: "green", color: "white" }
}, "Click Me")
);
document.body.appendChild(container);
createElement(tagName, props?, ...children): HTMLElement| Parameter | Type | Description |
|---|---|---|
tagName | string | The HTML tag name (e.g., "div", "span"). |
props | ElementProps (optional) | Attributes, event listeners, className, and styles. |
children | Children[] | The child elements (text, numbers, elements, or nested arrays). |
className → Sets class attribute.style → Supports inline styles as an object or string.onClick, onChange, onMouseEnter, etc.).onEventName to the correct event type.id, title, href, etc.).dotElement is fully typed! 🎯
const heading: HTMLHeadingElement = createElement("h1", {}, "Welcome!");
MIT License © 2025. Feel free to use, modify, and contribute! 🚀
💡 Contributions & Issues: Feel free to open an issue or submit a PR on GitHub!
FAQs
A lightweight React.createElement alternative for vanilla JS
We found that dotelement demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.