Components
Hero Section
A landing hero with eyebrow, headline, actions and optional media.
Installation
$ npx veil-ui@latest add hero-sectionUsage
import { HeroSection } from "@/components/ui/hero-section";
<HeroSection
eyebrow="New · Version 2.0"
title="Build calm interfaces, faster"
description="Accessible defaults with a CLI that keeps you in control."
actions={<HeroCta />}
media={<ProductDemo />}
/>;Examples
Basic
New · Version 2.0
Build calm interfaces, faster
A copy-paste component registry with accessible defaults, design tokens and a CLI that keeps you in control.
With media
For product teams
Ship a consistent product surface
Compose primitives into pages, not the other way around.
Dashboard previewLive
API reference
The package exports hero-section 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-section --framework vue or switch the framework in components.json.
<template>
<section data-slot="hero-section" class="relative overflow-hidden px-6 py-16 sm:py-20 w-full max-w-3xl rounded-xl border bg-background"><div class="mx-auto grid w-full max-w-6xl gap-10"><div class="flex flex-col gap-5 items-center text-center"><span class="inline-flex w-fit items-center rounded-full border bg-muted/50 px-3 py-1 text-xs font-medium text-muted-foreground">New · Version 2.0</span><h1 class="text-4xl font-semibold tracking-tight text-balance sm:text-5xl">Build calm interfaces, faster</h1><p class="max-w-xl text-base text-muted-foreground text-pretty sm:text-lg">A copy-paste component registry with accessible defaults, design tokens and a CLI that keeps you in control.</p><div class="flex flex-wrap items-center gap-3 justify-center"><button 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">Get started <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></button><button 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">Read the docs</button></div></div></div></section>
</template>