Knit UI
GitHub

Playground

Loading playground…

Playground
<ViewAnnotation
  lngLat={AMSTERDAM}
>
  <Card title="Amsterdam" />
</ViewAnnotation>

Examples

Single

Custom React content anchored at a single coordinate.

Loading example…

SingleSourceStorybook

Multiple

Several annotations at once, one per landmark city.

Loading example…

MultipleSourceStorybook

Title And Snippet

Using title / snippet metadata alongside the rendered content.

Loading example…

Title And SnippetSourceStorybook

Props

PropTypeDefaultDescription
children requiredReactElement<unknown, string | JSXElementConstructor<any>> | [ReactElement<unknown, string | JSXElementConstructor<any>>, ReactElement<unknown, string | JSXElementConstructor<any>>]——
lngLat required[longitude: number, latitude: number]——
anchorAnchor | undefined——
draggableboolean | undefined——
idstring | undefined——
offsetPixelPoint | undefined——
onDeselect((event: ViewAnnotationEvent) => void) | undefined——
onDrag((event: ViewAnnotationEvent) => void) | undefined——
onDragEnd((event: ViewAnnotationEvent) => void) | undefined——
onDragStart((event: ViewAnnotationEvent) => void) | undefined——
onPress((event: ViewAnnotationEvent) => void) | undefined——
onSelect((event: ViewAnnotationEvent) => void) | undefined——
selectedboolean | undefined——
snippetstring | undefined——
styleunknown——
testIDstring | undefined——
titlestring | undefined——
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<ViewAnnotationRef> | undefined

Edit this page on GitHub