Published answers open — FAQ block

Pro

faq-published-answers-open · for home, product, landing, catalog, checkout pages

Published answers open

4 to 8 short answers, nothing folded: every word visible and indexable at once.

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/faq-published-answers-open

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import FaqPublishedAnswersOpen from '@/components/trame/blocks/faq/faq-published-answers-open.vue'

const props = {
eyebrow: "Frequently asked questions",
title: "Before you order",
lead: "Answers to the questions we hear most often.",
items: [
{
question: "How long does delivery take?",
verdict: "2 to 4 days",
topic: "Shipping",
answer: "Orders placed before 2 p.m. ship the same day. Allow two to four business days within the contiguous US.\n\nYou’ll get an email with tracking as soon as it ships."
},
{
question: "Can I return an item?",
verdict: "30 days",
topic: "Returns",
answer: "Yes, you have 30 days after delivery to send back an unused item in its original packaging. Returns are free through a pickup point."
}
]
}
</script>

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

Props

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

PropTypeDescription
eyebrowstringWordswhat this is ("Frequently asked questions")
title*stringWordsthe section’s title ("Before you order")
leadstringWordsone sentence under the title
items*Item[]the items shown, in order
helpHelpa help card for questions left unanswered, with a way to reach the team
notestringWordsa small line under the list ("Last checked in March"), as the merchant wrote it
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Item items[] · 4 props
PropTypeDescription
question*stringWordsthe question, as a customer would ask it
answer*stringWordsthe answer, in plain sentences; a blank line starts a new paragraph
verdictstringWordsthe answer in a word or a figure ("Yes", "Free", "60 days"), for answer-first
topicstringWordsthe theme the question belongs to ("Delivery"), for grouped
Help help · 4 props
PropTypeDescription
title*stringWordswhat the card offers ("A question left unanswered?")
textstringWordshow to reach the merchant, in a sentence
hoursstringWordswhen someone answers, as the merchant wrote it
actionActionthe help box’s call to action: its words and the page action
Action help.action · 3 props
PropTypeDescription
label*stringWordswhat happens ("Write to the team")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, 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
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: help.action

A faq section, for home, product, landing, catalog, checkout 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 faq blocks

  • Hub topic tiles: a grid of topic tiles with their question count, leading to the answers or to their own pages: 6 topics or more.
  • Illustrated answers numbered: the few things to know, told in order with a large index, no accordion: an editorial tone.
  • Illustrated answers verdicts: a policy FAQ where each answer is a word or a figure ("Yes", "60 days") set before the question.
  • Open numbered: every answer visible as a numbered list in two columns: five to eight short answers to read without clicking.
  • Question table: ruled rows of question, one-line answer (the verdict) and topic tag, each opening on the full answer: many short answers scanned like a table.
  • Questions answers accordion: Native disclosures, initially open, for longer answers; the merchant’s own only.
  • Questions answers list: Open customer questions with the verified origin of each answer; the merchant’s own only.
  • Topic answers pills: one long page grouped by topic, pills only filtering it: nothing to navigate, everything readable.

All 20 faq blocks