API keys webhooks — Settings block
Prosettings-api-keys-webhooks · for app, settings pages
API keys webhooks
Endpoint cards with event subscriptions and delivery status for the merchant’s own webhooks 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/settings-api-keys-webhooksUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import SettingsApiKeysWebhooks from '@/components/trame/blocks/settings/settings-api-keys-webhooks.vue'
const props = {
title: "Prooflane API access",
description: "Keys for your CI and the events Prooflane sends when a review or a preview finishes.",
keys: [
{
id: "k1",
name: "CI runner",
prefix: "pfl_live_8f2",
scopes: [
"reviews:write",
"previews:deploy"
],
created: "October 2, 2026",
lastUsed: "Today, 9:42 a.m.",
revoke: "revoke-key"
},
{
id: "k2",
name: "Release dashboard",
prefix: "pfl_live_4c7",
scopes: [
"runs:read"
],
created: "September 28, 2026",
lastUsed: "Yesterday, 6:00 p.m.",
revoke: "revoke-key"
}
],
webhooks: [
{
id: "w1",
name: "Review finished",
endpoint: "https://ci.example/hooks/prooflane-reviews",
events: [
"review.completed",
"review.blocked"
],
status: "Active",
tone: "success",
manage: "manage-webhook"
},
{
id: "w2",
name: "Preview deployed",
endpoint: "https://chat.example/hooks/previews",
events: [
"preview.ready"
],
status: "Needs checking",
tone: "warning",
manage: "manage-webhook"
}
],
create: {
label: "Create an API key",
action: "create-connection"
},
options: {
footnote: "Give each key only the scopes its job needs. Keys never appear again after creation."
}
}
</script>
<template>
<SettingsApiKeysWebhooks 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 |
| description | string | Wordsa few words saying more, under the heading |
| keys* | Key[] | Datathe API keys |
| webhooks | Webhook[] | Datathe webhooks |
| create | Create | the create action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Key keys[] · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe key’s id |
| name* | string | Wordsthe key’s name |
| prefix* | string | DataDisplay prefix only, never a full secret; at most 12 characters |
| scopes* | string[] | Wordswhat the key may do |
| created* | string | Wordswhen it was created, as the host writes it |
| lastUsed | string | Wordswhen it was last used, as the host writes it |
| revoke | string | Actiona named action of the page |
Webhook webhooks[] · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe key’s id |
| name* | string | Wordsthe webhook’s name |
| endpoint* | string | DataPublic endpoint without credentials or tokens |
| events* | string[] | Wordsthe webhook’s events, in order |
| status* | string | Wordsthe webhook’s status, in the host’s words |
| tone | 'neutral' | 'success' | 'warning' | 'danger' | the status colour |
| manage | string | Actiona named action of the page |
Create create · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| footnote | string | Wordsa small line at the foot of the section |
| 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:
keys[].revoke,webhooks[].manage,create - Reads
apiKeys,webhooksfrom your app
A settings section, for app, settings pages; it uses @lucide/vue.
More settings blocks
- Appearance preview beside: The brand colour is the point: the controls in a column beside a live drawing of the app (sidebar, header, a button, a badge) coloured by the chosen colour, with its contrast checked.
- Appearance rows: Appearance among other settings pages: one quiet row per setting, its label and explanation on the left and its control on the right.
- Appearance theme cards: The app offers preset themes: large mode cards (System, Light, Dark) each drawing the app, theme cards with their colours, then the brand colour and the logo below.
- Danger zone card rows: At the foot of a settings page: one bordered danger card, a row per action with one sentence and an outlined destructive button that opens its confirmation in place.
- Danger zone explained: A page given to one grave step ("Delete workspace"): each action its own section, the consequences listed beside the typed name, the "I understand" box and the button, all on the page.
- Display preferences panel: display preferences (text size, contrast, reduced motion) saved in the visitor’s browser.
- Domain setup compact: A domain already set up among other settings: one line with its name, status and "Verify", the records folded under a disclosure, open while the domain is not verified.
- 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.