Property listing list — Listings block
Freelistings-property-listing-list · for catalog, home, landing pages
Property listing list
One dense row per property, facts on a line, the energy scale and the price on the right: comparing many properties
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-listing-listUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ListingsPropertyListingList from '@/components/trame/blocks/listings/listings-property-listing-list.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"
}
]
}
</script>
<template>
<ListingsPropertyListingList v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title | string | Wordsa title for the list ("Our properties in Lyon") |
| properties* | Property[] | Datathe properties of this page of the search, in the order the agency chose |
| open | string | Actionthe page action a property opens; it receives the property |
| sorts | Sort[] | the orders the list can be sorted in |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Property properties[] · 14 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe property’s id in the tool that answers it |
| title* | string | Wordsthe ad’s title, as the agency wrote it |
| kind | string | Wordswhat it is ("Flat", "Home"): also the filter chips |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
| price* | number | the asking price in cents, or the rent per month in cents |
| surface* | number | living area in m² |
| rooms* | number | number of main rooms |
| bedrooms | number | number of bedrooms |
| city* | string | Wordsthe town the property is in |
| district | string | Wordsthe 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 |
| tags | string[] | Wordsa short feature ("Balcony", "Parking") |
| badge | string | Wordsa tag the agency set ("New", "Under offer") |
Sort sorts[] · 2 props
| Prop | Type | Description |
|---|---|---|
| key* | 'recent' | 'price-asc' | 'price-desc' | 'surface-desc' | how the list is ordered: as given, cheapest first, dearest first, largest first |
| label* | string | Wordsthe sort’s name ("Price, low to high") |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| rent | boolean | the prices are rents per month |
| emptyText | string | Wordswhat the list says when there is no property |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
open - Reads
propertiesfrom 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 map split: a compact list beside the host’s map slot: searching by place, when the map is part of the choice.
- 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.