HomeLabHire Me
ml-ui111 components

Get started

IntroductionInstallation

UI

Dots

Dot AccordionDot CalendarDot CheckboxDot CodeDot CommandDot ContentsDot CountdownDot CrossingDot FuseDot GaugeDot InstallDot KnobDot LogosDot MenuDot PaginationDot PasswordDot Price RangeDot PricingDot ProgressDot QueueDot RatingDot Reading ProgressDot SelectDot SignupDot SliderDot StatusDot StepperDot SwitchDot TabsDot ToastDot TooltipFlip-Dot CounterLED Marquee

Dither

Dither AvatarDither BannerDither CompareDither GlobeDither PortraitDither SkeletonDither TrailDither UploadDot CookiesDot DialogDot KeysDot ReceiptDot VariantsLenticular Card

More

Pollen TrailSplit-FlapTheme Toggle

Text

Dither RotatorDot TypeEnigma TextInk Print

Data viz

Dots

Contribution FieldDot BarsDot ChartDot Waffle

Dither

Dither DensityDither MapDither Stack

Media

Dots

Dot EqualizerDot WaveformVoice Note

Dither

Dither Scrubber

AI

Agent StepsAnswer VersionsCitation ChipConfidence GlassContext MeterDiffusion ImageDiffusion TextDither MaskDoc ReaderDot DictationGenerate ButtonGhost TextModel PickerPrompt BarResponse ActionsRevising TextSpoken ReplyThinking OrbThinking TraceToken MeterToken StreamWord Alternatives

Useful

Arrival TimeBest ShotCareer LineForgiving SearchGesture PadHeard AsHonest PinImage PaletteLikeness GridNear Miss SearchRain DropsSoft CorrectSpending SortSticker LiftTaste Ledger

Backgrounds

ButterfliesDandelionsDuck PondFirefliesKoi PondLight WellMarigoldsTrain WindowWhite Blossom

ml-ui / Useful

Honest Pin

A location pin that never pretends: a frosted blur as wide as the real accuracy, fading as the fix ages. Its label names less the less it knows.

Needs: Location fixes with an accuracy radius (the browser's Geolocation API, or your backend's). No model. The preview replays a recorded morning.

Customize

Props

PropTypeDefaultDescription
fix{ lat: number; lng: number; accuracy: number; at: number; source: "gps" | "wifi" | "cell" } | nullrequiredThe latest fix as the phone reported it, accuracy in metres and at in ms (or smoothed with Smoother from the fix algorithms). Null before the first one hides the pin.
namestringrequiredWho this is: used in the label, the initial, the actions and what screen readers hear.
project(p: { lat: number; lng: number }) => [number, number]requiredYour map's projection, from lat/lng to px inside the component's box. Keep it stable between renders: a new function re-aims the pin.
places{ name: string; lat: number; lng: number; radius?: number; area?: string }[]"[]"Saved places. The label names one only when the fix can actually tell them apart; area names the neighbourhood around it.
regionstring–What to call the whole area when even the neighbourhood is a guess, e.g. "Bengaluru".
nownumber–The clock in ms. Defaults to the real one, ticking every ten seconds; pass it to replay a recorded day.
onAsk() => void–Ask their phone for a fresh fix. Adds the action; the ask settles when a fix with a new time arrives, and says so if none does in 20 s.
onCall() => void–Adds a Call action, made the primary one when the pin can't settle where they are.
accentstring"#2f6fd6"Colour of the fix. Age fades it toward the surface; it never changes hue.
classNamestring""Extra class on the root.
styleCSSProperties–Inline style on the root.
← Heard AsImage Palette →