
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
Roselt.js is a vanilla JavaScript SPA framework built on the Navigation API.
Roselt.js is a vanilla JavaScript framework for building routed web apps with real HTML, persistent shell sections, and file-based organization.
pages/ files, with optional same-name JavaScript and CSS sidecars.roselt section="...".Learn more at www.roseltjs.org.
Roselt.js is designed for gradual adoption, so you can start with the workflow that matches your project:
npm create roselt-js@latest my-appnpm install roselt-jsdist/roselt.jsThe recommended way to start a new project is:
npm create roselt-js@latest my-app
cd my-app
npm install
npm start
If you already created or cloned a fresh repository, you can scaffold directly into that repo root:
npm create roselt-js@latest .
npm install
npm start
That works when the directory only contains repo bootstrap files such as .git, .github, .gitignore, README*, or LICENSE*.
If you want the CLI directly, this works too:
npx roselt-js create my-app
Generated apps include a starter shell, a home route, a 404 route, and a local development server powered by roselt serve.
You can find the Roselt.js documentation on the website.
Start with Getting Started for a quick overview.
The documentation is divided into several sections:
Here is the smallest Roselt.js app shape:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My Roselt App</title>
</head>
<body>
<roselt page="home" navigate></roselt>
<script src="https://cdn.jsdelivr.net/gh/ShaunRoselt/Roselt.js@main/dist/roselt.js"></script>
<script>
window.Roselt.start();
</script>
</body>
</html>
Then create the first routed page:
<!-- pages/home.html -->
<section>
<h1>Home</h1>
<p>Roselt.js rendered this page from pages/home.html.</p>
<a href="?page=about">About</a>
</section>
Then add the page it links to:
<!-- pages/about.html -->
<section>
<h1>About</h1>
<p>This page was rendered from pages/about.html.</p>
<a href="?page=home">Back home</a>
</section>
For the default query router, a normal anchor such as <a href="?page=about">About</a> is enough to move between pages.
If you want to trigger navigation from JavaScript instead, Roselt also exposes:
Roselt.navigate("about");
Most Roselt.js apps follow this structure:
index.html
pages/
home.html
home.js
home.css
docs/getting-started.html
sections/
site-header.html
site-header.js
site-header.css
site-footer.html
components/
ui-button.js
The default start path requires a roselt[page] element marked with navigate. If a document contains multiple roselt[page] elements, Roselt uses the one marked with navigate as the routed page root.
This repository includes working examples you can inspect directly:
examples/starter-app/ is the official starter template used by npm create roselt-jspackages/create-roselt-js/ contains the npm create entry pointThe main purpose of this repository is to keep evolving Roselt.js as a small, platform-first app framework for modern browsers.
To work on the repository locally:
npm install
npm run build
npm run check
npm run serve
Then open /docs/ locally for the public documentation site, or inspect the example apps under /examples/.
Roselt ships ES2022 output and currently targets the latest browsers with Navigation API support.
Roselt.js is MIT licensed.
FAQs
Roselt.js is a vanilla JavaScript SPA framework built on the Navigation API.
The npm package roselt-js receives a total of 4 weekly downloads. As such, roselt-js popularity was classified as not popular.
We found that roselt-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.