Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Contact Blocks for Astro

Astro contact form blocks with labelled fields and contact links. Preview layouts and install the source, then connect your form service.

Each block renders a real form with named, required fields and a submit button. Set form.action to your form handler and form.method to "post" (the default) or "get". The blocks do not provide a submission backend. Pass form.id for a stable form ID; field IDs use it as their prefix.

Split form

Place contact methods beside a labelled enquiry form.

How does a new request reach your team?

Describe one request you would like to route automatically. This gnostic AI example uses sample contact details.

Describe your intake process

Contact form

Email

projects@example.com

Phone

+1 212 555 0124

Meeting format

Video call by appointment

Hours

Sample hours, Tue and Thu, 1–3 pm Eastern

bunx --bun shadcn@latest add @gnostic/contact-split-form

Centered form

Give the form a central position after the contact introduction.

Which task do you repeat each week?

Use this gnostic AI sample inquiry to describe one manual task. Start with what triggers it and who needs the result.

Email us

projects@example.com

Call us

+1 212 555 0124

Meeting format

Video call by appointment

Support hours

Sample hours, Tue and Thu, 1–3 pm Eastern

Contact form

Include the tools you use and the step that still needs a person.

bunx --bun shadcn@latest add @gnostic/contact-centered-form

Keep the contact information available beside the enquiry fields.

Where does an invoice need a second look?

Use this gnostic AI sample form to outline an invoice review. Identify the fields to extract and who approves the draft.

Email

projects@example.com

Phone

+1 212 555 0124

Meeting format

Video call by appointment

Hours

Sample hours, Tue and Thu, 1–3 pm Eastern

Contact form
bunx --bun shadcn@latest add @gnostic/contact-3

Contact details and form

Supply your own content. The section uses the selected project preset.

Timing
Sample hours: Tuesday and Thursday, 1–3 pm Eastern
Address
gnostic AI · Sample remote project desk

Describe one recurring task and the person who checks the result.

bunx --bun shadcn@latest add @gnostic/contact-details-form
PropType
contentDetailsFormContent

Section content.

TypeDetailsFormContent
class?string

Classes added to the root.

Typestring

Editorial contact

Use this section for a project enquiry with a form endpoint or email draft fallback.

gnostic AI · Sample project brief

Plan a pilot for your support team

Describe one question your team answers often and the sources it uses to check each reply.

About your workflow

This opens a draft in your email app. Review it, then send it. You can also email projects@example.com.

bunx --bun shadcn@latest add @gnostic/contact-project-inquiry

See serif accent font setup when installing this section.

Service map

Example workshop area

This example uses two New York neighborhoods to show how a consulting team can display its workshop area.

Open the map

gnostic AI · Sample service area

Plan an on-site workflow review

  • East Village
  • Lower East Side
  • Map the current workflow
  • Identify the manual handoffs
View the inquiry form

+1 212 555 0124

bunx --bun shadcn@latest add @gnostic/contact-service-map

Estimate form

Mountain ridge beyond a lake

gnostic AI · Sample estimate

Start your document intake

Choose the part of invoice intake you want to test and the budget available for the project.

Use sample details to try the request form.

bunx --bun shadcn@latest add @gnostic/contact-estimate-form

Business hours and booking

An address, opening hours, email, and a configurable booking link.

gnostic AI · Sample consulting hours

Discuss a workflow with a consultant

Choose a task to walk through. Bring a sample request and the checklist your team uses to finish it.

View the project inquiryprojects@example.com

These hours illustrate a sample schedule.

Remote consultation

Video call by appointment

Tuesday & Thursday
1-3 pm Eastern
Friday
10-11 am Eastern
bunx --bun shadcn@latest add @gnostic/contact-hours

Choose a contact layout

Choose the contact layout from the ways people can actually reach you. A small site may need only direct links; a detailed enquiry can use a form with a short explanation of the next step.

Pass content from Astro

Contact form variants accept content labels and form action/method props. Connect those to a real endpoint or Astro action. The block displays the form but does not send mail, validate server-side rules, or store submissions by itself.

Responsive layout and images

Check label wrapping, error messages, and keyboard order on a narrow screen. Keep email and phone links usable without the form. If a variant includes an image, supply useful context rather than an image that competes with the fields.

Compose the next section

Place Services or FAQs before contact when they answer common questions. Use Field for extra form fields.

Named slots

These slots are optional. Use the slot name on a direct child of the block.

contact-service-map

PropType
map?Astro content

Replaces the embedded service map.

TypeAstro content
DefaultIframe from data.map

contact-estimate-form

PropType
image?Astro content

Replaces the image beside the estimate form.

TypeAstro content
DefaultAstro Image from data.image

contact-icon-block

PropType
icon?Astro content

Places an icon before the contact details.

TypeAstro content