Components
Product Demo
A browser frame that presents a product screenshot or custom preview.
Installation
$ npx veil-ui@latest add product-demoUsage
import { ProductDemo } from "@/components/ui/product-demo";
<ProductDemo url="app.veil-ui.dev" caption="Dashboard preview.">
<DashboardPreview />
</ProductDemo>;Examples
Basic
app.veil-ui.dev/dashboard
Image
veil-ui.dev
Landing page preview
API reference
The package exports product-demo 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 product-demo --framework vue or switch the framework in components.json.
<template>
<figure data-slot="product-demo" class="overflow-hidden rounded-xl border bg-background shadow-sm w-full max-w-3xl"><div class="flex items-center gap-2 border-b bg-muted/40 px-3 py-2"><span aria-hidden="true" class="flex gap-1.5"><span class="size-2.5 rounded-full bg-destructive/70"></span><span class="size-2.5 rounded-full bg-amber-400"></span><span class="size-2.5 rounded-full bg-emerald-500/80"></span></span><span class="mx-auto flex max-w-xs flex-1 items-center justify-center rounded-md border bg-background px-2 py-0.5 text-[11px] text-muted-foreground">app.veil-ui.dev/dashboard</span></div><div class="aspect-[16/9] w-full bg-muted/20"><div class="grid size-full grid-cols-[80px_1fr]"><div class="flex flex-col items-center gap-4 border-r bg-background/60 py-4"><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-layout-dashboard size-4 text-primary" aria-hidden="true"><rect width="7" height="9" x="3" y="3" rx="1"></rect><rect width="7" height="5" x="14" y="3" rx="1"></rect><rect width="7" height="9" x="14" y="12" rx="1"></rect><rect width="7" height="5" x="3" y="16" rx="1"></rect></svg><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-chart-column lucide-bar-chart-3 size-4 text-muted-foreground" aria-hidden="true"><path d="M3 3v16a2 2 0 0 0 2 2h16"></path><path d="M18 17V9"></path><path d="M13 17V5"></path><path d="M8 17v-3"></path></svg><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-settings size-4 text-muted-foreground" aria-hidden="true"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"></path><circle cx="12" cy="12" r="3"></circle></svg></div><div class="grid grid-cols-2 gap-3 p-4"><div class="rounded-lg border bg-background/80 p-3"><div class="h-2 w-12 rounded bg-muted"></div><div class="mt-2 h-6 w-20 rounded bg-primary/20"></div></div><div class="rounded-lg border bg-background/80 p-3"><div class="h-2 w-12 rounded bg-muted"></div><div class="mt-2 h-6 w-20 rounded bg-primary/20"></div></div><div class="rounded-lg border bg-background/80 p-3"><div class="h-2 w-12 rounded bg-muted"></div><div class="mt-2 h-6 w-20 rounded bg-primary/20"></div></div><div class="rounded-lg border bg-background/80 p-3"><div class="h-2 w-12 rounded bg-muted"></div><div class="mt-2 h-6 w-20 rounded bg-primary/20"></div></div></div></div></div><figcaption class="border-t px-4 py-2 text-xs text-muted-foreground">A dashboard composed from registry blocks.</figcaption></figure>
</template>