Glossary index — Help block
Prohelp-glossary-index · for article, home, landing pages
Glossary index
A long glossary read like a dictionary: the A–Z index stays beside the terms, letter by letter
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-glossary-indexUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HelpGlossaryIndex from '@/components/trame/blocks/help/help-glossary-index.vue'
const props = {
title: "A short glossary of leather",
lead: "The words we use in the workshop, simply explained, so you can read a product page with ease.",
terms: [
{
term: "Split leather",
definition: "The lower layer of a hide, once the grain has been removed. More fragile, it is mostly used for linings.",
related: [
"Grain",
"Full grain"
]
},
{
term: "Grain",
definition: "The outer face of the hide, the one that carries its natural texture. It is the strongest part.",
related: [
"Full grain"
]
}
],
options: {
eyebrow: "Glossary"
}
}
</script>
<template>
<HelpGlossaryIndex v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe glossary’s title ("A short glossary of leather") |
| lead | string | Wordswhat the glossary covers and for whom |
| terms* | Term[] | the terms and their definitions |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Term terms[] · 3 props
| Prop | Type | Description |
|---|---|---|
| term* | string | Wordsthe term |
| definition* | string | Wordsthe definition, in a few lines |
| related | string[] | Wordsanother term of this glossary, written exactly as its own entry |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsthe section ("Glossary") |
| 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 |
| 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
A help section, for article, home, landing pages; it uses clsx, motion, tailwind-merge.
More help blocks
- Docs page three column: Navigation, readable documentation and a separate on-page index for long reference pages.
- Docs page two column: Navigation beside a wider reading column for concise documentation.
- Guided library hero pills: a hero picture with the title and the topic pills, then a shelf per topic: a shop with many guides to sort.
- Panel checklist: A completion summary and task list based only on the merchant's own recorded task states..
- 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 download cards: a few resources worth showing with their cover: two to eight cards, each with its button; the merchant’s own only.