Docs page three column — Help block

Pro

help-docs-page-three-column · for docs pages

Docs page three column

Navigation, readable documentation and a separate on-page index for long reference pages.

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-docs-page-three-column

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import HelpDocsPageThreeColumn from '@/components/trame/blocks/help/help-docs-page-three-column.vue'

const props = {
title: "Organizing the workshop’s documents",
nav: [
{
id: "start",
label: "Getting your bearings",
link: {
label: "Open",
action: "docs"
}
},
{
id: "folders",
label: "Shared folders",
current: true,
depth: 1,
link: {
label: "Open",
action: "docs"
}
}
],
body: [
{
heading: "Start with a folder",
paragraphs: [
"Group together the documents that belong to the same project. Pick a name the whole team can understand."
],
callout: "A private folder is visible only to the people who have access."
},
{
heading: "Naming files",
paragraphs: [
"Prefer descriptive names. Search finds words in both the name and the description."
],
code: "workshop/\n materials-project/\n production-notes.txt"
}
]
}
</script>

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

Props

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

PropTypeDescription
nav*Nav[]Datathe documentation’s pages, as a tree
title*stringWordsthe section’s heading
body*Body[]the page’s sections, in order
prevNextPrevNextthe links to the previous and next pages
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Nav nav[] · 5 props
PropTypeDescription
id*stringDatathe navigation’s id
label*stringWordsthe navigation’s name, as shown
depthnumberhow deep it sits in the tree, 0 for the top
currentbooleantrue: the page shown now
link*Linkthe link: its words and the page action it runs
Link nav[].link · 3 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
Body body[] · 4 props
PropTypeDescription
heading*stringWordsthe section’s heading
paragraphs*string[]Wordsthe section’s paragraphs
codestringWordsa code sample for the section
calloutstringWordsa note set apart under the section
PrevNext prevNext · 2 props
PropTypeDescription
previousPreviousthe previous action: its words and the page action it runs
nextNextthe next action: its words and the page action it runs
Previous prevNext.previous · 3 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
Next prevNext.next · 3 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
Options options · 1 props
PropTypeDescription
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
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
  • No motion; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: nav[].link, prevNext.previous, prevNext.next
  • Reads docs from your app

A help section, for docs pages.

More help blocks

  • Glossary cards: each term in its own card, filed by letter: a lexicon the visitor browses rather than reads.
  • Glossary columns: the index on top and the terms flowing in columns: a compact lexicon for a shorter list.
  • Glossary index: a long glossary read like a dictionary: the A–Z index stays beside the terms, letter by letter.
  • 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..

All 22 help blocks