Components
Hero CTA
A centered pair of hero call-to-action links with a note.
Installation
$ npx veil-ui@latest add hero-ctaUsage
import { HeroCta } from "@/components/ui/hero-cta";
<HeroCta
primaryLabel="Start building"
primaryHref="/docs"
secondaryLabel="Book a demo"
secondaryHref="/demo"
note="No credit card required."
/>;Examples
Basic
No credit card required.
Single
We will email you when a spot opens.
API reference
The package exports hero-cta along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.
Accessibility
- Pages keep a single
h1in the hero and useh2/h3for section hierarchy. - Call-to-action elements are real links or buttons with discernible labels.
- Decorative icons are
aria-hiddenand meaningful images requirealttext.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add hero-cta --framework vue or switch the framework in components.json.
<template>
<div data-slot="hero-cta" class="flex flex-col items-center gap-3"><div class="flex flex-wrap items-center justify-center gap-3"><a href="#start" data-slot="button" data-variant="default" data-size="lg" class="inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap text-sm font-medium outline-none transition-[color,background-color,border-color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-primary text-primary-foreground hover:bg-primary/90 h-10 rounded-md px-6">Start building</a><a href="#demo" data-slot="button" data-variant="outline" data-size="lg" class="inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap text-sm font-medium outline-none transition-[color,background-color,border-color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 rounded-md px-6">Book a demo</a></div><p class="text-xs text-muted-foreground">No credit card required.</p></div>
</template>