Installation
Solar is runtime-based — no compiler, no build step required. Scaffold a new project with one command, or drop it into any HTML file via CDN.Scaffold a new project (recommended)
my-app/ directory with everything wired up:
http://localhost:3000 — your app is running.
CDN (recommended to start)
The fastest way to get running. Import Solar directly from a CDN in any HTML file:npm
For projects using a bundler (Vite, Rollup, esbuild):Project structure
Solar enforces a rigid file structure so that generated components are always predictable:- One component per file
- File name matches the component name
- Default export is always the
defineComponentcall
Your first component
Every component is defined through a schema that declares its shape explicitly:Mounting to the DOM
UsemountComponent to attach a component to a DOM node: