Skip to content
Calm motion: animations on this site only fade, with no movement

Pictogram ​

A count as rows of icons, where one icon stands for a fixed number

Shows counts in a way that a general audience reads at once, for example people in each city. One icon stands for the same number in every row. For exact comparison, use the lollipop.

Basic

One icon = 1,000 listeners

  • Jakarta8,400
  • Bandung5,100
  • Surabaya3,700
  • Yogyakarta2,900
  • Medan1,250
  • data is a list of items, each with a label, a value, and an optional color.
  • unit is the number that one icon stands for. noun names what you count, for the line at the top, such as "One icon = 1,000 listeners".
  • The last icon of a row shows the rest. For example, 0.4 of an icon is 40% in color.
  • The default icon is a person. Put your own SVG in the icon slot to change it.
  • Set the size of an icon with the --bless-picto-size CSS variable (default 18px), and the width of the names with --bless-picto-label (default 7rem).
  • The icons are hidden from screen readers, and each row says its name and its value. label names the chart. Change the line at the top with labels or a label pack: key (a function of the unit and the noun).

Usage ​

ts
import { BlessPictogram } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
data*BlessPictogramItem[]—
unit*number—what one icon stands for
nounstring""the name of what you count, for example "listeners"
format((v: number) => string)—
labelstring"Chart"names the chart for screen readers
labelsPartial<{ key: (unit: string, noun: string) => string; }>—

Slots

NameScopeDescription
icon—

Released under the MIT License. Character names and artwork belong to their owners.