Locate button

A “use my location” row: its arrow rocks like a balance while your app looks, swings down and turns into a pin once found.

Install

Terminal
npx airflib@latest add locate-button

Usage

TSX
import { LocateButton } from "@/components/airflib/components/locate-button";

<LocateButton
  tone="light"
  icon="outline"
  radius={12}
/>

API

Its main settings, read from the code: each prop's type and default. The prompt lists every prop.

NameTypeDefaultDescription
tone"light" | "dark""light"Light or dark paint. It does not follow the page theme.
icon"outline" | "filled""outline"The arrow and the pin in outline, or solid.
radiusnumber12pxCorner radius of the icon's tile, in pixels. From 0 to 22px.

Sound

The sounds in the catalog are the site's. The block comes silent, with a place for your own.

Used in