Integration settings keys webhooks — Settings block
Prosettings-integration-settings-keys-webhooks · for app, settings, developers pages
Integration settings keys webhooks
What developers manage: masked API keys to rotate or revoke and the webhook endpoints
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/settings-integration-settings-keys-webhooksUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import SettingsIntegrationSettingsKeysWebhooks from '@/components/trame/blocks/settings/settings-integration-settings-keys-webhooks.vue'
const props = {
title: "Integrations",
subtitle: "The services connected to the workshop and their status at the last check.",
keys: [
{
id: 1,
name: "Production key",
masked: "rb_live_••••••••••••4f2a",
created: "on March 3, 2026",
lastUsed: "2 min ago"
},
{
id: 2,
name: "Test key",
masked: "rb_test_••••••••••••91bc",
created: "on March 3, 2026",
lastUsed: "never"
}
],
webhooks: [
{
id: 1,
url: "https://atelier-lumiere.example/hooks/commandes-livraison-et-retours/notifications",
events: [
"order.paid",
"order.shipped"
],
lastDelivery: "4 min ago",
state: "success",
stateLabel: "Active"
},
{
id: 2,
url: "https://compta.example/webhook",
events: [
"invoice.created"
],
lastDelivery: "failed 2 h ago",
state: "danger",
stateLabel: "Repeated failures"
}
],
actions: {
rotate: "rotate",
revoke: "revoke"
},
options: {
note: "A revoked key stops working immediately. Keys are shown only once, when they are created."
}
}
</script>
<template>
<SettingsIntegrationSettingsKeysWebhooks v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe page’s heading ("Integrations") |
| subtitle | string | Wordsone line under the title |
| keys* | Key[] | Datathe API keys, already masked |
| webhooks* | Webhook[] | Datathe webhook endpoints |
| actions | Actions | the page actions the block runs, each described below |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Key keys[] · 5 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the key’s id |
| name* | string | Wordswhat the key is for ("Production key") |
| masked* | string | Wordsthe key, masked by the server ("rb_live_••••••••4f2a") |
| created | string | Wordswhen it was made, as written |
| lastUsed | string | Wordswhen it was last used, as written |
Webhook webhooks[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the key’s id |
| url* | string | Wordsthe endpoint |
| events* | string[] | Wordsthe events sent there |
| lastDelivery | string | Wordsthe last delivery, as written |
| state | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | the status colour |
| stateLabel | string | Wordsthe state in words ("Active", "Repeated failures") |
Actions actions · 2 props
| Prop | Type | Description |
|---|---|---|
| rotate | string | Actiona named action of the page |
| revoke | string | Actiona named action of the page |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| note | string | Wordsa line stating the rule or the security advice, as configured |
| empty | string | Wordswhat an empty list says |
| 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 |
| 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
actions.rotate,actions.revoke - Reads
apiKeys,webhooksfrom your app
A settings section, for app, settings, developers pages; it uses @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 settings blocks
- Domain setup steps: Right after the person adds a domain, or someone who has never edited DNS: a numbered guide, first the records to add one by one, then the check.
- Domain setup table: A domain’s settings page: the domain and its status in a header with "Verify", then every record as a row of a table (type, name, value to copy, status), turned into cards on a phone.
- Integration catalogue: services that can be connected, in a grid, each with a connect or disconnect button.
- Integration requests request board: let people ask for a tool and vote on what to connect next.
- Integration status list: connected services with the state their last check found, a degraded one explained.
- Integration switch list: a short list of connected apps turned on and off inside a settings page: one row each with a switch, the state named only when it is not operational.
- Integration table: a developer or admin view auditing 6 to 20 services at once: one table with state, last event, figure and actions per service, an incident spanning its row.
- Key list register: A key register with display prefixes, scopes and usage dates for the merchant’s own keys only.