Skip to content

Underline waitlist card

Square-cornered waitlist card with underline fields.

Usage

Usage
import { WaitlistUnderline } from '@/components/blocks/waitlist-03'


<WaitlistUnderline />


// Send the signup to your own endpoint
<WaitlistUnderline
  title="Join the Acme waitlist"
  termsHref="/terms"
  privacyHref="/privacy"
  onSubmit={async (values) => {
    const response = await fetch('/api/waitlist', {
      method: 'POST',
      body: JSON.stringify(values),
    })
    if (!response.ok) throw new Error('We couldn’t add you to the waitlist. Try again.')
  }}
/>


// Your own fields and options
<WaitlistUnderline
  fields={[
    { kind: 'input', name: 'email', label: 'Email', type: 'email', autoComplete: 'email', required: true },
    { kind: 'input', name: 'company', label: 'Company name', autoComplete: 'organization' },
    {
      kind: 'select',
      name: 'useCase',
      label: 'What would you use it for?',
      required: true,
      options: [
        { value: 'personal', label: 'Personal projects' },
        { value: 'team', label: 'My team at work' },
        { value: 'clients', label: 'Client work' },
      ],
    },
  ]}
/>

Install

pnpm dlx shadcn@latest add @pastaui-pro/waitlist-03

Source

Props

Underline waitlist card props
PropTypeDefaultDescription
titlestring= 'Join the Lodestar waitlist'Card heading.
descriptionstring= Short early access lineSubtitle under the heading.
fieldsWaitlistUnderlineField[]= Email (required), name, role and team sizeFields to render, in order. Inputs take kind: 'input', name, label, and optional type ('email' | 'tel' | 'text'), autoComplete and required. Selects take kind: 'select' and options: { value, label }[], and sit two to a row above 440px.
checkboxLabelReactNode= Terms and privacy sentenceAgreement sentence next to the required checkbox.
termsHref / privacyHrefstring= '#terms' / '#privacy'Links used by the default agreement sentence.
submitLabelstring= 'Join the waitlist'Button text.
successTitle / successDescriptionstring= 'You’re on the list' / invite lineCopy for the panel shown after a successful submit.
onSubmit(values: Record<string, string>) => void | Promise<void>= —Called with the values keyed by field name once every field is valid and the checkbox is ticked. Throw to show the error message. Without it, the form simulates success.
classNamestring= —Additional classes for the section.
styleCSSProperties= —Inline styles, handy for overriding the --pp-* theme variables.