Community channels — Contact block
Procontact-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-channelsUsage
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.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| channels | Channel[] | where the community meets, each with a link |
| rules | Rule[] | the community’s rules, each a title and a text |
| stats | Stat[] | Datathe stats shown, in order |
| people | People[] | Datamembers of the community to show |
| quote | Quote | Dataa member’s own words |
| cta | Cta | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Channel channels[] · 3 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe channel’s title |
| text* | string | Wordsthe channel’s text |
| link | Link | the link: its words and the page action it runs |
Link channels[].link · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
Rule rules[] · 2 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe rule’s title |
| text* | string | Wordsthe rule’s text |
Stat stats[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the figure is |
| value* | number | the figure |
People people[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe person’s name |
| role | string | Wordstheir role or job title |
| company | string | Wordswhere they work |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| url | string | Designa page about them |
Quote quote · 4 props
| Prop | Type | Description |
|---|---|---|
| text* | string | Wordsthe testimonial, in the customer’s own words |
| author* | Author | who said it |
| rating | number | the stars they gave, 1 to 5 |
| source | string | Wordswhere it was collected, e.g. "Google reviews" |
Author quote.author · 6 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe person’s name |
| role | string | Wordstheir role or job title |
| company | string | Wordswhere they work |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| url | string | Designa page about them |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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 |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| 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
- 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.