Dropoff points list — Locations block
Freelocations-dropoff-points-list · for account, returns pages
Dropoff points list
A postcode field above the nearby points, each with its kind, address and hours: returns that go through a counter
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-dropoff-points-listUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import LocationsDropoffPointsList from '@/components/trame/blocks/locations/locations-dropoff-points-list.vue'
const props = {
title: "Where would you like to drop off your package?",
postcodeAction: "dropoffSearch",
lead: "Enter your ZIP code to see the nearest locations.",
points: [
{
id: 1,
name: "Market Corner Store",
kind: "Pickup point",
address: "12 Market Street, Portland, OR 97204",
distance: "0.2 mi",
hours: "Mon–Sat 7 a.m.–7:30 p.m., Sun 8 a.m.–1 p.m."
},
{
id: 2,
name: "Atelier Rivage",
kind: "Store",
address: "4 Fishery Wharf, Portland, OR 97204",
distance: "0.6 mi",
hours: "Tue–Sat 10 a.m.–6:30 p.m."
}
],
submit: {
label: "Choose this location",
action: "dropoffPoint"
},
options: {
footnote: "Keep your drop-off receipt until you’re refunded."
}
}
</script>
<template>
<LocationsDropoffPointsList v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe question ("Where to drop off your parcel?") |
| lead | string | Wordsone sentence on how to find a point |
| points* | Point[] | Datadrop-off points near the postcode searched; empty before a search |
| postcodeAction* | string | Actionwhere the postcode is sent (a GET): the page lists the points |
| submit | Submit | the submit action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Point points[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the point’s id |
| name* | string | Wordsthe point’s name |
| kind | string | Wordswhat it is ("Pickup point", "Store") |
| address* | string | Wordsthe point’s address, in one line |
| distance | string | Wordsas the tool measured it ("350 m") |
| hours | string | Wordsopening hours as the point gives them |
Submit submit · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"Choose this point" |
| action* | string | Actionwhere choosing a point leads, with the point |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| footnote | string | Wordsa last line: a condition, a contact |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a 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).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your 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:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
postcodeAction,submit - Reads
pointsfrom your app
A locations section, for account, returns pages; it uses @lucide/vue, @vueuse/core, 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
- 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.
- 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.