Skip to content

Contact with pill fields

Contact section with service chips.

Usage

Usage
import { ContactPillForm } from '@/components/blocks/contact-05'


<ContactPillForm />


// Your own copy, contact items and handler
<ContactPillForm
  title={['Talk to ', { accent: 'sales' }]}
  items={[{ icon: 'mail', label: 'sales@oakbury.example', href: 'mailto:sales@oakbury.example' }]}
  onSubmit={async (values) => {
    await fetch('/api/contact', { method: 'POST', body: JSON.stringify(values) })
  }}
/>

Install

pnpm dlx shadcn@latest add @pastaui-pro/contact-05

Source

Props

Contact with pill fields props
PropTypeDefaultDescription
eyebrowstring= 'Get in touch'Small label with a blue dot above the heading. Pass an empty string to hide it.
titleContactTitlePart[]= ['Let’s make ', { accent: 'something good' }]Heading parts. Strings render as-is, { accent } parts render in italic blue.
descriptionstring= A line about who replies and whenSupporting text under the heading.
itemsContactItem[]= Email, phone and addressContact items with an icon ('mail' | 'phone' | 'pin' | 'clock'), a label and an optional href. Pass an empty array to hide the row.
fieldsContactFormField[]= Name, email, phone, service and project detailsForm fields with a name, label, type ('text' | 'email' | 'tel' | 'textarea' | 'choice'), placeholder, autoComplete, required, minLength, options for choice fields, and half to sit two per row.
submitLabelstring= 'Send details'Submit button label.
submitNotestring= 'We never add you to a mailing list.'Small note beside the submit button. Pass an empty string to hide it.
successTitlestring= 'Thanks, we have your details'Heading of the success panel, also announced to screen readers.
successDescriptionstring= A note about the reply timeText under the success heading.
onSubmit(values: ContactFormValues) => void | Promise<void>= —Called with the field values once the form is valid. Throw to show your error message. Without it, success is simulated after a short delay.
classNamestring= —Additional classes for the section.
styleCSSProperties= —Inline styles, handy for overriding the --pp-* theme variables.