dreamland.js
A utilitarian web framework

Lean and modular

dreamland core is 8.9kb minified before treeshaking (4.3kb gzipped; 4.0kb brotli'd) with modern features like scoped CSS-in-JS included. It's modular, with everything except the state system being treeshakeable. SSR/prerendering support only adds 1.3kb minified to the client.

Minimal counter app bundle size

Dreamland
6.05kb
React
13.00kb
SolidJS
19.29kb
Svelte
23.36kb
import { type Component } from "dreamland/core";

export const Counter: Component<
	{},
	{
		counter: number;
	}
> = function () {
	this.counter = 0;

	return (
		<div>
			<h2>Counter!</h2>
			<button on:click={() => this.counter++}>
				{use(this.counter)} clicks
			</button>
		</div>
	);
};

Counter!

import { css, type Component, type ComponentChild } from "dreamland/core";

const Button: Component<{
	children: ComponentChild;
}> = function (cx) {
	return <button on:click={() => alert()}>{cx.children}</button>;
};
Button.style = css`
	:scope {
		background: var(--accent);
		color: var(--bg-1);
		border: none;
		border-radius: 0.5rem;
	}
`;

export const StyledPage: Component = function () {
	return (
		<div>
			<Button>Click!</Button>
		</div>
	);
};

Powerful and intuitive

dreamland's syntax combines the intuitive Svelte style of state management and the power and integrability of JSX for a refreshing dev experience. It's simple and pragmatic, making writing highly reactive code easy.

Built-in scoped CSS-in-JS allows you to quickly reuse fully styled components without the need of external libraries.

Flexible and incremental

dreamland has no virtual DOM, allowing for easy integration with vanilla JS libraries and the browser's DOM APIs. It's easy to incrementally add dreamland to existing vanilla JS codebases because you can immediately attach dreamland components to the DOM.

Get started

dreamland's available on NPM. Check out the documentation to get started. You can also immediately try out dreamland in the playground.