Knit UI
GitHub

Playground

Loading playground…

Playground
<UserLocation />

Examples

Default

The default user-location indicator. On web, look for the geolocate button in the top-right corner of the map — clicking it requests browser geolocation permission. Nothing appears until permission is granted.

Loading example…

DefaultSourceStorybook

Heading And Accuracy

With heading, accuracy, and animated enabled the indicator shows a heading cone and an accuracy ring, and updates smoothly. As with the default, web users must grant geolocation permission via the top-right control before anything shows.

Loading example…

Heading And AccuracySourceStorybook

Props

PropTypeDefaultDescription
accuracyboolean | undefined
animatedboolean | undefined
childrenReactNode
headingboolean | undefined
minDisplacementnumber | undefined
onPress(() => void) | undefined
testIDstring | undefined