uibrik

Morph Chart

Preview

Customize

Bar
Data points7
USD
Duration0.40s
Accent

Usage

import { MorphChart } from "@/components/uibrik/morph-chart/MorphChart";

<MorphChart />

Installation

npx shadcn@latest add https://uibrik.com/r/morph-chart.json
Adds the files to components/uibrik/morph-chart and installs @number-flow/react, @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/morph-chart.

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.