Place directory list — Locations block
Prolocations-place-directory-list · for app, locations pages
Place directory list
Places with location lines and optional photos; positions, ratings and prices are the merchant’s own only.
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-place-directory-listUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import LocationsPlaceDirectoryList from '@/components/trame/blocks/locations/locations-place-directory-list.vue'
const props = {
title: "Workshop spaces",
intro: "Find each place and its booking terms.",
places: [
{
id: "atelier",
name: "Canal Workshop",
location: "12 Willow Street",
description: "Workspace and order pickup.",
photo: {
src: "https://images.unsplash.com/photo-1445205170230-053b83016050?w=1600&q=80",
alt: "Bright interior of a retail space"
},
status: "By appointment",
price: 4500,
priceSuffix: "per half day",
rating: 4.6,
pin: {
number: 1,
x: 25,
y: 30
}
},
{
id: "cour",
name: "The Makers’ Courtyard",
location: "8 Weavers Lane",
status: "Booking open",
price: 6000,
priceSuffix: "per half day",
pin: {
number: 2,
x: 68,
y: 46
}
}
],
open: "place"
}
</script>
<template>
<LocationsPlaceDirectoryList v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| intro | string | Wordsa sentence or two under the heading |
| places* | Place[] | Dataplaces with the merchant’s own positions, prices and ratings only |
| open | string | Actionopens the place in the host |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Place places[] · 11 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe place’s id |
| name* | string | Wordsthe place’s name |
| location* | string | Wordsthe address or location line |
| description | string | Wordsthe place’s description |
| photo | Photo | a picture of the place |
| status | string | Wordsthe host’s recorded availability or status |
| rating | number | Datathe merchant’s own stored rating |
| price | number | Datathe actual price in cents |
| currency | string | DesignISO 4217 currency |
| priceSuffix | string | Wordsthe real unit or period, such as par jour |
| pin | Pin | the place’s pin on the map |
Photo places[].photo · 2 props
| Prop | Type | Description |
|---|---|---|
| src* | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt* | string | Wordswhat the picture shows |
Pin places[].pin · 3 props
| Prop | Type | Description |
|---|---|---|
| number* | number | Datathe host’s numbered map reference |
| x* | number | Datapercent from the image’s left edge |
| y* | number | Datapercent from the image’s top edge |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| empty | string | Wordswhat an empty list says |
| footnote | string | Wordsa small line at the foot of the section |
| 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 |
| money | formats a price, given in cents |
| asset | a picture’s address as your app serves it |
| 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:
open - Reads
placesfrom your app
A locations section, for app, locations pages; it uses @lucide/vue.
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 finder split: a searchable numbered list, with the merchant’s map picture beside it: a dozen places or more.
- Place services table: a table of places by service: when shops do not all offer the same things.
- Pop up stops opening: one new place announced with its address and opening days: a shop that is about to open.