Skip to content
DomainKit
Esc
navigateopen⌘Jpreview
On this page

Records

Render product-owned DNS requirements as a readable table with observation evidence or as a copyable and downloadable zone file.

The records namespace presents product-owned DNS requirements and optional observation evidence. It does not read DNS or decide whether the product is ready.

import { Records } from "@domainkit/react";

export function DnsRecords() {
  return (
    <>
      <Records.ZoneFile domain="mail.example.com" records={records} />
      <Records.Table evidence={evidence} records={records} />
    </>
  );
}

Installation

Install the packaged React components:

npm install @domainkit/react domainkit effect @effect/atom-react react react-dom
pnpm add @domainkit/react domainkit effect @effect/atom-react react react-dom
yarn add @domainkit/react domainkit effect @effect/atom-react react react-dom
bun add @domainkit/react domainkit effect @effect/atom-react react react-dom

For model-free, copied presentation components, install the matching registry items:

npx shadcn@latest add https://domain-kit.dev/r/dns-table.json https://domain-kit.dev/r/copy-value.json https://domain-kit.dev/r/dns-status.json
pnpm dlx shadcn@latest add https://domain-kit.dev/r/dns-table.json https://domain-kit.dev/r/copy-value.json https://domain-kit.dev/r/dns-status.json
yarn dlx shadcn@latest add https://domain-kit.dev/r/dns-table.json https://domain-kit.dev/r/copy-value.json https://domain-kit.dev/r/dns-status.json
bunx shadcn@latest add https://domain-kit.dev/r/dns-table.json https://domain-kit.dev/r/copy-value.json https://domain-kit.dev/r/dns-status.json

The registry components accept plain props and do not include DomainKit transport, planning, or observation models.

Table

Records.Table renders type, name, value, priority, and—when supplied—matching evidence. Evidence is grouped by recordId; provider and public-DNS observations can therefore be shown without collapsing them into one readiness boolean.

<Records.Table records={records} evidence={observation.publicDns} />

Zone file

Records.ZoneFile serializes the same records for clipboard and download actions. Browser-only clipboard and download behavior runs from user interaction, so the component can still render on the server.

<Records.ZoneFile domain={domain} records={records} />

Accessibility

Copy and download controls have action-specific accessible labels. Preserve those labels when supplying custom icons. Keep the table header cells and visible status text when composing lower level record parts.

API reference

Records.Table

PropType
copiedIcon?ReactNode

Optional icon shown after a value has been copied.

TypeReactNode
copyIcon?ReactNode

Optional icon shown for a copy action.

TypeReactNode
evidence?ReadonlyArray<Transport.ObservationEvidence>

Optional provider or public-DNS evidence grouped by record ID.

TypeReadonlyArray<Transport.ObservationEvidence>
recordsReadonlyArray<Transport.DnsRecord>

DNS records to render as table rows.

TypeReadonlyArray<Transport.DnsRecord>

Records.ZoneFile

PropType
copiedIcon?ReactNode

Optional icon shown after the zone file has been copied.

TypeReactNode
copiedLabel?string

Accessible label shown after copying the zone file.

Typestring
Default"Copied"
copyIcon?ReactNode

Optional icon shown for the copy action.

TypeReactNode
copyLabel?string

Visible and accessible label for copying the zone file.

Typestring
Default"Copy zone"
domainstring

Domain used to name the downloaded zone file.

Typestring
downloadIcon?ReactNode

Optional icon shown for the download action.

TypeReactNode
downloadLabel?string

Visible and accessible label for downloading the zone file.

Typestring
Default"Download"
recordsReadonlyArray<Transport.DnsRecord>

DNS records serialized into the zone file.

TypeReadonlyArray<Transport.DnsRecord>

Records.CopyValue

PropType
copiedIcon?ReactNode

Optional icon shown after the value has been copied.

TypeReactNode
copiedLabel?string

Accessible action label shown after copying.

Typestring
Default"Copied"
copyIcon?ReactNode

Optional icon shown for the copy action.

TypeReactNode
copyLabel?string

Accessible action label shown before copying.

Typestring
Default"Copy"
valuestring

Text displayed and copied after the user activates the action.

Typestring

Read Observe DNS for the difference between provider readback and public DNS propagation.

Was this page helpful?