Resource download single — Help block
Freehelp-resource-download-single · for landing, article, portfolio, product pages
Resource download single
One file, one button: a CV, a catalogue, with its format and date; 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/help-resource-download-singleUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HelpResourceDownloadSingle from '@/components/trame/blocks/help/help-resource-download-single.vue'
const props = {
title: "Our documents",
lead: "Everything you need to choose, care for and resell your pieces.",
files: [
{
name: "Fall–winter catalog",
description: "One line to say what this document is for and who it’s for.",
format: "PDF",
size: "1.0 MB",
updated: "Updated September 2026",
action: "file.download",
record: {
id: "f0"
},
cover: "https://images.unsplash.com/photo-1630734277837-ebe62757b6e0?w=1600&q=80",
alt: "The document cover"
},
{
name: "Wool care guide",
description: "One line to say what this document is for and who it’s for.",
format: "PDF",
size: "1.7 MB",
updated: "Updated September 2026",
action: "file.download",
record: {
id: "f1"
},
cover: "https://images.unsplash.com/photo-1621944192383-34519b64a747?w=1600&q=80",
alt: "The document cover"
}
]
}
</script>
<template>
<HelpResourceDownloadSingle v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat is offered ("The care guide for wool clothing") |
| lead | string | Wordsone or two sentences on what the file is for |
| files* | File[] | the files to download, each with its name and size |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
File files[] · 9 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe file’s name as the visitor sees it |
| description | string | Wordsone line on it |
| format* | string | Wordsits format ("PDF") |
| size | string | Wordsits size, as the merchant states it ("2.4 MB") |
| updated | string | Wordsits last update, as written ("Updated in September 2026") |
| cover | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the cover shows |
| action* | string | Actionthe page action that serves the file |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short line above the title |
| downloadLabel | string | Wordsthe download buttons’ words ("Download") |
| 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 |
| 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:
files[]
A help section, for landing, article, portfolio, product pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More help blocks
- Panel drawer: A right-aligned contextual help panel with search and contact, using the merchant's own help articles..
- Panel shortcuts: Grouped keyboard references for the shortcuts the host actually implements..
- Panel status board: A dated issue board showing the merchant's own known issues only..
- Resource library chips grid: Type chips sit above balanced resource cards for a mixed library of the merchant’s own content.; the merchant’s own only.
- Resource library featured first: The merchant’s first resource leads in a broad cover-and-summary panel above the remaining cards.; the merchant’s own only.
- Resource library sidebar: Type and topic filters occupy a sidebar, or a mobile drawer, for a larger merchant library.; the merchant’s own only.
- Resource library webinar rows: Ruled session rows surface the merchant’s own dates, hosts and upcoming or on-demand states only.; the merchant’s own only.
- Search hero: the help page’s opening: a large search field, suggested searches and the most read articles.