Panel drawer — Help block

Free

help-panel-drawer · for app, account pages

Panel drawer

A right-aligned contextual help panel with search and contact, using the merchant's own help articles..

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-panel-drawer

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import HelpPanelDrawer from '@/components/trame/blocks/help/help-panel-drawer.vue'

const props = {
title: "A hand with your workspace",
items: [
{
id: "profil",
label: "Set up your profile",
text: "Fill in the details your team needs.",
done: true,
keys: [
"G",
"P"
],
group: "Navigation",
link: {
label: "Open",
action: "profile"
}
},
{
id: "documents",
label: "Find your documents",
text: "Sort your files into a shared folder.",
done: false,
keys: [
"G",
"D"
],
group: "Navigation",
link: {
label: "Open",
action: "files"
}
}
],
contact: {
label: "Send message",
action: "support"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
items*Item[]Datathe items shown, in order
contactContactthe contact action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Item items[] · 9 props
PropTypeDescription
id*stringDatathe item’s id
label*stringWordsthe item’s name, as shown
textstringWordsthe item’s text
donebooleantrue: this item is completed
keysstring[]Wordsthe keyboard keys of the shortcut, e.g. "Ctrl", "K"
groupstringWordsthe heading it is grouped under
statusstringWordsthe item’s status, in the host’s words
datestringWordsthe date, as the merchant writes it
linkLinkthe link: its words and the page action it runs
Link items[].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
Contact contact · 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: items[].link, contact
  • Reads rows from your app

A help section, for app, account pages; it uses @lucide/vue, @vueuse/core, 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

  • Docs page two column: Navigation beside a wider reading column for concise documentation.
  • 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.
  • Resource download cards: a few resources worth showing with their cover: two to eight cards, each with its button; the merchant’s own only.
  • Resource download file list: several documents to fetch (catalogue, notices, price lists): a tidy row each, size and format visible; the merchant’s own only.
  • Resource download single: one file, one button: a CV, a catalogue, with its format and date; the merchant’s own only.

All 22 help blocks