Getting started
Prismora comes in four parts. Use as many as you need.
| Layer | Package | What it gives you |
|---|---|---|
| CSS | @prismora/css | Tokens, themes, surfaces and a class/attribute API for every component. Zero JavaScript, SSR-safe. |
| Elements | @prismora/elements | Interactive web components (<pm-dialog>, <pm-tabs>, form controls…) that work in any framework. |
| Wrappers | @prismora/react, vue, svelte, solid, angular | Typed components, camelCase events and two-way binding, generated from one manifest. |
| Theme | @prismora/theme | defineTheme(), the CSS compiler, exporters and the runtime theme switcher. |
Quick start
In your project folder, run:
It detects your framework and package manager, asks a few questions with sensible defaults, shows every file it will change, and waits for your confirmation:
Running it again is safe: nothing is imported or injected twice. It supports Next.js, React, Nuxt, Vue, SvelteKit, Svelte, Solid, Astro, Angular and plain HTML, and each has a reference app showing the result. Then start from a template:
In CI, scripts and AI agents
Pass answers as flags to skip the questions. --yes is required where there is no terminal to confirm on: without it init prints the plan, writes nothing and exits with code 1. --json prints a machine-readable result; --dry-run shows the changes without writing.
| Flag | Values |
|---|---|
--framework | next · react-router · tanstack-start · react · preact · nuxt · vue · sveltekit · svelte · solid-start · solid · qwik · astro · angular · lit · html |
--seed | any CSS colour |
--surface · --radius · --density | as in the theme config |
--font | system · inter · figtree · jakarta · manrope · grotesk · friendly · editorial |
--mode · --mobile | system · light · dark / native · web |
--css | where to write the theme CSS |
--no-install · --no-wire · --agents · --mcp | skip installing · skip editing app files · add AGENTS.md notes · claude, cursor or vscode |
Or set it up by hand
These are the steps init performs. The framework guide shows where each piece goes.
1. Install
2. Load the foundation, then import what you use
Your bundle contains only the elements you import. Framework wrappers do this for you: import { Button } from '@prismora/react' ships only the button. For quick prototypes, import '@prismora/css' and import '@prismora/elements/define' load everything.
3. Use it
4. Make it yours
Pick a brand colour in the theme generator, or generate a theme in code:
Prevent theme flashing
Inline the no-flash script near the top of <head> (after <meta charset>) so the saved mode, theme and phone layout apply before the first paint. It must be inline, not a module or deferred script:
Problems? See Troubleshooting and FAQ.
Shared control API
Every component accepts the same design attributes, so humans and AI agents only need to learn them once:
| Attribute | Values |
|---|---|
variant | solid · soft · outline · ghost · link |
tone | accent · secondary · neutral · success · warning · danger · info |
size | xs · sm · md · lg · xl |
surface | flat · outline · gradient · glass · neumorphic |
radius | none · sharp · rounded · soft · pill |
density | compact · comfortable · spacious |
motion | none · reduced · full |
tone, surface, radius, density and motion are contextual: set them on any ancestor (as data-*) and every descendant follows, with the nearest setting winning.