Split form 02
A heading, line and three points beside a sign-up card.
Last updated
---
/**
* Split form 02: A heading, line and three points beside a sign-up card.
*
* @block hero
* @order 8
*/
import { CircleCheck, KeyRound } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import Button from '@/components/apogee/Button/Button.astro'
import Link from '@/components/apogee/Link/Link.astro'
import Input from '@/components/apogee/Input/Input.astro'
import Card from '@/components/apogee/Card/Card.astro'
import { plain, type HeroContent } from '@/components/apogee/sections/_shared/spine.ts'
/** @composable */
interface Props extends HeroContent {
/** The checklist under the description. @category content */
features?: string[] | null
/** @category content */
formHeading?: string
/** @category content */
formDescription?: string | null
/** @category content */
submitLabel?: string
}
const {
heading = 'Customer service, simplified',
description = 'Powerful, self-serve product and growth analytics to help you convert, engage and retain more users. Trusted by over 4,000 startups.',
features = ['30-day free trial', 'Personal onboarding', 'Every feature included'],
formHeading = 'Create an account',
formDescription = 'Start your 30-day free trial.',
submitLabel = 'Get started',
} = Astro.props
---
<Section spacing="large">
<div class="grid items-center gap-12 lg:gap-16 lg:grid-cols-2">
<div class="flex flex-col gap-8 md:gap-12">
<div class="flex flex-col gap-4 md:gap-6 items-start">
<Heading as="h1" size="display" class="text-balance">{plain(heading)}</Heading>
{description && <p class="max-w-2xl text-lg md:text-xl text-neutral-faded">{description}</p>}
</div>
{features && <ul class="flex list-none flex-col gap-4 p-0 ">{features.map((f) => <li class="flex gap-3"><CircleCheck class="size-6 shrink-0 text-primary" aria-hidden="true" />{f}</li>)}</ul>}
</div>
<div class="relative flex items-center justify-center overflow-hidden rounded-3xl bg-neutral-faded p-6 md:p-10 max-md:bg-transparent! max-md:p-0!">
<Card padding="large" class="w-full max-w-md justify-self-center">
<div class="flex flex-col gap-6">
<div class="flex flex-col gap-1">
<Heading as="h2" size="h4">{formHeading}</Heading>
{formDescription && <p class="text-neutral-faded">{formDescription}</p>}
</div>
<form method="post" class="flex flex-col gap-4">
<Input size="large" label="Name" name="name" placeholder="Enter your name" autocomplete="name" required />
<Input size="large" label="Email" type="email" name="email" placeholder="Enter your email" autocomplete="email" required />
<Button type="submit" size="large" fullWidth>{submitLabel}</Button>
<Button href="#" variant="outline" color="neutral" size="large" fullWidth><KeyRound slot="start" aria-hidden="true" />Sign up with SSO</Button>
</form>
<p class="text-center text-sm text-neutral-faded">Already have an account? <Link href="#">Log in</Link></p>
</div>
</Card>
</div>
</div>
</Section>
Show codeHide code
---
/**
* Split form 02: A heading, line and three points beside a sign-up card.
*
* @block hero
* @order 8
*/
import { CircleCheck, KeyRound } from '@lucide/astro'
import Section from '@/components/apogee/Section/Section.astro'
import Heading from '@/components/apogee/Heading/Heading.astro'
import Button from '@/components/apogee/Button/Button.astro'
import Link from '@/components/apogee/Link/Link.astro'
import Input from '@/components/apogee/Input/Input.astro'
import Card from '@/components/apogee/Card/Card.astro'
import { plain, type HeroContent } from '@/components/apogee/sections/_shared/spine.ts'
/** @composable */
interface Props extends HeroContent {
/** The checklist under the description. @category content */
features?: string[] | null
/** @category content */
formHeading?: string
/** @category content */
formDescription?: string | null
/** @category content */
submitLabel?: string
}
const {
heading = 'Customer service, simplified',
description = 'Powerful, self-serve product and growth analytics to help you convert, engage and retain more users. Trusted by over 4,000 startups.',
features = ['30-day free trial', 'Personal onboarding', 'Every feature included'],
formHeading = 'Create an account',
formDescription = 'Start your 30-day free trial.',
submitLabel = 'Get started',
} = Astro.props
---
<Section spacing="large">
<div class="grid items-center gap-12 lg:gap-16 lg:grid-cols-2">
<div class="flex flex-col gap-8 md:gap-12">
<div class="flex flex-col gap-4 md:gap-6 items-start">
<Heading as="h1" size="display" class="text-balance">{plain(heading)}</Heading>
{description && <p class="max-w-2xl text-lg md:text-xl text-neutral-faded">{description}</p>}
</div>
{features && <ul class="flex list-none flex-col gap-4 p-0 ">{features.map((f) => <li class="flex gap-3"><CircleCheck class="size-6 shrink-0 text-primary" aria-hidden="true" />{f}</li>)}</ul>}
</div>
<div class="relative flex items-center justify-center overflow-hidden rounded-3xl bg-neutral-faded p-6 md:p-10 max-md:bg-transparent! max-md:p-0!">
<Card padding="large" class="w-full max-w-md justify-self-center">
<div class="flex flex-col gap-6">
<div class="flex flex-col gap-1">
<Heading as="h2" size="h4">{formHeading}</Heading>
{formDescription && <p class="text-neutral-faded">{formDescription}</p>}
</div>
<form method="post" class="flex flex-col gap-4">
<Input size="large" label="Name" name="name" placeholder="Enter your name" autocomplete="name" required />
<Input size="large" label="Email" type="email" name="email" placeholder="Enter your email" autocomplete="email" required />
<Button type="submit" size="large" fullWidth>{submitLabel}</Button>
<Button href="#" variant="outline" color="neutral" size="large" fullWidth><KeyRound slot="start" aria-hidden="true" />Sign up with SSO</Button>
</form>
<p class="text-center text-sm text-neutral-faded">Already have an account? <Link href="#">Log in</Link></p>
</div>
</Card>
</div>
</div>
</Section>Add
npx @ava-ui/apogee add hero/split-form-02
This copies the block to src/components/apogee/blocks/hero/ with everything it uses: Button, Card, Heading, Input, Link, Section. Every piece of copy is a prop, with the sample copy as its default. Pass yours, or null to hide a part; see copy is props.
Accessibility
- The heading is the page’s
h1; the items below are one level down. - The email field is named “Email” (the placeholder is not a label); the form submits without JS.
Related
SectionA full-width band with vertical rhythm and an optional Container, used to lay out page content.
HeadingA semantic, fluid-sized heading — pick the tag with `as`, the visual size with `size`.
ButtonTriggers an action. Renders a <button>, or an <a> when href is set. Hue, fill and height are three separate props.
DeviceFrameA screenshot in a phone, a landscape tablet or a browser window, drawn in CSS with the theme's colours; it scales as a whole and a dark screenshot swaps in with the theme.