Skip to content
ChartslibraryUI
Get Pro
By Boris Marino · Updated 2026-12-01

Better Charts in Lovable, Bolt and v0: How to Add ChartslibraryUI

Lovable, Bolt and v0 build a working React app from a prompt, and the charts are usually where it shows. Each card gets its own colors, axes are crowded, a forecast looks like actual data, and dark mode half works. You can prompt every chart into shape, but the next dashboard starts from zero again.

The fix is to give the builder finished chart components instead of asking it to draw charts. ChartslibraryUI's charts are one React file each, with React as the only dependency, so they drop into the Vite or Next.js projects these tools create. This guide shows the setup that works best in each tool, and the prompts to use after.

Which method for which tool

Tool Best method What you need
Lovable Add our MCP server as a chat connector Nothing: it's free and needs no sign-in
Bolt Install with the shadcn CLI in Bolt's terminal Nothing
v0 "Open in v0" with the chart's registry link A v0 account
Any of them Attach the chart file from the chart's page Nothing

All four work with the 39 free charts. Pro charts work the same way with your access key, as described below.

Lovable: add the MCP connector

Lovable can use outside MCP servers as chat connectors: they give the Lovable agent extra tools while it builds. Our MCP server lets it search the charts, read when to use each one and fetch the source.

  1. In Lovable, open Connectors, click Add custom, then choose MCP server.
  2. Server name: chartslibraryui
  3. Server URL: https://chartslibraryui.com/api/mcp
  4. Authentication: No authentication (free charts). If you have Pro, choose Bearer token or API key and paste your clui_… access key from Account → Downloads, without the word "Bearer".
  5. Click Add server.

Then ask in your project chat:

Using the chartslibraryui connector, find the right chart for each card and add the
chart files to the project exactly as they are (don't rewrite them). Build a dashboard
with a KPI row (MRR, churn, lower is better), MRR by month with the last 3 months as
forecast, and signups by channel sorted from largest to smallest.

Two things to know. A chat connector only helps Lovable while it builds: your published app doesn't call our server, it just contains the chart files. And the connector is per user, so teammates add it themselves.

Without the connector: open a chart's page, click Download the chart for your AI tool under Installation, and attach or paste the file in the Lovable chat with the same prompt. If your Lovable project is synced to GitHub, you can also run the shadcn command below on your machine and push; Lovable picks up the files.

Bolt: install in the terminal

Bolt runs a full Node environment with a terminal, so the shadcn CLI works there. Ask Bolt (or type in its terminal):

Run: npx shadcn@latest add https://chartslibraryui.com/r/line-chart.json
Then import components/charts/core/charts.css once in src/main.tsx and show our
monthly signups as a line chart. Read https://chartslibraryui.com/llms.txt first.

Change line-chart to the chart you want; the name is in the chart page's address. If the project isn't set up for shadcn yet, the CLI asks to create a components.json first: accept the defaults. The charts don't need Tailwind.

v0: open the chart in v0

v0 builds with shadcn, and it can open a shadcn registry item directly. Put the chart's registry link after https://v0.dev/chat/api/open?url=:

https://v0.dev/chat/api/open?url=https://chartslibraryui.com/r/line-chart.json

v0 starts a chat with the chart's files already added. From there, prompt as usual: "Use this chart to show our weekly active users, last 12 weeks, the current week partial." In an existing v0 chat, you can also paste the npx shadcn@latest add command from above and ask v0 to add those files.

Prompts that keep the charts consistent

Whatever the tool, these instructions stop most of the drift:

  • "Use the chart files exactly as they are." A builder that rewrites the chart loses the formatting, dark mode and table view.
  • Say what good looks like. "Lower is better" for costs, churn and delays, so colors follow the business meaning.
  • Say what's missing and what's a forecast. Empty cells stay empty (not zero) and forecasts are dashed and labeled.
  • Ask for a takeaway title. "Costs are 8% over budget", not "Costs".
  • No second y-axis. Ask for a combo chart or two charts instead.

More prompts for finance, operations and marketing are in Build with AI (no code).

Check the result

Every chart has a Table button: open it and compare a few numbers with your source. Then switch your app to dark mode and narrow the window to phone width; the charts should still read cleanly. If a chart shows a message instead of a drawing, it is naming a problem in the data (for example text where a number was expected): paste the message back into the chat.

FAQ

Do I need to know how to code? No. The builder does the setup. You pick the chart, describe your data and check the result with the Table button.

Will it work in Replit, Cursor or Claude Code? Yes. Tools that can run commands use the shadcn CLI method (as in Bolt). For coding agents, see Build a React dashboard with Claude Code or Cursor.

Does my published app depend on your server? No. The chart files are copied into your project. The MCP connector and the registry are only used while building.

Can I use Pro charts? Yes, with your access key: in Lovable as the connector's bearer token, and with the shadcn CLI as described in Installation.

Try the free charts in your app

39 charts, MIT, one command each.

More

Sign in to ChartslibraryUI

New here? The same step creates your account.

Continue with Google
or

No password needed. Bought Pro? Use the email you paid with and your license is there. By signing in you agree to the Terms and Privacy policy.