Installation
Every package is published to npm and works in any Solid app — no build plugin required. Pick the layer you want, install it alongside solid-js, and import one stylesheet.
Pick a package
The five packages stack. Each one re-exports the layer beneath it, so install the highest one you need and nothing else — the lower layers come with it.
| Package | Install it when you want |
|---|---|
@proyecto-viviana/ui | The Viviana design system: every Spectrum component plus Viviana's own components, tokens and product patterns. |
@proyecto-viviana/solid-spectrum | Spectrum 2 styled components only, tracking Adobe's S2 visuals and behavior. |
@proyecto-viviana/solidaria-components | Headless components with render props — you bring all the styling. |
@proyecto-viviana/solidaria | ARIA behavior hooks for components you build yourself. |
@proyecto-viviana/solid-stately | State hooks only, with no DOM or ARIA opinions. |
Install
solid-js and @solidjs/web are peer dependencies. The release candidate needs Solid 2, so install the next line of both alongside the rc tag:
npm install @proyecto-viviana/ui@rc solid-js@next @solidjs/web@nextOr, for the Spectrum layer on its own:
npm install @proyecto-viviana/solid-spectrum@rc solid-js@next @solidjs/web@nextImport the CSS
Components do not inject their own styles. Import the stylesheet once at your app entry, or your components render unstyled:
import "@proyecto-viviana/ui/components.css";That one file is the usual import — it already contains the other three. Import them separately only if your app loads fonts itself:
| Subpath | Contents |
|---|---|
components.css | font-faces.css + theme.css + styles.css. The usual import. |
theme.css | Color-scheme tokens and the Viviana brand --color-* variables. |
styles.css | Generated component rules, without font faces or tokens. |
font-faces.css | Font-face declarations, including the Geist register. |
Keep these at the very top of your CSS entry, or as JS imports before any other stylesheet. font-faces.css opens with a remote @import for the Geist family, and CSS drops an @import that any rule precedes — load it late and the Geist register silently falls back to the default sans-serif.
@proyecto-viviana/solid-spectrum ships the same subpaths, minus the Viviana tokens:
import "@proyecto-viviana/solid-spectrum/components.css";Render inside a Provider
Provider establishes the color scheme, locale and text direction that components read. Deep imports are preferred in app code; the root barrel is convenient for examples and shared entry points.
import { Provider, Button } from "@proyecto-viviana/ui";
import { TextField } from "@proyecto-viviana/ui/TextField";
import "@proyecto-viviana/ui/components.css";
export function App() {
return (
<Provider colorScheme="dark">
<TextField label="Name" />
<Button variant="accent">Save</Button>
</Provider>
);
}TypeScript
The packages ship their own declarations. Your tsconfig needs Solid’s JSX:
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "@solidjs/web",
"types": ["vite/client"]
}
}Using Tailwind alongside
The library ships no Tailwind and needs none. The two coexist, but only if you declare the cascade layer order yourself, before any import:
@layer theme, base, _, L, components, utilities;
@import "tailwindcss";
@import "@proyecto-viviana/ui/components.css";_ and L are the layers the generated component rules live in. Without that line, layer order falls to first appearance and both outcomes fail silently: declare nothing and our layers sort last, so a bg-red-500 on one of our components does nothing; put ours first and Tailwind’s Preflight outranks us, stripping components back to bare.
Writing your own style() calls
Optional, and not needed to use the components — their CSS is generated at package build time. You only need the macro plugin if your own code calls style():
import { style } from "@proyecto-viviana/ui/style" with { type: "macro" };For Vite apps, use the packaged helper:
import { defineConfig } from "vite";
import solid from "@solidjs/vite-plugin";
import { vivianaMacros } from "@proyecto-viviana/ui/vite";
const packages = [
"@proyecto-viviana/ui",
"@proyecto-viviana/solid-spectrum",
"@proyecto-viviana/solidaria-components",
"@proyecto-viviana/solidaria",
"@proyecto-viviana/solid-stately",
];
export default defineConfig({
plugins: [vivianaMacros(), solid({ ssr: true })],
optimizeDeps: { exclude: packages },
ssr: { noExternal: [/@proyecto-viviana\/.*/] },
});@solidjs/vite-plugin is the Solid 2 plugin; vite-plugin-solid targets Solid 1.
vivianaMacros() builds on unplugin-parcel-macros, an optional peer — add it as a dev dependency when you use the helper:
npm install -D unplugin-parcel-macros