Collection points steps — Locations block

Pro

locations-collection-points-steps · for stores, contact, about pages

Collection points steps

The steps of in-store pickup, then the places where an order can be collected, with the delay each gives: a shop that offers click and collect.

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/locations-collection-points-steps

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import LocationsCollectionPointsSteps from '@/components/trame/blocks/locations/locations-collection-points-steps.vue'

const props = {
title: "In-store pickup",
lead: "Order before noon, pick up the same afternoon.",
places: [
{
id: 1,
name: "Downtown Shop",
address: "12 Weavers Street\nPortland, OR 97204",
phone: "(503) 555-0101",
hours: [
{
days: "Tuesday – Friday",
hours: "10 a.m. – 7 p.m."
},
{
days: "Saturday",
hours: "10 a.m. – 6 p.m."
}
],
services: [
{
name: "Order pickup"
},
{
name: "Repairs",
note: "on Saturdays"
}
],
note: "Ready in two hours",
status: "Open",
country: "United States",
region: "france"
},
{
id: 2,
name: "Pearl District Workshop",
address: "4 Hillside Climb\nPortland, OR 97209",
phone: "(503) 555-0102",
hours: [
{
days: "Wednesday – Saturday",
hours: "2 – 6 p.m."
}
],
services: [
{
name: "Repairs"
},
{
name: "Workshop tour",
note: "by appointment"
}
],
status: "Open",
country: "United States",
region: "france",
note: "Ready the next day"
}
],
steps: [
{
title: "Order online",
text: "Choose “In-store pickup” at checkout."
},
{
title: "Wait for the email",
text: "We let you know as soon as your order is ready."
}
],
options: {
stepsTitle: "Pickup in three steps"
}
}
</script>

<template>
<LocationsCollectionPointsSteps v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordswhat the page shows ("Our shops")
leadstringWordsone sentence on the places
places*Place[]Datathe real places, with real addresses
stepsStep[]how in-store pickup works, in order, for the pickup variant
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Place places[] · 12 props
PropTypeDescription
id*string | numberthe place’s id
name*stringWordsthe place’s name ("Lyon city-centre shop")
address*stringWordsthe full postal address, lines separated by a new line
phonestringWordsits telephone number
emailstringWordsits e-mail address
hoursHour[]its real opening hours
servicesService[]the services offered here
statusstringWordswhere it stands, as the merchant says it ("Open", "Waiting list")
datestringWordswhen, for a pop-up or an opening, as the merchant writes it ("12 – 14 November")
notestringWordsa line on the place ("Orders ready for pickup in 2 hours")
countrystringWordsthe country, for the stockist index ("France")
regionstringDesignthe region of the stockist index it belongs to, from the `regions` list
Hour places[].hours[] · 2 props
PropTypeDescription
days*stringWordsthe days ("Tuesday – Friday")
hours*stringWordsthe hours ("10 am – 7 pm")
Service places[].services[] · 2 props
PropTypeDescription
name*stringWordsa service offered here, spelled as in the `services` list
notestringWordsa precision ("on Saturdays")
Step steps[] · 2 props
PropTypeDescription
title*stringWordsa step of the pickup ("Order online")
textstringWordswhat happens, in one sentence
Cta cta · 3 props
PropTypeDescription
label*stringWordswhat happens ("Be told of the next date")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 2 props
PropTypeDescription
stepsTitlestringWordsthe heading of the pickup steps ("Pickup in three steps")
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: cta
  • Reads locations from your app

A locations section, for stores, contact, about pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More locations blocks

  • Dropoff points list: a postcode field above the nearby points, each with its kind, address and hours: returns that go through a counter.
  • Flagship store overlay: one main shop told large: its picture, with its address, hours and services on a card laid over it, the other places in a quiet row: a brand with one address that matters most.
  • Map list rail: A few places to browse: the host-provided map at full width, then a swipeable rail of numbered place cards under it.
  • Map list static split: Places beside a host-provided static map with numbered pins and attribution; positions, ratings and prices are the merchant’s own only.
  • Place cards tiles: a card per place with address, hours and services: one to six shops or offices.
  • Place directory list: Places with location lines and optional photos; positions, ratings and prices are the merchant’s own only.
  • Place directory table: Many places to compare: a table with a small pin tile, location, status and price or rating; a stacked list on a phone.
  • Place finder split: a searchable numbered list, with the merchant’s map picture beside it: a dozen places or more.

All 14 locations blocks