Choropleth
ProA map shaded by value per region.
pnpm dlx shadcn@latest add @caliper/choropleth- 1Kansas80
- 2Hawaii79
- 3Alabama75
| Region | Value |
|---|---|
| Kansas | 80 |
| Hawaii | 79 |
| Alabama | 75 |
| Ohio | 74 |
| West Virginia | 73 |
| New York | 71 |
| Wyoming | 71 |
| Colorado | 70 |
| New Hampshire | 68 |
| Minnesota | 68 |
| Washington DC | 68 |
| Washington | 65 |
| Arkansas | 65 |
| Florida | 63 |
| Georgia | 60 |
| Pennsylvania | 59 |
| Virginia | 58 |
| Oklahoma | 57 |
| Rhode Island | 56 |
| South Dakota | 56 |
| Nebraska | 55 |
| Illinois | 53 |
| Maine | 50 |
| Idaho | 50 |
| Tennessee | 50 |
| Arizona | 47 |
| New Jersey | 44 |
| Maryland | 43 |
| Louisiana | 42 |
| Massachusetts | 41 |
| Iowa | 41 |
| Missouri | 40 |
| Wisconsin | 38 |
| Oregon | 38 |
| California | 37 |
| Montana | 35 |
| North Carolina | 35 |
| Texas | 34 |
| New Mexico | 32 |
| Connecticut | 29 |
| Delaware | 28 |
| Mississippi | 27 |
| Indiana | 26 |
| Kentucky | 25 |
| Michigan | 23 |
| Nevada | 23 |
| Utah | 22 |
| Vermont | 20 |
| North Dakota | 20 |
| South Carolina | 20 |
| Alaska | 18 |
When to use #
Use it for
- Comparing regions.
Skip it when
- Exact values matter more than pattern.
Installation #
pnpm dlx shadcn@latest add @caliper/choropleth
Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage #
Import it from your copy of the source. The example behind the preview comes with the source.
import { Choropleth } from "@/components/ui/choropleth"
The worked example comes with Pro
The 22-line example behind the preview opens here with a Pro or Team licence.
API reference #
Choropleth
component
Accessibility #
It exposes group, img and status semantics, with aria-label kept in step with state. Changes that matter are announced through a live region.
Motion #
Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.