Community channels — Contact block

Pro

contact-community-channels · for community, about pages

Community channels

Channel cards with a clear destination, using the merchant's own community 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/contact-community-channels

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import ContactCommunityChannels from '@/components/trame/blocks/contact/contact-community-channels.vue'

const props = {
title: "A place to share techniques",
channels: [
{
title: "The shared notebook",
text: "Questions, experiments and feedback on the craft.",
link: {
label: "Open the notebook",
action: "forum"
}
},
{
title: "Meetups",
text: "A conversation about objects and how they are made.",
link: {
label: "See the meetups",
action: "events"
}
}
],
rules: [
{
title: "Describe before judging",
text: "Share what you observe and leave room for questions."
},
{
title: "Credit people",
text: "Make visible the contribution of those who helped you."
}
],
cta: {
label: "Join the conversation",
action: "community"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
channelsChannel[]where the community meets, each with a link
rulesRule[]the community’s rules, each a title and a text
statsStat[]Datathe stats shown, in order
peoplePeople[]Datamembers of the community to show
quoteQuoteDataa member’s own words
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Channel channels[] · 3 props
PropTypeDescription
title*stringWordsthe channel’s title
text*stringWordsthe channel’s text
linkLinkthe link: its words and the page action it runs
Link channels[].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
Rule rules[] · 2 props
PropTypeDescription
title*stringWordsthe rule’s title
text*stringWordsthe rule’s text
Stat stats[] · 2 props
PropTypeDescription
label*stringWordswhat the figure is
value*numberthe figure
People people[] · 6 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
Quote quote · 4 props
PropTypeDescription
text*stringWordsthe testimonial, in the customer’s own words
author*Authorwho said it
ratingnumberthe stars they gave, 1 to 5
sourcestringWordswhere it was collected, e.g. "Google reviews"
Author quote.author · 6 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
Cta cta · 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
asseta picture’s address as your app serves it
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: channels[].link, cta

A contact section, for community, about pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More contact blocks

  • Callback request steps form: reassuring steps beside a form that asks for a call back at a slot: services and appointments.
  • Contributor call commission cards: Commission formats with explicit scope rows, using the merchant's own rates and delays only.
  • Contributor call split steps: Topics beside an ordered pitch process, with the merchant's own terms only.
  • Directory: a table of topic, who answers, address and reply time: a larger house with many inboxes, looked up rather than read.
  • Feedback form criteria rows: an overall rating on top, then a ruled list of aspects each with its own rating, one comment at the end: when the merchant wants a mark per aspect (delivery, packaging, support).
  • Feedback form panel: one card with the rating, the comment and the button: one or two questions after a visit, an order or a delivery.
  • Feedback form scale strip: the words beside wide 1-to-5 tracks that name the chosen level: a quick satisfaction pulse of one to three questions.
  • Feedback form steps: one question at a time under a progress bar, back and next at the foot: a survey of three to twelve questions.

All 25 contact blocks