Form
Embeddable forms that collect user input and send it via email.
For isolated previews, theme switching, and sandbox editing, open the Form playground on holydocs.com .
When to use
Use this component when the reader benefits from an active surface such as a form, quiz, chart, or draggable visual.
Live Examples
Every example below renders the real component directly inside HolyDocs, followed by the exact MDX you can paste into a page.
Contact Form
Full contact form with multiple field types.
mdx<Form title="Contact Us" subject="New inquiry"> <FormField name="name" label="Name" type="text" required /> <FormField name="email" label="Email" type="email" required /> <FormField name="message" label="Message" type="textarea" required /></Form>
With Select
Form with a dropdown select field.
mdx<Form title="Request Access" subject="Access request"> <FormField name="email" label="Email" type="email" required /> <FormField name="plan" label="Plan" type="select" options="Free,Pro,Enterprise" /> <FormField name="reason" label="Why?" type="textarea" /></Form>
Minimal
Simple single-field form.
mdx<Form title="Subscribe" submitLabel="Subscribe"> <FormField name="email" label="Email address" type="email" required placeholder="you@example.com" /></Form>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | undefined | Form heading text. |
to | string | required | Email address to receive submissions. It must be verified for the project (see below). |
subject | string | 'Form submission' | Email subject line. |
submitLabel | string | 'Submit' | Submit button text. |
Recipients
Submissions are emailed to the form's to address, and only when that address is verified for the project:
- the verified email of any member of the project's organization works as is, or
- another address works once an org owner or admin asks for it and someone opens the confirmation link HolyDocs mails to it:
bashcurl -X POST https://api.holydocs.com/api/v1/projects/$PROJECT_ID/form-recipients \ -H "Authorization: Bearer $HOLYDOCS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"email": "support@example.com"}'
GET the same URL to see which addresses are verified, and DELETE .../form-recipients/{id} to remove one. A form whose address is not verified answers 400 and sends nothing.
The address stays in your page source: it is not in the rendered HTML, and the browser only tells the API which form on which page was submitted.
Usage
Start from this baseline shape and then tailor the copy, data, or nesting to the page you are writing.
mdx<Form title="Contact Us" subject="New inquiry"> <FormField name="name" label="Name" type="text" required /> <FormField name="email" label="Email" type="email" required /> <FormField name="message" label="Message" type="textarea" required /></Form>
Tips
- Explain what changes when a reader interacts with the component. Motion or controls alone should not carry the full meaning.
- Keep a non-interactive fallback in mind for screenshots, exported docs, and AI-driven readers that only see the resulting HTML.
- Verify keyboard behavior and focus states whenever the component includes inputs, toggles, or draggable controls.
Related Components
Visual color swatch with hex value and optional name, useful for design system documentation.
More
- Interactive playground: Form on holydocs.com
- Component library index: /components