HBarChart

Ranked horizontal bars that grow from the left in a wave. Charts.

Open playground
  • Design86%
  • Motion72%
  • Frontend64%
  • Research41%

About

HBarChart is a React component in the Charts category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { HBarChart } from "@ashutoshswamy/smoui" and set data, prefix.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { HBarChart } from "@ashutoshswamy/smoui";

<HBarChart data={[{ label: "Design", value: 86 }, { label: "Motion", value: 72 }]} suffix="%" />

Props 2

data

Rows.

{ label: string; value: number }[]
prefix / suffix

Wrap values, or pass `format`.

string