What you get
- Centralized source of truth for UI components, tokens, and styles
- Your library’s React components delivered directly into every connected project, ready for use
- One-click updates: when you release a new version, connected projects see an Update available prompt in the chat
- Automatic setup verification after every connect or update — Lovable checks the wiring (build config, CSS imports, theme providers, dependencies) and fixes anything missing
- Adherence enforcement during ongoing work: Lovable catches raw colors, custom or customized components, and other deviations from your design system
How design systems work
A design system in Lovable defines how components, styles, and setup instructions are applied across projects. Design systems are Lovable projects and can be opened and edited like any other project.What a design system consists of
A design system in Lovable combines three core parts:- Components: your React component library
- Schema and guidelines: a machine-readable schema (tokens, component catalog, constraints) plus rendered documentation Lovable reads on every generation
- Installation: setup instructions and required configuration
The design system project and the .lovable folder
The design system project owns a special .lovable folder. When you release your design system,
Lovable generates the following:
design-system.json: the standardized, machine-readable schema, including tokens, component catalog (variants, props, examples), and stack constraints. This is the source of truth.rules/components.md: component catalog, rendered from the schema.rules/design-tokens.md: token reference, rendered from the schema.rules/library-guidelines.md: stack requirements and usage rules, rendered from the schema.system.md: high-level installation instructions and design philosophy. This file is preserved across releases, meaning that Lovable does not regenerate it from the schema.
system.md through the Knowledge tab in the project settings or by chatting with Lovable
directly. The other files are regenerated on every release.
How design systems are applied to projects
When a project is connected to a design system, Lovable performs a file-copy attach:- The design system’s React components are copied into the connected project at
src/design-system/<design-system-slug>/. Lovable imports components from there. - The design system’s
.lovableknowledge files (schema, rendered rules, andsystem.md) are copied to.lovable/rules/libraries/<design-system-slug>/. Lovable reads them on every generation. - Required runtime dependencies are merged into the connected project’s
package.json. - A
[[libraries]]entry inlovable.tomlrecords which design system is connected and at what version.
Updates
When you release a new version of your design system, every connected project sees an Update available prompt in the chat. Accept the update and Lovable reruns the file-copy attach against the new version: old design system files are removed, new ones are copied in, dependencies are remerged, and setup verification reruns. The connected project’s own code is untouched.Setup verification
After a design system is attached to a project (either at project creation or in an existing project), the agent runs a silent verification pass to confirm that the design system is wired up correctly. This pass checks that:- Your build pipeline picks up the design system’s source folder, and does not fail.
- The design system’s styling entry is imported wherever your project loads styles.
- Any wrapper components or providers the design system requires are in place at the appropriate scope.
- All required dependencies are declared in
package.json.
Adherence checks
While you’re working in a connected project, every generation is scanned for violations of the design system:- Raw color literals where a design system token should be used
- One-off values that bypass the design system’s tokens or scale
- Inline styles that override the design system’s defaults
- Local component implementations for things that should come from the design system
Key notes and limitations
- The
.lovablefolder is owned by the design system project and cannot be edited from connected projects. - Connected projects record the version of the design system they were last attached at. Updates apply when accepted from the chat prompt.
- Lovable design systems work natively with React component libraries.
- A design system is created as its own dedicated project from the Create a design system flow.
- An unreleased design system cannot be used as the basis for a new project. Create an initial release first.
- A project can be connected to at most one design system at a time. Detaching a connected design system isn’t supported yet. Ensure to pick the right one before connecting.
- If your design system or related documentation is hosted within your VPC, reach out to your account team for guidance.
- Design systems are supported for React. Other frameworks such as Vue, Angular, or Svelte are not supported today, so your mileage may vary. Reach out to your CSM or FDE if you need them.
- New projects created from a design system currently scaffold on a TanStack template, even when the design system is a Vite/React one, and the styling framework is not always wired into the build automatically. A consumer that uses Vite can pull in Tailwind 3, which conflicts with Tailwind 4. When this happens, Lovable’s setup verification usually corrects the wiring on the first generation; if styles still look wrong, ask Lovable in the connected project to wire up the design system’s styling framework. Deterministic scaffolding and styling setup are known limitations being improved.
Create a design system
Prepare access (private packages only)
Create a design system project
+ dropdown of the lovable.dev prompt box, select Design
and select Use a design system.In the modal, select Create design system.This creates a new design system project. Lovable assigns a name to your project, which you
can change from the project settings.Give your design system a meaningful name. This name is used when connecting the design
system to projects later.Configure the design system by chatting with Lovable
- An npm package: give the package name. Public packages are fetched automatically; for a private package, add its npm token under Workspace settings → Build secrets first.
- A public Git repository: share the repository URL and Lovable imports the components from it.
- A private repository, or loose files: there is no private-repository fetch. Clone the repository yourself (or export the files) and upload them, and Lovable integrates them.
system.md via the Knowledge tab in project settings or by
chatting with Lovable directly.- Import PDFs, Markdown files, screenshots, and other assets
- Define components, patterns, tokens, and styling guidelines
- Write installation and setup instructions
- Update everything dynamically across connected projects
Release the design system
Prepare your library to release cleanly
How a design system releases depends on where its components come from. There are two paths, each with its own prerequisites:- Local source (Path A): the component source lives in the design system project itself, whether built in Lovable, imported from a public Git repository, or uploaded by you. Releasing reads tokens and components straight from that source.
- npm wrapper (Path B): the design system wraps an external npm package. Releasing reads the component surface from the package’s published type definitions, and the project holds only a thin wrapper layer.
Local source (Path A)
A local design system releases cleanly when Lovable can find your tokens and components:- Tokens are discovered from top-level styling files: CSS custom properties
in files like
src/index.cssorsrc/styles/tokens.css, atailwind.config, or atheme/tokenssource file. Component-local stylesheets buried deeper in the tree are not treated as the token source. - Components are discovered from a barrel (
src/index.tsorsrc/index.tsx) when one exists, otherwise from the files undersrc/components/. system.mdcarries everything the schema can’t infer: design philosophy, narrative usage rules, and installation quirks. Author it by hand; releasing never overwrites it.
npm wrapper (Path B)
A wrapper design system releases cleanly when the upstream package and the wrapper are both in good shape:- The upstream package must ship typed exports (a
.d.tsentry or anexportsmap). Releasing reads the component surface from those types. A package that ships no types has nothing to extract, and the release fails. - Keep
src/near-empty. With a wrapper, the real components come from the npm package, so the project only needs thin wrapper or provider files. Everything insrc/that isn’t excluded is copied into connected projects, so extra scaffolding insrc/becomes noise in every consumer.
Public npm package
If the upstream is published to the public npm registry, nothing else is required: the design system just needs to be marked as wrapping that package name. Releasing fetches the package from the public registry.Private registry package
If the upstream lives on a private registry (for example GitHub Packages or a self-hosted registry), two things are required so that both releasing and the connected projects can install it:-
The package must be scoped (
@scope/name). -
A scoped
.npmrcbacked by a workspace build secret. Add the registry and auth lines for the scope, for example:NPM_TOKENreferences a token stored under Workspace settings → Build secrets. You can provide the registry URL and secret when you create the design system (Lovable writes the.npmrcfor you) or author the.npmrclines yourself. Without recorded auth for a scoped private package, releasing stops and asks you to add these lines, because the same configuration is what lets connected projects authenticate on attach.
What gets copied to connected projects
Attach copies only two parts of the design system project into each connected project: your component source undersrc/, and your .lovable/ knowledge
files. A few things are excluded by default so they don’t leak into consumers:
- Showcase and demo pages. Anything under
src/pages/orsrc/routes/, and any*.stories.ts/*.stories.tsxfile, is excluded. Put your showcase there so you can preview the library without shipping the preview app to every consumer. - Tests and scaffold entrypoints (
src/main.tsx,src/App.tsx, test files, and similar) are excluded too. - Knowledge files live in
.lovable/rules/*.mdand are always propagated. Knowledge is never excluded.
.dsignore file at the project root, which
uses gitignore syntax and layers on top of the defaults. Use it to exclude extra
internal files, or to re-include something a default would otherwise drop.
Connect a design system to projects
In each project’s settings, you can see which design system is connected and which ones are available to connect.Connect a design system to new projects
From the+ dropdown of the lovable.dev prompt box, go to Design
and select Use a design system, select the design system you want to use, then enter your prompt. Lovable
generates your new project using the selected design system.
Connect a design system to existing projects
To connect a design system to an existing project, follow the steps below:- Go to Project settings → Design systems.
- Under Available, select a design system and click Add.
- Click Save.
Refine your design system
Design systems are meant to evolve. After the initial setup, iterate on the contents of the.lovable folder and your component source.
- Check the structure
Open the.lovablefolder to see how Lovable generated your schema and documentation. These files are what gets applied to all connected projects on the next update. - Fix inconsistencies
If components do not render correctly, ask Lovable to fix them and update the schema at the same time. Re-release to push the fix to connected projects. - Add detail
Request additional component documentation, token definitions, or usage patterns as needed. Each release bumps the version and notifies connected projects of an available update.
.lovable folder structure
Lovable generates this automatically when you release.
In the design system project:
.lovable files are copied to a namespaced
subfolder:
src/design-system/<design-system-slug>/ in the
connected project, imported as @/design-system/<design-system-slug>/....
Fetch external design system documentation with MCP servers
MCP servers can be used to fetch design system documentation that is stored separately from your npm packages. See Integrate with your tools using chat connectors (MCP servers) for more information.Troubleshooting
React version mismatch
React version mismatch
Conflicting dependencies
Conflicting dependencies
Preview looks broken right after connecting
Preview looks broken right after connecting
Lovable is not using the components I expect
Lovable is not using the components I expect
Release fails: private package needs a scoped registry
Release fails: private package needs a scoped registry
@scope/name) and add the registry and
auth lines for that scope to .npmrc, backed by a workspace build secret:NPM_TOKEN secret under Workspace settings → Build secrets, then release again.Release fails: registry auth failed or package not found
Release fails: registry auth failed or package not found
.npmrc registry line points at the
right host. For the Lovable-managed registry (see Private registry), make sure the workspace’s private npm registry is
enabled in workspace settings. Then release again.Release fails: the package ships no typed exports
Release fails: the package ships no typed exports
.d.ts types or exports map, there is nothing to extract. Wrap a package that ships
types, or build the components as a local (from-scratch) design system instead.Release does nothing or reports an empty design system
Release does nothing or reports an empty design system
tailwind.config, or a
theme/tokens file) and that components are exported from src/index.ts or live under
src/components/. Ask Lovable to run the design system discovery step, then release again.FAQ
Is a design system just a Lovable project?
Is a design system just a Lovable project?
Can I connect more than one design system to a project?
Can I connect more than one design system to a project?
Can any project be turned into a design system?
Can any project be turned into a design system?
How do I see which design system is connected to my project?
How do I see which design system is connected to my project?
Are design systems versioned?
Are design systems versioned?
What is the difference between a released and a draft design system?
What is the difference between a released and a draft design system?
Can I remove a design system from a project?
Can I remove a design system from a project?
Can I edit the design system from a connected project?
Can I edit the design system from a connected project?
src/design-system/<design-system-slug>/ and
.lovable/rules/libraries/<design-system-slug>/ are present in a connected project’s git, so
you can read and import them, but local edits will be replaced the next time you accept an
update. For permanent changes, propose them in the design system project.Do I need to publish my design system to npm?
Do I need to publish my design system to npm?
What's the difference between a from-scratch and an npm-wrapper design system?
What's the difference between a from-scratch and an npm-wrapper design system?
@scope/name) and you add a scoped .npmrc backed by a workspace build
secret so both releasing and connected projects can authenticate.What technologies do design systems support?
What technologies do design systems support?
Why does the agent sometimes make extra edits right after I attach a design system?
Why does the agent sometimes make extra edits right after I attach a design system?
Do design systems replace templates?
Do design systems replace templates?