Domain setup steps — Settings block
Prosettings-domain-setup-steps · for app, settings pages
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.
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-domain-setup-stepsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import SettingsDomainSetupSteps from '@/components/trame/blocks/settings/settings-domain-setup-steps.vue'
const props = {
domain: {
id: "dom_7h2k",
name: "mail.larkspur.example",
status: "pending",
message: "We have not seen these records yet. They can take a few hours to appear.",
checkedAt: "Last checked 12 minutes ago"
},
records: [
{
id: "spf",
type: "TXT",
name: "send",
value: "v=spf1 include:spf.mailpost.example ~all",
ttl: 3600,
status: "pending"
},
{
id: "dkim",
type: "TXT",
name: "mp._domainkey",
value: "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7mZk2Lw8e",
ttl: 3600,
status: "pending"
}
],
verify: {
label: "Verify DNS records",
action: "verifyDomain"
},
remove: {
label: "Remove domain",
action: "removeDomain"
},
docs: {
label: "How to add DNS records",
action: "dnsGuide"
},
title: "Sending domain",
intro: "Send email from your own address. Add these records where you bought the domain, then verify."
}
</script>
<template>
<SettingsDomainSetupSteps v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| domain* | Domain | the domain being set up and where it stands, as the host knows it |
| records* | Record[] | the DNS records to add at the registrar, in the order to add them: each value with a copy button once the page runs, selectable whole without it |
| verify | Verify | the check the person runs once the records are in; absent, the block only shows the records and their status |
| remove | Remove | a link to remove the domain, e.g. "Remove domain"; the host confirms on its own page |
| docs | Docs | a link to the host’s guide for adding records, e.g. "How to add DNS records" |
| title | string | Wordsthe block’s heading, e.g. "Sending domain"; absent, the domain’s name is the heading |
| intro | string | Wordsa sentence under the heading on what the domain is for, e.g. "Send email from your own domain." |
| options | Options | the block’s settings, read by every variant |
Domain domain · 5 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe domain’s id in the host, posted as `id` by the verify action |
| name* | string | Datathe domain itself, e.g. "mail.northwind.example" |
| status* | 'pending' | 'verified' | 'failed' | where the domain stands: "pending" records not all seen yet, "verified" ready to use, "failed" the last check found a problem |
| message | string | Wordsthe host’s own words on the domain’s state, e.g. "We could not find the DKIM record. Check its name and value." |
| checkedAt | string | Wordswhen the host last checked, in its own words, e.g. "Last checked 4 minutes ago" |
Record records[] · 8 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| type* | 'TXT' | 'CNAME' | 'A' | 'AAAA' | 'MX' | the record’s type, as the registrar names it |
| name* | string | Datathe host name to enter, as the registrar takes it, e.g. "@", "_dmarc" or "send" |
| value* | string | Datathe value to enter, whole, e.g. "v=spf1 include:mail.example ~all" or "cname.app.example" |
| priority | number | the MX priority to enter, a whole number (lower first); MX records only |
| ttl | number | the time to live to enter, in seconds; absent: the registrar’s default |
| status | 'pending' | 'verified' | 'failed' | the host’s last check of this record: "pending" not seen yet, "verified" found as expected, "failed" found but wrong; absent: not checked |
| message | string | Wordsthe host’s own words on this record’s check, e.g. "Found a different value: v=spf1 -all" |
Verify verify · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe verify button, e.g. "Verify DNS records" |
| action* | string | Actionasks the host to check the domain’s records now: posts `id`, the domain’s id; hidden when the page lacks it |
Remove remove · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| 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 |
| url | string | Designan address outside the app |
Docs docs · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| 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 |
| url | string | Designan address outside the app |
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 |
| 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:
domain.verify,remove,docs - Reads
domainsfrom your app
A settings section, for app, settings pages; it uses @lucide/vue, @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
- 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.
- 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 settings keys webhooks: what developers manage: masked API keys to rotate or revoke and the webhook endpoints.
- Integration status list: connected services with the state their last check found, a degraded one explained.