
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A lightweight reactive web development library based on web components. No compiler required.
An incredibly lightweight and easy to use Web Development library that is reactive and based upon Web Components.
npm install oxidizer
Every HTML Element has a correspond factory function that can be used to create them.
These functions return an HTMLElement instance
import {DIV, H1, H3} from "oxidizer"
const simpleHeader = DIV(
{id: 'simple-header', className: 'col center'}, // Attributes
H1('Heading 1'), // Children
H3('Sub Heading')
);
document.body.append(simpleHeader);
console.log(simpleHeader instanceof HTMLDivElement) // true
Elements can be created without attributes, or without children, or without both.
const div = DIV();
const div = DIV({id: 'my-div'})
const div = DIV(
P('Paragraph 1'),
P('Paragraph 2')
)
These element factory functions can also take props as an input, which can be used to dynamically update their attributes and contents.
props can be created using the createProps method.
// SIMPLE COUNTER APP EXAMPLE
import {createProps, BUTTON, DIV, H1} from "oxidizer";
const props = createProps({count: 0});
const counter = DIV(props, p => [
{id: 'simple-counter'},
H1(`Count: ${p.count}`),
BUTTON(
{onclick: () => p.count += 1},
'Increment Count'
)
]);
document.body.append(counter);
// ANOTHER EXAMPLE
import {createProps, DIV, INPUT, P} from "oxidizer";
const props = createProps({
firstName: "John",
lastName: "Doe"
});
const nameInput = DIV(props, p => [
{className: 'name-card'},
DIV({style: {display: 'flex'}},
P(p.firstName),
P(p.lastName)
),
DIV({style: 'display:flex'},
INPUT({
placeholder: 'First Name',
value: p.firstName,
onchange(event){
p.firstName = (event.target as HTMLInputElement).value;
},
}),
INPUT({
placeholder: 'Last Name',
value: p.lastName,
onchange(event){
p.lastName = (event.target as HTMLInputElement).value;
},
}),
)
])
document.body.append(nameInput);
props can be easily mixed together
import { createProps, DIV, BUTTON, P } from "oxidizer";
const styleProps = createProps({color:'red'});
function WeirdElement () {
const props = createProps({ count: 1 });
return (
DIV(props, p => [
{ id: 'test-element'},
P(styleProps, sp => [
{
style: `color: ${sp.color};`,
onclick: () => {
sp.color = 'blue';
}
},
`Color: ${sp.color}`,
`Count: ${p.count}`
]),
BUTTON({ onclick: () => p.count += 1 }, [
"Increment"
])
])
)
}
document.body.append(
WeirdElement()
)
Effects are functions that will we triggered when a specified props property has been altered.
import { createEffect, createProps, BUTTON, DIV, H1, H6, H2 } from "oxidizer";
type AppProps = {
theme: 'light' | 'dark',
user: undefined | {username: string}
}
const props = createProps<AppProps>({
theme: 'dark',
user: undefined
}, [
// make sure light theme is appropriate
createEffect('theme', (p) => {
const date = new Date();
const isNight = date.getHours() < 6 || date.getHours() > 18;
if (p.theme === 'light' && isNight){
return {theme: 'dark'}
}
}),
// keep the user perpetually signed in
createEffect(['user', /* more deps here if you want*/], (p) => {
if (!p.user) {
setTimeout(() => {
p.user = { username: "snakgoat" }
}, 3000)
}
})
]);
export default function HomePage () {
return (
DIV({ id: 'app' },
DIV(props, p => [
{ id: 'home-page' },
!p.user ? (
H2('Loading Information...')
) : (
H1(`Welcome ${p.user.username}`)
),
BUTTON(
{onclick: () => p.theme = 'light'},
"Change Theme"
),
BUTTON(
{onclick: () => p.user = undefined},
"Sign Out"
)
]),
H6('Come Again!')
)
)
}
Web Components can be simply integrated into your app via the createComponent method.
createComponent returns a factory function that works identically to the intrinsic HTMLElement factory functions.Component interface to help with WebComponent typing.import { createComponent, Component, H1, P } from "oxidizer";
const TestApp = createComponent(
'test-app',
class extends HTMLElement implements Component {
connectedCallback(): void {
this.style.color = "red";
this.style.background = "blue";
}
}
);
document.body.append(
TestApp(
{id: "root"},
H1('Hello!'),
P('How do you like my app?')
)
)
export default TestApp;
A useful package for bootstrapping oxidizer apps
A router component & state management library
FAQs
A lightweight reactive web development library based on web components. No compiler required.
We found that oxidizer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.