Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic

Getting started

Prismora comes in four parts. Use as many as you need.

LayerPackageWhat it gives you
CSS@prismora/cssTokens, themes, surfaces and a class/attribute API for every component. Zero JavaScript, SSR-safe.
Elements@prismora/elementsInteractive web components (<pm-dialog>, <pm-tabs>, form controls…) that work in any framework.
Wrappers@prismora/react, vue, svelte, solid, angularTyped components, camelCase events and two-way binding, generated from one manifest.
Theme@prismora/themedefineTheme(), the CSS compiler, exporters and the runtime theme switcher.

Quick start

In your project folder, run:

npx @prismora/cli init # or: bunx / pnpm dlx / yarn dlx @prismora/cli init

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:

Prismora init · detected Next.js (pnpm) ✔ Which framework does this project use? Next.js ✔ Brand colour (any CSS colour) #0ea5e9 ✔ Surface style Glass ✔ Corners Rounded ✔ Density Comfortable ✔ Fonts Inter ✔ Default colour mode Follow the system ✔ On phones Native feel ✔ Where should the theme CSS go? src/app/prismora.theme.css ✔ Add the imports and no-flash script to your app files? Yes ✔ Install the packages with pnpm? Yes ✔ Add Prismora notes to AGENTS.md for AI coding agents? Yes ✔ Set up the Prismora MCP server for Claude Code Changes: + prismora.theme.ts theme config (edit it, then run prismora theme build) + src/app/prismora.theme.css generated theme CSS + prismora.json project settings for prismora add ~ src/app/layout.tsx Prismora styles and no-flash script in the root layout + AGENTS.md notes for AI coding agents + .mcp.json Prismora MCP server for AI agents ✔ Write 6 files? Yes

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:

npx @prismora/cli add dashboard --write # into your routes folder, in your framework's syntax npx @prismora/cli list patterns # every 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.

npx @prismora/cli init --yes --framework nuxt --seed "#16a34a" --surface flat --radius soft \ --density compact --font figtree --mode system --mobile native --no-install --mcp cursor --json
FlagValues
--frameworknext · react-router · tanstack-start · react · preact · nuxt · vue · sveltekit · svelte · solid-start · solid · qwik · astro · angular · lit · html
--seedany CSS colour
--surface · --radius · --densityas in the theme config
--fontsystem · inter · figtree · jakarta · manrope · grotesk · friendly · editorial
--mode · --mobilesystem · light · dark  /  native · web
--csswhere to write the theme CSS
--no-install · --no-wire · --agents · --mcpskip 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

npm install @prismora/css @prismora/elements @prismora/theme # plus your framework's wrapper: @prismora/react, vue, svelte, solid or angular

2. Load the foundation, then import what you use

import '@prismora/css/foundation.css'; // tokens, default theme, base styles (≈12 KB gzip) import '@prismora/elements/card'; // each import registers one element import '@prismora/elements/input'; // and brings that element's own CSS import '@prismora/elements/button';

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

<pm-card heading="Welcome" surface="glass"> <pm-input label="Email" type="email" name="email" required></pm-input> <pm-button slot="footer">Continue</pm-button> </pm-card> <!-- Or zero-JS markup with the CSS class API --> <button class="pm-button" data-variant="soft" data-tone="success">Save</button>

4. Make it yours

Pick a brand colour in the theme generator, or generate a theme in code:

// prismora.theme.ts import { defineTheme } from '@prismora/theme'; export default defineTheme({ seed: '#7c5cff', harmony: 'analogous', surface: 'glass', radius: 'rounded', themes: { midnight: { seed: '#8b5cf6', scheme: 'dark' } }, components: { button: { variant: 'soft' } }, }); npx @prismora/cli theme build prismora.theme.ts -o src/prismora.theme.css

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:

import { noFlashScript } from '@prismora/theme'; // <script>{noFlashScript}</script> in your document head

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:

AttributeValues
variantsolid · soft · outline · ghost · link
toneaccent · secondary · neutral · success · warning · danger · info
sizexs · sm · md · lg · xl
surfaceflat · outline · gradient · glass · neumorphic
radiusnone · sharp · rounded · soft · pill
densitycompact · comfortable · spacious
motionnone · 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.