Domain flow
Mount the complete connection, provisioning, verification, cleanup, and disconnect journey for one customer domain.
Domain.Flow is the highest-level React integration. It combines the same controllers and semantic
parts exposed by the focused namespaces.
import { Domain } from "@domainkit/react";
export function DomainSetup() {
return (
<Domain.Flow
domain="mail.example.com"
receiptId="receipt-1"
records={records}
/>
);
}Installation
npm install @domainkit/react domainkit effect @effect/atom-react react react-dompnpm add @domainkit/react domainkit effect @effect/atom-react react react-domyarn add @domainkit/react domainkit effect @effect/atom-react react react-dombun add @domainkit/react domainkit effect @effect/atom-react react react-domUsage
Place the flow inside DomainKit.Root and pass the DNS requirements produced by your product. The
optional receiptId restores cleanup eligibility after the host reloads its durable state.
<DomainKit.Root transport={transportLayer}>
<Domain.Flow domain={domain} records={records} receiptId={receiptId} />
</DomainKit.Root>
The flow does not decide identity, tenancy, consent, audit policy, or product readiness. It renders the DomainKit lifecycle returned by the host transport and emits lifecycle events after completed user-triggered mutations.
When to use it
Use Domain.Flow when the packaged card and action order fit your product. Choose
Host lifecycle when your application must control surrounding layout,
action placement, or readiness rules.
Accessibility
The complete flow includes tables, dialogs, status text, and action labels. Keep the default semantics when styling parts, and ensure host-provided messages remain specific about the provider, record action, and failure outcome.
API reference
Domain.Flow
domainstring
Customer domain whose complete setup lifecycle is rendered.
stringreceiptId?string
Previously persisted apply receipt that enables receipt-bound cleanup.
stringrecordsReadonlyArray<Transport.DnsRecord>
Product-owned DNS requirements to plan, display, verify, and clean up.
ReadonlyArray<Transport.DnsRecord>DomainKit.Root
childrenReactNode
DomainKit components rendered inside the configured runtime boundary.
ReactNodecolorScheme?"dark" | "inherit" | "light"
Color scheme applied to DomainKit-owned surfaces.
"dark" | "inherit" | "light""inherit"icons?Partial<Icons>
Optional replacements for the package's default action icons.
Partial<Icons>marks?Provider.Marks
Provider artwork overrides keyed by provider ID.
Provider.Marks{}messages?Partial<Catalog>
Optional message overrides for labels, status text, and dialogs.
Partial<Catalog>navigate?(url: string) => void
Navigation function used after an OAuth authorization URL is returned.
(url: string) => voidbrowser navigationonEvent?Lifecycle.Listener
Optional listener for completed user-triggered lifecycle events.
Lifecycle.ListenerportalContainer?HTMLElement | null
DOM container used for dialogs and popovers.
HTMLElement | nullnulltheme?Theme
Optional token theme applied to DomainKit-owned surfaces.
ThemetransportLayer.Layer<Transport.Service>
Host-owned transport implementation for connection and DNS lifecycle calls.
Layer.Layer<Transport.Service>See Choose an integration level before replacing complete flows with lower-level parts.