Calm motion: animations on this site only fade, with no movement
Store locator
A list of stores by distance, with opening hours and directions
Helps a buyer find a store, or pick one for pickup at checkout. It draws no map, because a map needs a map service. Use the links to send the buyer to the map service of your choice.
Basic
storesis a list of stores. Each store has anid, aname, and anaddress. It can also have adistancein km,open,hoursas text, aphone, and adirectionslink.- The nearest store comes first. Stores without a distance come last. You find the distance on your server, or from the position that the Geolocation API gives.
openshows "Open now" or "Closed" in words.- The search field filters by name and address. If no store matches, a status line says so.
v-modelis the id of the chosen store. Each store is a native radio button.- The Directions and Call links have the name of the store in their accessible name, so each link is clear on its own.
localesets the format of the distance. Change the words withlabelsor a label pack:title,search,open,closed,directions,call,none, andaway(a function).
Usage
ts
import { BlessStoreLocator } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
stores* | BlessStore[] | — | |
locale | string | "en" | |
labels | Partial<{ title: string; search: string; open: string; closed: string; directions: string; call: string; none: string; away: (distance: string) => string; }> | — | |
modelValue | string | — | the id of the chosen store, for pickup |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string | undefined] |