Mail Route List
Data · MailRouteList, RecipientInput
The aliases and forwards of a domain: each address with where it delivers to, its kind and whether it is active. "Add address" opens a small form (the local part with the domain, the targets as address chips, alias or forward); deleting asks first.
- hello@example.commara@example.com, jonah@example.com
- jobs@example.comava@example.com
- invoices@example.combookkeeping@accounts.example.org
- press@example.commara@example.com
Props
MailRouteList
| Prop | Type | Notes |
|---|---|---|
routes | MailRoute[] | Required |
domain? | string | The domain new addresses belong to ("example.com"). |
onAdd? | (route: { address: string; targets: string[]; kind: "alias" | "forward" }) => void | Shows "Add address" with a small form. |
onDelete? | (address: string) => void | Delete (after a confirmation). |
suggestions? | MailRecipient[] | Mailboxes suggested as targets. |
busy? | boolean | |
label? | string | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |
RecipientInput
| Prop | Type | Notes |
|---|---|---|
label | string | Required |
hideLabel? | boolean | |
id? | string | |
value? | MailRecipient[] | The addresses (controlled) / initially / on change. |
defaultValue? | MailRecipient[] | |
onChange? | (value: MailRecipient[]) => void | |
suggestions? | MailRecipient[] | Known addresses, filtered while typing. |
suggest? | (typed: string) => MailRecipient[] | Promise<MailRecipient[]> | Or ask your server while typing (debounced). |
validate? | (address: string) => boolean | Your own address check (default: a plain e-mail pattern). |
placeholder? | string | |
hint? | string | |
error? | string | |
disabled? | boolean | |
autoFocus? | boolean | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |