@d3-maps/react
v0.4.0
Published
React bindings for @d3-maps/core to build reactive D3 SVG maps
Downloads
299
Readme
@d3-maps/react
Reactive SVG maps, powered by D3.
docs
Migrate from react-simple-maps
Installation
Requires React 19+
Next.js App Router: @d3-maps/react entrypoints are client-only ('use client'), so import them from Client Components
React Server Components entrypoints are planned
npm
npm install @d3-maps/reactpnpm
pnpm add @d3-maps/reactbun
bun add @d3-maps/reactUsage
import { MapBase, MapFeatures } from '@d3-maps/react'
export function App({ mapData }: { mapData: unknown }) {
return (
<MapBase data={mapData}>
<MapFeatures />
</MapBase>
)
}Styling
Importing @d3-maps/react automatically includes @d3-maps/core/index.css
If you need strict stylesheet ordering, load your global reset/theme styles before importing the adapter entry
License
MIT licensed. Copyright © 2020 Georgii Bukharov. See LICENSE for more details.
