Skip to content
Calm motion: animations on this site only fade, with no movement

Email composer ​

To, Cc, and subject fields with recipient chips, and the message

Writes a new email or a reply. To show an email that came in, use the email view.

Basic

Press Enter or a comma after each address.

  • v-model is the draft: to and cc as lists of addresses, subject, and body.
  • The To and Cc fields are tag inputs. Press Enter or a comma after each address. "Add Cc" shows the Cc field. A draft that comes with Cc addresses, for example a reply to all, shows it too.
  • If an address does not look like [email protected], an error lists it and the field is marked as not valid. If the To field is empty, Send shows an error. Screen readers hear each error at once.
  • A good draft emits send with the draft. "Discard" emits discard.
  • The check of the addresses looks only at their shape. Your mail server must check them again.
  • Change the words with labels or a label pack: title, to, cc, addCc, subject, body, send, discard, hint, noRecipient, and bad (a function).

Usage ​

ts
import { BlessEmailComposer } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
labelsPartial<{ title: string; to: string; cc: string; addCc: string; subject: string; body: string; send: string; discard: string; hint: string; noRecipient: string; bad: (addresses: string) => string; }>—
modelValueBlessEmailDraft{ to: [], cc: [], subject: "", body: "" }

Events

NamePayloadDescription
update:modelValue[value: BlessEmailDraft]
send[draft: BlessEmailDraft]
discard[]

Released under the MIT License. Character names and artwork belong to their owners.