Property map split — Listings block

Pro

listings-property-map-split · for catalog, home, landing pages

Property map split

A compact list beside the host’s map slot: searching by place, when the map is part of the choice

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/listings-property-map-split

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import ListingsPropertyMapSplit from '@/components/trame/blocks/listings/listings-property-map-split.vue'

const props = {
title: "Our homes for sale around Portland",
properties: [
{
id: "b1",
title: "Bright apartment with balcony",
kind: "Apartment",
image: "https://images.unsplash.com/photo-1721932423849-e9033192b190?w=1600&q=80",
alt: "A bright living room with large windows, a gray sofa and plants",
price: 38500000,
surface: 78,
rooms: 4,
bedrooms: 3,
city: "Portland",
district: "Northwest",
energy: "C",
tags: [
"Balcony",
"Storage unit"
],
badge: "New"
},
{
id: "b2",
title: "Family house with garden and terrace",
kind: "House",
image: "https://images.unsplash.com/photo-1696846911635-83b97e53fb65?w=1600&q=80",
alt: "A house with a large garden and a covered terrace",
price: 62500000,
surface: 142,
rooms: 6,
bedrooms: 4,
city: "Lake Oswego",
district: "Forest Highlands",
energy: "B",
tags: [
"Garden",
"Garage"
]
}
],
open: "property",
sorts: [
{
key: "recent",
label: "Relevance"
},
{
key: "price-asc",
label: "Price: low to high"
}
],
options: {
mapNote: "The interactive map appears here once it is connected."
}
}
</script>

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

Props

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

PropTypeDescription
titlestringWordsa title for the list ("Our properties in Lyon")
properties*Property[]Datathe properties of this page of the search, in the order the agency chose
openstringActionthe page action a property opens; it receives the property
sortsSort[]the orders the list can be sorted in
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Property properties[] · 14 props
PropTypeDescription
id*string | numberDatathe property’s id in the tool that answers it
title*stringWordsthe ad’s title, as the agency wrote it
kindstringWordswhat it is ("Flat", "Home"): also the filter chips
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows
price*numberthe asking price in cents, or the rent per month in cents
surface*numberliving area in m²
rooms*numbernumber of main rooms
bedroomsnumbernumber of bedrooms
city*stringWordsthe town the property is in
districtstringWordsthe district or the postcode, as the agency writes it
energy'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G'the energy class (DPE), only when the diagnosis exists
tagsstring[]Wordsa short feature ("Balcony", "Parking")
badgestringWordsa tag the agency set ("New", "Under offer")
Sort sorts[] · 2 props
PropTypeDescription
key*'recent' | 'price-asc' | 'price-desc' | 'surface-desc'how the list is ordered: as given, cheapest first, dearest first, largest first
label*stringWordsthe sort’s name ("Price, low to high")
Options options · 4 props
PropTypeDescription
rentbooleanthe prices are rents per month
emptyTextstringWordswhat the list says when there is no property
mapNotestringWordsa line under the map slot’s fallback, when the host gives no map
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
moneyformats a price, given in cents
asseta picture’s address as your app serves it
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: open
  • Reads properties from your app

A listings section, for catalog, home, landing pages; it uses @lucide/vue.

More listings blocks

  • Property detail brochure: one calm column in the manner of a printed brochure, sections set against a margin of labels, the contact at the end: a high-end property told slowly.
  • Property detail gallery top: a mosaic of pictures first, then the facts and the ad, the contact beside them: a property whose photographs sell it.
  • Property detail sticky contact: one large picture with its strip, the price and the visit form that follow the visitor down the page: a visitor who reads long before asking.
  • Property listing cards: a grid of picture cards, price first: browsing a handful of properties by eye, a home page or a district page.
  • Property listing list: one dense row per property, facts on a line, the energy scale and the price on the right: comparing many properties.
  • Vehicle listing cards: a grid of photo cards with a strip of key facts under each: browsing a dealer’s stock by eye, a home page or a make page.
  • Vehicle listing compare: one dense row per vehicle with year, mileage, fuel, gearbox and power in columns: comparing many vehicles on their numbers.
  • Vehicle listing showcase: wide rows with a large photo, the price and a full fact sheet, alternating sides: a few vehicles the dealer wants to push.

All 9 listings blocks