Assets tiles — Press block
Propress-assets-tiles · for about, press, landing pages
Assets tiles
The files as cards with thumbnails, grouped by kind, under a short text: a brand whose logos and photos are the point; 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/press-assets-tilesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import PressAssetsTiles from '@/components/trame/blocks/press/press-assets-tiles.vue'
const props = {
title: "Press room",
intro: "Texts and files you are free to use when writing about the brand, as long as you credit it by name.",
boilerplate: [
"Maison Atelier makes bags and jackets built to last, in a Portland workshop. Every piece is sewn, checked and shipped by the same team.",
"Materials are chosen for how well they hold up over time, and every piece can be repaired at the workshop."
],
assets: [
{
name: "Logo, light version",
kind: "logo",
format: "SVG",
size: "14 KB",
file: "/press/logo-clair.svg"
},
{
name: "Logo, dark version",
kind: "logo",
format: "SVG",
size: "14 KB",
file: "/press/logo-sombre.svg"
}
],
terms: "Logos must not be altered. Photos are royalty-free for an article about the brand, credited “Maison Atelier.”",
contact: {
name: "Claire Dumont",
role: "Press relations",
email: "[email protected]",
phone: "(503) 555-0120",
hours: "Replies within 24 hours on business days"
},
action: {
label: "Download the full press kit",
action: "page",
record: {
id: "presse"
}
}
}
</script>
<template>
<PressAssetsTiles 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 ("Press room") |
| intro | string | Wordsone sentence on who it is for and how to use the files |
| boilerplate* | string[] | Wordsthe brand’s presentation in a few paragraphs, as the merchant wrote it for the press: never written by the agent |
| assets* | Asset[] | the press files to download |
| terms | string | Wordsthe conditions of use of the files, as the merchant wrote them |
| contact | Contact | who journalists write to |
| action | Action | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Asset assets[] · 7 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordswhat the file is ("Logo, light version", "Workshop photos", "Fact sheet") |
| kind | 'logo' | 'photo' | 'document' | 'other' | logo, photo, document or other: groups the files |
| format* | string | Wordsthe file format as written ("SVG", "ZIP of 12 JPGs", "PDF") |
| size | string | Wordsthe file size, as the merchant measured it ("1.2 MB") |
| file* | string | Picturethe file’s address, a root-relative path or an absolute URL |
| preview | string | Picturea thumbnail of the file, if it has one |
| alt | string | Wordswhat the thumbnail shows |
Contact contact · 5 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe person or desk to write to |
| role | string | Wordstheir role, e.g. "Press officer" |
| email* | string | Wordsthe address as written |
| phone | string | Wordsa phone number |
| hours | string | Wordswhen they answer, as the merchant wrote it |
Action action · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Download the whole folder") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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 |
| 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:
action
A press section, for about, press, landing pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More press blocks
- Awards badge row: a row of badges with their year and issuer under them: a few prizes or labels seen at a glance.
- Awards criteria: certifications shown with their public criteria and whether the merchant holds them: labels that need proof.
- Awards focus list: the titles in large type, one active at a time with its year and issuer beside it: a studio or maker whose four to eight distinctions carry the page (the merchant’s own only).
- Awards ledger: a ruled table of index, title, issuer and year, the citation opening under its row: five to twelve distinctions listed like a résumé, with or without badges (the merchant’s own only).
- Awards spotlight: one award told large, its badge at the left, its citation and facts at the right: a single strong distinction.
- Awards timeline: the years in a column and the awards as lines per year: a history of recognition, up to a dozen.
- Kit columns: a fact sheet: key facts in a column, the presentation beside them, the files and the contact below on a tint: a young brand with few files; the merchant’s own only.
- Kit dossier: the brand’s text on one side and its files as a list of rows with format and size on the other: the usual press page; the merchant’s own only.