Map list static split — Locations block
Prolocations-map-list-static-split · for app, locations pages
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.
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-map-list-static-splitUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import LocationsMapListStaticSplit from '@/components/trame/blocks/locations/locations-map-list-static-split.vue'
const props = {
title: "The workshop’s spaces",
intro: "Find each space and how to book it.",
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: "Makers’ Courtyard",
location: "8 Weavers Lane",
status: "Booking open",
price: 6000,
priceSuffix: "per half day",
pin: {
number: 2,
x: 68,
y: 46
}
}
],
mapImage: {
src: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22720%22%20height%3D%22540%22%20viewBox%3D%220%200%20720%20540%22%3E%3Ctitle%3EFictional%20schematic%20map%3C%2Ftitle%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-opacity%3D%22.15%22%20stroke-width%3D%2224%22%20d%3D%22M0%20260H720M310%200V540M0%2090L720%20450%22%2F%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-opacity%3D%22.2%22%20stroke-width%3D%222%22%20d%3D%22M70%2060H220V185H70ZM380%2060H650V185H380ZM70%20335H220V475H70ZM380%20335H650V475H380Z%22%2F%3E%3C%2Fsvg%3E",
alt: "Fictional schematic map of the three spaces, numbered as in the list.",
attribution: "Demo illustration — fictional places and positions, not geographically accurate."
},
open: "place"
}
</script>
<template>
<LocationsMapListStaticSplit 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 |
| mapImage | MapImage | a static map the host provides |
| 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 |
MapImage mapImage · 3 props
| Prop | Type | Description |
|---|---|---|
| src* | string | Picturea host-provided static map, never fetched from a map SDK |
| alt* | string | Wordsa description of the area shown |
| attribution* | string | Wordsrequired attribution supplied by the host, displayed verbatim |
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
- 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.
- 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.
- 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.
- Place services table: a table of places by service: when shops do not all offer the same things.