<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Malik Abimanyu</title>
    <description>The latest articles on DEV Community by Malik Abimanyu (@malikabimanyu).</description>
    <link>https://dev.to/malikabimanyu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4250940%2Fdc98f981-ea49-4cf2-b91c-4282a4a6839f.png</url>
      <title>DEV Community: Malik Abimanyu</title>
      <link>https://dev.to/malikabimanyu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/malikabimanyu"/>
    <language>en</language>
    <item>
      <title>Animated candlestick chart in React for a shadcn dashboard</title>
      <dc:creator>Malik Abimanyu</dc:creator>
      <pubDate>Wed, 18 Nov 2026 05:41:04 +0000</pubDate>
      <link>https://dev.to/malikabimanyu/animated-candlestick-chart-in-react-for-a-shadcn-dashboard-p70</link>
      <guid>https://dev.to/malikabimanyu/animated-candlestick-chart-in-react-for-a-shadcn-dashboard-p70</guid>
      <description>&lt;p&gt;I needed a candlestick card for a shadcn dashboard. Here is what I ended up doing, and when a real trading library is the better call.&lt;/p&gt;

&lt;p&gt;shadcn/ui’s charts cover area, bar, line, pie, radar and radial charts, but not candlesticks. For a candlestick card in a shadcn dashboard, install a registry block: the free Ethereum Chart from mebius.design is a React + Tailwind OHLC card with volume bars, a period switch, keyboard inspection and anime.js motion, added with one shadcn CLI command. For a full trading screen, use a financial charting library instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick the right tool first
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;A dashboard card and a trading terminal need different charts.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;shadcn/ui’s &lt;a href="https://ui.shadcn.com/charts" rel="noopener noreferrer"&gt;chart components&lt;/a&gt; wrap Recharts and theme it with your CSS variables. Recharts has no candlestick series, so a candlestick there means drawing custom bar shapes for the bodies and wicks yourself. That leaves three routes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A financial charting library such as TradingView’s Lightweight Charts (Apache 2.0, canvas). It is built for trading screens: thousands of candles, panning, zooming and live updates. It is not a React component and doesn’t use your Tailwind tokens.&lt;/li&gt;
&lt;li&gt;Recharts with a custom shape: you stay in the shadcn stack and write the candle drawing, the axis and the tooltip yourself.&lt;/li&gt;
&lt;li&gt;A finished candlestick card from a shadcn registry, which drops into a dashboard grid next to your other cards. This guide uses that route.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your page is a price chart people trade from, take the library. If it is a card in a dashboard that shows how a coin, stock or fund moved this week, a card is less work and matches the rest of the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the chart with the shadcn CLI
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;React 19, Tailwind CSS v4 and shadcn CLI 4 or later.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.mebius.design/freebies/charts/ethereum?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Ethereum Chart&lt;/a&gt; is one of the 20 items of the mebius.design open starter pack: its code is MIT and installs straight from its URL, with no account or token. The command also brings the charts theme it needs, which only adds tokens scoped to the chart cards (they carry a data-charts attribute), so it doesn’t change your app’s colours.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Terminal&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx shadcn@latest add https://www.mebius.design/r/charts-ethereum.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The other free charts install the same way through the @mebius registry, with a free account and a personal access token from &lt;a href="https://www.mebius.design/settings/tokens?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Settings › Tokens&lt;/a&gt; (&lt;a href="https://www.mebius.design/guides/install-shadcn-components-cli-mcp?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;the install guide&lt;/a&gt; has the setup).&lt;/p&gt;

&lt;p&gt;The CLI writes &lt;code&gt;components/ethereum-chart.tsx&lt;/code&gt;, the card parts it uses and anime.js. Render it with its sample week to check the setup:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app/page.tsx&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;EthereumChart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@/components/ethereum-chart"&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nc"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;EthereumChart&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"max-w-[600px]"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Feed it your own candles
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;One period per segment of the Week / Month / Year switch.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A candle is &lt;code&gt;{ time, open, high, low, close, volume }&lt;/code&gt; with the time in milliseconds, oldest first. Each period gives the switch a segment and tells the x axis whether to name days, weeks or months. The example loads three periods from your own endpoint and hides the NAV and market price figures, which only make sense for a fund:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;components/eth-price-card.tsx&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="s2"&gt;"use client"&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"react"&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;EthereumChart&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;EthereumCandle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;EthereumPeriod&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@/components/ethereum-chart"&lt;/span&gt;

&lt;span class="c1"&gt;// Your API answers with rows of [time in ms, open, high, low, close, volume], oldest first.&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;Row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;toCandles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;EthereumCandle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;high&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;low&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;volume&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;high&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;low&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;volume&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;interval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1d"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s2"&gt;"1w"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`/api/candles?symbol=ETH&amp;amp;interval=${interval}&amp;amp;limit=${limit}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`Candles failed: ${response.status}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;toCandles&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;Row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nc"&gt;EthPriceCard&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;periods&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setPeriods&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;EthereumPeriod&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;cancelled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"1d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"1d"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"1w"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;week&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cancelled&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;
      &lt;span class="nf"&gt;setPeriods&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"week"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"W"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Week"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;candles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;week&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"day"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"month"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"M"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Month"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;candles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"week"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"year"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Year"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;candles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"month"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;cancelled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;periods&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;div&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"h-[562px] max-w-[600px] rounded-2xl bg-neutral-100"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;EthereumChart&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"max-w-[600px]"&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Ethereum"&lt;/span&gt; &lt;span class="kt"&gt;symbol&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ETH"&lt;/span&gt; &lt;span class="n"&gt;periods&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;periods&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The price in the header is the last close and the badge is the change from the first open, so both follow your data. Prices, axis labels and times are formatted with &lt;code&gt;locale&lt;/code&gt; and &lt;code&gt;currency&lt;/code&gt; (en-US and USD by default); &lt;code&gt;formatTime&lt;/code&gt; replaces the axis and tooltip times, which are in UTC by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put it in a dashboard grid
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;The card is as wide as its container; the height follows its content.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every chart card from the same registry shares the theme, so a candlestick card sits next to a holdings card without extra styling. Here with the &lt;a href="https://www.mebius.design/freebies/charts/your-asset?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Your Asset Chart&lt;/a&gt; (install it the same way, &lt;code&gt;@mebius/charts-your-asset&lt;/code&gt;):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app/dashboard/page.tsx&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;EthereumChart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@/components/ethereum-chart"&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;YourAssetChart&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"@/components/your-asset-chart"&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nc"&gt;DashboardPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt; &lt;span class="n"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"grid gap-4 p-6 xl:grid-cols-[minmax(0,600px)_minmax(0,1fr)]"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;EthereumChart&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;YourAssetChart&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Narrow screens.&lt;/strong&gt; On a narrow card the period switch wraps under the price and the figures stack in one column, so the same card works in a phone layout.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Motion and accessibility
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The plot is one slider: arrow keys move between candles, Page Up and Page Down jump a tenth of them, Home and End go to the first and last, Escape hides the tooltip. Screen readers hear the candle’s time and prices.&lt;/li&gt;
&lt;li&gt;Candles grow out of their opens one after another, and a new period morphs the old candles into the new ones. With prefers-reduced-motion set to reduce nothing animates.&lt;/li&gt;
&lt;li&gt;The server render is the final state, so the card shows real numbers before JavaScript runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Related
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/freebies/charts/ethereum?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Ethereum Chart&lt;/a&gt;: The candlestick card from this guide, with its live demo and Figma file.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/freebies/charts/your-asset?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Your Asset Chart&lt;/a&gt;: Holdings by coin with a live price ticker and the latest deposits.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/freebies/charts/price-range?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Price Range Chart&lt;/a&gt;: A liquidity pool’s price history with a draggable price range.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/guides/crypto-dashboard-react?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Crypto dashboard guide&lt;/a&gt;: The other cards a crypto dashboard needs, and a full kit for it.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://www.mebius.design/guides/react-candlestick-chart?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-react-candlestick-chart&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;mebius.design&lt;/a&gt;, where the code samples stay up to date.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>shadcn</category>
      <category>tailwindcss</category>
      <category>dataviz</category>
    </item>
    <item>
      <title>shadcn MCP: install UI components from Claude Code and Cursor</title>
      <dc:creator>Malik Abimanyu</dc:creator>
      <pubDate>Wed, 18 Nov 2026 05:39:44 +0000</pubDate>
      <link>https://dev.to/malikabimanyu/shadcn-mcp-install-ui-components-from-claude-code-and-cursor-2pfn</link>
      <guid>https://dev.to/malikabimanyu/shadcn-mcp-install-ui-components-from-claude-code-and-cursor-2pfn</guid>
      <description>&lt;p&gt;The shadcn CLI has an MCP server built in, so Claude Code, Cursor and VS Code can browse and install registry components for you. Here is the setup for each editor, how to add a private registry, and the errors you will hit and what they mean.&lt;/p&gt;

&lt;p&gt;shadcn’s MCP server is built into the shadcn CLI. Run npx shadcn@latest mcp init --client claude, or --client cursor, and your AI editor can browse, search and install items from every registry in components.json. mebius.design adds a hosted MCP server that returns each item’s full source and usage docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the shadcn MCP server?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Checked in shadcn’s docs and source on 17 Nov 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The shadcn MCP server is part of the shadcn CLI, the MIT-licensed &lt;code&gt;shadcn&lt;/code&gt; package on npm (4.23.0 when we checked). Your editor starts it on your own machine with &lt;code&gt;npx shadcn@latest mcp&lt;/code&gt;, and the AI can then browse, search and install items from any registry in your &lt;code&gt;components.json&lt;/code&gt;: shadcn/ui’s own (no setup needed), third-party registries, private ones behind a token, and namespaced ones such as &lt;a class="mentioned-user" href="https://dev.to/acme"&gt;@acme&lt;/a&gt;. See &lt;a href="https://ui.shadcn.com/docs/mcp" rel="noopener noreferrer"&gt;shadcn’s MCP docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Under the hood it has seven tools (&lt;a href="https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/src/mcp/index.ts" rel="noopener noreferrer"&gt;source&lt;/a&gt;): list the registries in components.json; list, search and view registry items with their files; find usage examples; return the &lt;code&gt;shadcn add&lt;/code&gt; command for chosen items; and a checklist to run after new code is written. The server doesn’t write files itself. The assistant runs the add command it gets back, so every install still goes through the CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you set up shadcn MCP?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;One command per editor, then a restart.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Run init in your project with the name of your editor. It adds the shadcn server to that editor’s MCP config:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Terminal&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx shadcn@latest mcp init --client claude
&lt;span class="c"&gt;# or --client cursor, vscode, codex or opencode&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart the editor afterwards. In Claude Code, run &lt;code&gt;/mcp&lt;/code&gt; and check that shadcn shows as connected; in Cursor, turn the server on in Cursor Settings; in VS Code, open &lt;code&gt;.vscode/mcp.json&lt;/code&gt; and click Start. Codex is the exception: the CLI can’t edit &lt;code&gt;~/.codex/config.toml&lt;/code&gt;, so you add the server there by hand. Written by hand for Claude Code, the server is this file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.mcp.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"shadcn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"shadcn@latest"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cursor takes the same block in &lt;code&gt;.cursor/mcp.json&lt;/code&gt;; VS Code puts it under &lt;code&gt;"servers"&lt;/code&gt; in &lt;code&gt;.vscode/mcp.json&lt;/code&gt;. If the editor lists no tools, shadcn’s troubleshooting notes suggest clearing the npx cache (&lt;code&gt;npx clear-npx-cache&lt;/code&gt;) and switching the server off and on again.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you add a private registry?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Once per project. The example is the @mebius registry.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A private registry is a namespace in components.json: a URL template the CLI fills with the item name and, when the registry needs one, a header that reads a token from your environment (&lt;a href="https://ui.shadcn.com/docs/registry/authentication" rel="noopener noreferrer"&gt;shadcn’s authentication docs&lt;/a&gt;). The CLI and its MCP server both read it. For mebius.design, create a token in &lt;a href="https://www.mebius.design/settings/tokens?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Settings › Tokens&lt;/a&gt; (a free account works) and add:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;components.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"registries"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"@mebius"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.mebius.design/r/{name}.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Bearer ${MEBIUS_TOKEN}"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;.env.local&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;MEBIUS_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mbs_your_token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Keep the token out of git.&lt;/strong&gt; The CLI reads .env.local and .env. Check that .env.local is in your .gitignore, and revoke a token in Settings › Tokens if it leaks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each mebius kit has a theme item. Add it on its own first, then items with &lt;code&gt;--overwrite&lt;/code&gt; so shared parts take the kit’s version. Item names start with their kit:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Terminal&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx shadcn@latest add @mebius/charts-theme
npx shadcn@latest add @mebius/charts-revenue-growth --overwrite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No token yet? The 20 open starter items install from their URL with no account, like the &lt;a href="https://www.mebius.design/freebies/charts/revenue-overview?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Revenue Overview chart&lt;/a&gt;: &lt;code&gt;npx shadcn@latest add https://www.mebius.design/r/charts-revenue-overview.json&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which shadcn CLI commands matter?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;What the MCP server asks for, and what you can run yourself.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When an agent gets stuck, the same work runs in a terminal. From &lt;a href="https://ui.shadcn.com/docs/cli" rel="noopener noreferrer"&gt;shadcn’s CLI docs&lt;/a&gt;, the commands that matter for registries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;init&lt;/code&gt;: creates components.json, adds the cn helper and sets up CSS variables. Once per project.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;add&lt;/code&gt;: installs items by name, @namespace/name or URL. &lt;code&gt;--overwrite&lt;/code&gt; replaces files that already exist, &lt;code&gt;--dry-run&lt;/code&gt; previews the changes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;view&lt;/code&gt;: prints an item’s files before you install it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;search&lt;/code&gt; (alias &lt;code&gt;list&lt;/code&gt;): searches one or more registries, with &lt;code&gt;-q&lt;/code&gt; for a query.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;info&lt;/code&gt;: shows your project’s setup as the CLI sees it, handy when an install lands in the wrong folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With the @mebius registry set up, you can find, read and install a chart without leaving the terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Terminal&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx shadcn@latest search @mebius -q &lt;span class="s2"&gt;"candlestick"&lt;/span&gt;
npx shadcn@latest view @mebius/charts-ethereum
npx shadcn@latest add @mebius/charts-ethereum --overwrite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What does the mebius MCP server add?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;A hosted server with browser sign-in and usage docs per item.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;mebius.design runs its own MCP server at &lt;code&gt;https://www.mebius.design/api/mcp&lt;/code&gt;. Nothing runs on your machine and it doesn’t need a components.json: it reads the kits your account has and returns each item’s source files with their target paths, its npm and registry dependencies, and the usage docs written for that component or block (props, examples, notes). As of 17 Nov 2026, a free account gets all 62 &lt;a href="https://www.mebius.design/freebies/charts?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;free charts&lt;/a&gt; and 128 &lt;a href="https://www.mebius.design/freebies/forms?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;free forms&lt;/a&gt;; buying a kit adds that kit, and All items adds every kit.&lt;/p&gt;

&lt;p&gt;In Claude Code, add it with one command, with no token to copy:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Terminal&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add --transport http mebius https://www.mebius.design/api/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run &lt;code&gt;/mcp&lt;/code&gt;, pick mebius, choose Authenticate, log in to mebius.design in the browser and click Approve. Cursor and VS Code ask you to log in the first time they connect:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.cursor/mcp.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"mebius"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.mebius.design/api/mcp"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;VS Code takes the same URL under &lt;code&gt;"servers"&lt;/code&gt; with &lt;code&gt;"type": "http"&lt;/code&gt;. Tools that can’t open a browser, like CI or a remote machine, send a token from &lt;a href="https://www.mebius.design/settings/tokens?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Settings › Tokens&lt;/a&gt; as the header &lt;code&gt;Authorization: Bearer &amp;lt;your token&amp;gt;&lt;/code&gt;. The server has five read-only tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;list_kits&lt;/code&gt;: the kits your account has, the free ones included, with item counts and categories, and the paid kits it doesn’t own yet.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;list_items&lt;/code&gt; and &lt;code&gt;search_items&lt;/code&gt;: find a component or block by kit, type, category or plain words.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_item&lt;/code&gt;: one item in full, with every file, its dependencies and its usage docs.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_install_instructions&lt;/code&gt;: the components.json entry, the token line and the exact add commands, theme first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Which MCP server should you use?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Both, for different jobs.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;shadcn MCP: local, free and MIT, and it works with every registry in components.json, shadcn/ui’s own included. Best for browsing many registries and installing through the CLI.&lt;/li&gt;
&lt;li&gt;mebius MCP: hosted, signs in through the browser and covers mebius kits only. Best when the agent should read an item’s usage docs before it adapts a block, or write the files by hand in a project without components.json.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They don’t clash. With the @mebius registry in components.json, shadcn’s server lists mebius items too, and a prompt like “add the mebius candlestick chart to the dashboard” ends the same way with either one: the theme, then &lt;code&gt;npx shadcn@latest add @mebius/charts-ethereum --overwrite&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Other marketplaces run their own servers too: the &lt;a href="https://ui8.net/mcp" rel="noopener noreferrer"&gt;UI8 MCP&lt;/a&gt; at &lt;code&gt;https://mcp.ui8.net/mcp&lt;/code&gt; is included with UI8’s All Access pass (checked on ui8.net on 17 Nov 2026). How the two marketplaces compare overall is in &lt;a href="https://www.mebius.design/compare/ui8?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;mebius vs UI8&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What if the CLI or MCP says no?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;The mebius registry answers with a message the CLI prints.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No mebius token was sent: MEBIUS_TOKEN isn’t set where the CLI runs, or the registry URL redirects. Use the exact &lt;a href="https://www" rel="noopener noreferrer"&gt;https://www&lt;/a&gt; URL above.&lt;/li&gt;
&lt;li&gt;The token is invalid or has been revoked: create a new one and replace the line in .env.local.&lt;/li&gt;
&lt;li&gt;Your account doesn’t own this kit: the item belongs to a paid kit. Buy it for $19, or &lt;a href="https://www.mebius.design/pricing?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;All items&lt;/a&gt; for $259, and run the command again.&lt;/li&gt;
&lt;li&gt;No item with that name: item names start with their kit, like @mebius/charts-ethereum. &lt;code&gt;npx shadcn@latest search @mebius&lt;/code&gt; lists the ones your token can install.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The free items are the quickest test of the whole setup: &lt;a href="https://www.mebius.design/signup?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;create a free account&lt;/a&gt; and every chart and form is yours to install, by command or by prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is the shadcn MCP server free?
&lt;/h3&gt;

&lt;p&gt;Yes. It is part of the shadcn CLI, which is MIT licensed and free. It runs on your machine through npx, so it needs no account or key, apart from any tokens your private registries ask for.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does the shadcn MCP server work with private registries?
&lt;/h3&gt;

&lt;p&gt;Yes. Add the registry to components.json under a namespace, with an Authorization header that reads a token from an environment variable, and put the token in .env.local. The CLI and the MCP server both read it.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between the shadcn CLI and shadcn MCP?
&lt;/h3&gt;

&lt;p&gt;The CLI is the command-line tool that sets up a project and adds, views and searches registry items. The MCP server lets an AI editor do the same by prompt: it looks items up in your registries and hands the assistant the add command to run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need a token for the mebius MCP server?
&lt;/h3&gt;

&lt;p&gt;No. Claude Code, Cursor and VS Code sign in through the browser: add the server, log in to mebius.design and click Approve. A personal access token from &lt;a href="https://www.mebius.design/settings/tokens?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Settings › Tokens&lt;/a&gt; is the fallback for tools that can’t open a browser, and the shadcn CLI needs one for the @mebius registry.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can an AI editor install mebius components without an account?
&lt;/h3&gt;

&lt;p&gt;Only the 20 open starter items, which install from their URL with the plain shadcn CLI. The MCP server needs a sign-in, and a free account covers all 62 charts and 128 forms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/freebies/charts?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Free charts&lt;/a&gt;: 62 animated chart cards to install with the commands above.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/freebies/forms?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Free forms&lt;/a&gt;: 128 animated forms in light and dark.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/guides/is-shadcn-free-commercial-use?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Is shadcn/ui free?&lt;/a&gt;: The MIT license, and what free and paid shadcn kits allow.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mebius.design/guides/figma-to-react-shadcn-registry?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;Figma to React&lt;/a&gt;: How the registry behind these commands is made from Figma.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;First published on &lt;a href="https://www.mebius.design/guides/install-shadcn-components-cli-mcp?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=guide-install-shadcn-components-cli-mcp&amp;amp;utm_content=crosspost" rel="noopener noreferrer"&gt;mebius.design&lt;/a&gt;, where the code samples stay up to date.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>shadcn</category>
      <category>mcp</category>
      <category>react</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
