Black Friday: 30% off Pro

Get 30% off

Updated

Morph Chart

Pro

Preview

Customize

Bar
Data points7
USD
Duration0.40s
Accent

Installation

Pro

Morph Chart is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/morph-chart

Usage

import { MorphChart } from "@/components/uibrik/morph-chart/MorphChart";​const data = [  { label: "Jan", name: "January", value: 4200 },  { label: "Feb", name: "February", value: 6800 },  // …5 more];​<MorphChart  defaultView="bar"  caption="Total revenue"  currency="USD"  duration={0.4}  accent=""  data={data}/>

Where to use Morph Chart

  • Switchable chart types

    One dataset morphing between bar, line and donut lets users choose the view that suits them.

    Pairs with Table Chart

  • Reports

    Comparing parts and trends of the same data without separate charts keeps reports short.

  • Data storytelling

    Morphing between forms shows the same numbers from several angles on a landing page.

Props

MorphChart
defaultView
Type "bar" | "line" | "pie"
"bar"
View shown first.
caption
Type string
"Total revenue"
Readout label when nothing is hovered.
currency
Type "USD" | "EUR" | "GBP" | "INR" | ""
"USD"
Currency for the values, or none for plain numbers.
duration
Type number
0.4
Length of the shortest morph.
accent
Type string
""
Bar, line and slice colour. Empty uses the chart palette.
data
Type ChartDatum[]
SAMPLE_CHART_DATA
Points: label, optional full name, value.
className
Type string
–
Classes for the card.