Skip to content

Recharts wrappers (container, tooltip, legend) themed with the skeuomorph colour scales: Mac OS X table chrome with hairline gridlines and a pale yellow help-tag tooltip.

Installation

Requires the theme. Register the @skeuomorph namespace and add @skeuomorph/skeuomorph first, as shown in the installation guide. The CLI also pulls it in as a dependency.

pnpm dlx shadcn@latest add @skeuomorph/chart

Without the namespace, install straight from the URL:

pnpm dlx shadcn@latest add https://ui-skeuomorph.vercel.app/r/chart.json

Usage

Charts are built with Recharts. You compose regular Recharts components and bring in ChartContainer, ChartTooltip and ChartLegend where you need the skeuomorph styling. Colors come from the --chart-1 to --chart-5 theme tokens.

import { Bar, BarChart } from "recharts"
 
import {
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
  type ChartConfig,
} from "@/components/ui/chart"
 
const chartConfig = {
  desktop: { label: "Desktop", color: "var(--chart-1)" },
} satisfies ChartConfig
 
export function MyChart({ data }: { data: { month: string; desktop: number }[] }) {
  return (
    <ChartContainer config={chartConfig} className="min-h-[200px] w-full">
      <BarChart data={data}>
        <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
        <ChartTooltip content={<ChartTooltipContent />} />
      </BarChart>
    </ChartContainer>
  )
}

Examples

With Grid

With Axis

With Tooltip

With Legend

Tooltip Styles