Introducing Magic UI Pro - 50+ blocks and templates to build beautiful landing pages in minutes.

19.0k
178

Dotted Map

PreviousNext

A component with a svg dotted map.

Installation

pnpm dlx shadcn@latest add @magicui/dotted-map

Examples

Smaller Dots

Usage

import { DottedMap } from "@/components/ui/dotted-map"
<div className="relative h-[400px] w-full overflow-hidden rounded-xl border">
  <DottedMap />
</div>

Props

PropTypeDefaultDescription
widthnumber150Width of the SVG map.
heightnumber75Height of the SVG map.
mapSamplesnumber5500Number of sample points for map generation.
markersMarker[][]Array of markers to display on the map.
dotColorstringundefinedColor of the map dots (uses currentColor if not set).
markerColorstring"#FF6900"Color of the markers.
dotRadiusnumber0.22Radius of the map dots.
classNamestringundefinedAdditional class names applied to the SVG.
styleReact.CSSPropertiesundefinedInline styles merged into the SVG.