A compact location card that sits quiet until you touch it. Hover to tilt it toward the cursor, then click to expand a stylized street map with a dropped pin and coordinates.
The location map is a compact card that sits quiet until you touch it. Hover to tilt it toward the cursor, then click to expand a stylized street map with a dropped pin and the coordinates line. It reads as a single card in both states: the label, icon, and underline stay put while the map and pin animate in.
Use it wherever a place needs a small, tactile presence: an office location, an event venue, a shipping origin, or a live-status readout. The collapsed tile stays scannable; the expanded view carries the map and coordinates.
Import the pattern from loosethreads:
import { LocationMap } from "@pulp/loosethreads/patterns"Pass the place name and its coordinates as strings. Both are optional and fall back to a Brooklyn sample, so an empty <LocationMap /> still renders:
import { LocationMap } from "@pulp/loosethreads/patterns"
function Office() {
return (
<LocationMap
location="Brooklyn, NY"
coordinates="40.6782 N, 73.9442 W"
/>
)
}| Prop | Type | Default | Description |
|---|---|---|---|
location | string | "Brooklyn, NY" | Place name shown on the card in both states and read out in the accessible label (e.g. Brooklyn, NY). |
coordinates | string | "40.6782 N, 73.9442 W" | Coordinate string revealed under the location name when the card is expanded (e.g. 40.6782 N, 73.9442 W). |
className | string | undefined | Optional class applied to the outer wrapper for layout overrides. |
The collapsed card holds a layered-map icon, a Live pill with an iris dot, the location name, and a gradient underline. Moving the cursor tilts the card in 3D. Clicking expands it to reveal a stylized Brooklyn street grid drawn in SVG, a center pin with an iris glow, and the coordinates line fading in below the name.
The map geometry is fixed. The street grid renders a stylized Brooklyn regardless of the location and coordinates text, which are labels, not a live map lookup.
role="button" with tabIndex=0, aria-pressed tracking the expanded state, and an aria-label that names the location and the next action.prefers-reduced-motion and stays still for users who opt out. The remaining reveals are user-triggered and run under five seconds, so no further gating is required.Next: Leaderboard. Back to Data & visualization.