Skip to content

voxelstack/ceres

Repository files navigation

npm

ceres

The only difference between ceres and svelte is press coverage1234567.

— Panic! At The Disco89

ceres is a UI framework for the web built around observables. It works by making small changes to the DOM whenever your data changes, and it feels like writing svelte with hyperscript.

const Greeter = $createComponent<{ greeting: string }>(($props) => {
    const name = $store("there");

    return $element("div", {},
        $element("input", { type: "text", bind: { value: name } }),
        $element("button", { on: { click: () => name.value = "ceres" } }, "Greet myself"),
        $element("span", {}, $format`${$props.greeting} ${name}!`)
    );
});

const app = Greeter({ greeting: "Hey" });
app.mount(document.body);

Read the docs and try it out at the website.

Footnotes

  1. And that svelte is nicer to use[citation needed].

  2. And production ready[citation needed].

  3. And wasn't thrown together in a couple of days just for fun[citation needed].

  4. And is faster[citation needed].

  5. And has a compiler.

  6. And has an active community (at the time of writing, you know how it goes with JS).

  7. Both have the huge advantage of not being React though.

  8. Paraphrased. Maybe.

  9. https://music.youtube.com/watch?v=vtEvxD0ZiWs&si=nrr_u9OJUunImGdM