Knit UI
GitHub

Playground

Loading playground…

Playground
<Marker
  lngLat={AMSTERDAM}
>
  <Pin />
</Marker>

Examples

Single

A single custom HTML pin anchored at a coordinate.

Loading example…

SingleSourceStorybook

Many Cities

Many markers mapped from EUROPEAN_CITIES, one styled pin per city.

Loading example…

Many CitiesSourceStorybook

Selectable

A marker whose onPress toggles its own selected state (and color).

Loading example…

SelectableSourceStorybook

Anchor And Offset

The same coordinate with different anchor / offset values to show alignment.

Loading example…

Anchor And OffsetSourceStorybook

Props

PropTypeDefaultDescription
children requiredReactElement<unknown, string | JSXElementConstructor<any>>
lngLat required[longitude: number, latitude: number]
anchorAnchor | undefined
idstring | undefined
offsetPixelPoint | undefined
onPress((event: MarkerEvent) => void) | undefined
selectedboolean | undefined
styleunknown
testIDstring | undefined