Skip to Content
Prism UI
Core Concepts

Customization Model

Why Prism's primitives are copy-in, not an installed black-box component package.

Copy-in, not installed

Running prismrepo add text-field writes a real, editable text-field.tsx file into your project, components/prism/fields/text-field.tsx by default. It is not imported from a node_modules/@prismrepo/* package at runtime, there is no such package to import a TextField component from. Once installed, it is entirely yours: edit it, delete parts of it, replace its styling, or rewrite it completely.

This is a deliberate trade-off. A component shipped as a compiled package can be upgraded with one version bump, but a consumer can never truly make it their own without ejecting or forking it. Prism chooses the copy-in model so customization never requires forking anything.

Styling through CSS variables

Prism's Layer 1 primitives read their colors and radius from CSS variables, not hardcoded Tailwind utility values:

className={`border border-[var(--prism-input)] bg-[var(--prism-background)] ...`}

prismrepo init appends a starting set of these variables to your detected global stylesheet:

:root {
  --prism-background: oklch(100% 0 0);
  --prism-foreground: oklch(22% 0 0);
  --prism-border: oklch(87% 0 0);
  --prism-input: oklch(87% 0 0);
  --prism-ring: oklch(55% 0.18 260);
  --prism-destructive: oklch(54% 0.22 25);
  --prism-radius: 0.375rem;
}

Retheming every installed primitive at once means editing these variables, not hunting through component source for hardcoded colors. Editing the component source directly works too, it's a real file in your project.

Re-running the CLI after customizing

prismrepo add is always safe to re-run, even after you've edited the installed files:

  • An untouched file is updated cleanly if Prism ships a newer template, or left alone if nothing changed (a no-op).
  • An edited file is detected via a content-hash marker and refused, with an explanation of exactly which file and why, not silently overwritten. Pass --force only if you actually want to discard your edits.

See CLI for the full command reference and Generated Files for what each installed file actually contains.

On this page