Veil UI
Components

Search Results Page

A search results page with scopes, snippets and related terms.

Installation

$ npx veil-ui@latest add search-results-page

Usage

import { SearchResultsPage } from "@/components/ui/search-results-page";

<SearchResultsPage />;

Examples

Basic

VVeil UI
⌘K

About 1,240 results for “design tokens” (0.24 seconds)

Docsveil-ui.dev/docs/getting-started

Getting started with Veil UI

Install the CLI, scaffold your components directory, and add your first accessible primitive in under two minutes.

Updated 2 days ago · 8 min read
Docsveil-ui.dev/docs/tokens

Design tokens reference

Color, spacing, radius and typography tokens shipped with the registry. Learn how to override them without breaking components.

Updated last week · 12 min read
Componentsveil-ui.dev/components/button

Button component

A button triggers an action. Supports default, secondary, outline, ghost, destructive and link variants with four sizes.

Components · Updated yesterday
Journalveil-ui.dev/journal/theming

Theming your product with CSS variables

A practical walkthrough of building a theme layer on top of the registry using CSS variables and semantic tokens.

Journal · 6 min read
Docsveil-ui.dev/docs/accessibility

Accessibility checklist for new components

Keyboard support, focus management and labeling requirements every new component should meet before it ships.

Updated 3 weeks ago · 9 min read

Page 1 of 12

API reference

The package exports search-results-page along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.

Accessibility

  • Page templates use semantic landmarks and a single page-level heading.
  • Navigation links and actions have discernible names and visible focus styles.
  • Decorative imagery uses empty alt text; content images carry descriptions.

Vue and plain HTML

This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add search-results-page --framework vue or switch the framework in components.json.

<template>
<div data-slot="search-results-page" class="w-full overflow-hidden rounded-xl border bg-background min-h-[600px]"><header class="border-b px-6 py-3"><div class="mx-auto flex w-full max-w-5xl items-center gap-4"><div data-slot="logo" class="inline-flex items-center gap-1.5"><span data-slot="logo-mark" class="flex shrink-0 items-center justify-center overflow-hidden rounded-md size-6"><span class="grid size-full place-items-center bg-primary text-[10px] font-bold text-primary-foreground">V</span></span><span data-slot="logo-name" class="font-semibold tracking-tight text-sm">Veil UI</span></div><div class="relative flex-1"><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-search pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" aria-hidden="true"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg><input type="search" data-slot="input" class="h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs outline-none transition-[color,box-shadow,border-color] placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30 pl-8 pr-14" aria-label="Search" value="design tokens"/><kbd data-slot="kbd" class="pointer-events-none inline-flex h-5 min-w-5 select-none items-center justify-center gap-0.5 rounded border bg-muted px-1 font-mono text-[10px] font-medium text-muted-foreground absolute right-2 top-1/2 -translate-y-1/2">⌘K</kbd></div><button data-slot="button" data-variant="ghost" data-size="sm" class="shrink-0 items-center justify-center gap-2 whitespace-nowrap 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 [&amp;_svg]:pointer-events-none [&amp;_svg]:shrink-0 [&amp;_svg:not([class*=&#x27;size-&#x27;])]:size-4 hover:bg-accent hover:text-accent-foreground h-8 rounded-md px-3 text-xs hidden sm:inline-flex">Sign in</button></div></header><div class="mx-auto w-full max-w-5xl px-6 py-6"><div class="flex flex-wrap items-center justify-between gap-3"><div role="tablist" aria-label="Result type" data-slot="segmented-navigation" class="inline-flex items-center gap-1 rounded-lg border bg-muted p-1"><button type="button" role="tab" aria-selected="true" class="rounded-md px-3 py-1 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-background text-foreground shadow-sm">All</button><button type="button" role="tab" aria-selected="false" class="rounded-md px-3 py-1 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 text-muted-foreground hover:text-foreground">Docs</button><button type="button" role="tab" aria-selected="false" class="rounded-md px-3 py-1 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 text-muted-foreground hover:text-foreground">Components</button><button type="button" role="tab" aria-selected="false" class="rounded-md px-3 py-1 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 text-muted-foreground hover:text-foreground">Journal</button></div><div class="flex items-center gap-2"><button data-slot="button" data-variant="outline" data-size="sm" class="inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap 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 [&amp;_svg]:pointer-events-none [&amp;_svg]:shrink-0 [&amp;_svg:not([class*=&#x27;size-&#x27;])]:size-4 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-8 rounded-md px-3 text-xs"><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-sliders-horizontal" aria-hidden="true"><path d="M10 5H3"></path><path d="M12 19H3"></path><path d="M14 3v4"></path><path d="M16 17v4"></path><path d="M21 12h-9"></path><path d="M21 19h-5"></path><path d="M21 5h-7"></path><path d="M8 10v4"></path><path d="M8 12H3"></path></svg> Filters</button><button data-slot="button" data-variant="ghost" data-size="sm" class="inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap 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 [&amp;_svg]:pointer-events-none [&amp;_svg]:shrink-0 [&amp;_svg:not([class*=&#x27;size-&#x27;])]:size-4 hover:bg-accent hover:text-accent-foreground h-8 rounded-md px-3 text-xs">Relevance <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-chevron-down" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></button></div></div><p class="mt-5 text-sm text-muted-foreground">About 1,240 results for <span class="font-medium text-foreground">“design tokens”</span> (0.24 seconds)</p><div class="mt-5 grid gap-8 lg:grid-cols-[1fr_240px]"><div><div class="divide-y"><div class="py-5 first:pt-0"><article data-slot="search-result-card" class="group space-y-1 max-w-none"><div class="flex items-center gap-2 text-xs text-muted-foreground"><span>Docs</span><span class="truncate">veil-ui.dev/docs/getting-started</span></div><h3 class="text-base font-medium"><a href="#" class="text-primary outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring">Getting started with Veil UI</a></h3><p class="line-clamp-2 text-sm text-muted-foreground">Install the CLI, scaffold your components directory, and add your first accessible primitive in under two minutes.</p><div class="text-xs text-muted-foreground">Updated 2 days ago · 8 min read</div></article></div><div class="py-5 first:pt-0"><article data-slot="search-result-card" class="group space-y-1 max-w-none"><div class="flex items-center gap-2 text-xs text-muted-foreground"><span>Docs</span><span class="truncate">veil-ui.dev/docs/tokens</span></div><h3 class="text-base font-medium"><a href="#" class="text-primary outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring">Design tokens reference</a></h3><p class="line-clamp-2 text-sm text-muted-foreground">Color, spacing, radius and typography tokens shipped with the registry. Learn how to override them without breaking components.</p><div class="text-xs text-muted-foreground">Updated last week · 12 min read</div></article></div><div class="py-5 first:pt-0"><article data-slot="search-result-card" class="group space-y-1 max-w-none"><div class="flex items-center gap-2 text-xs text-muted-foreground"><span>Components</span><span class="truncate">veil-ui.dev/components/button</span></div><h3 class="text-base font-medium"><a href="#" class="text-primary outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring">Button component</a></h3><p class="line-clamp-2 text-sm text-muted-foreground">A button triggers an action. Supports default, secondary, outline, ghost, destructive and link variants with four sizes.</p><div class="text-xs text-muted-foreground">Components · Updated yesterday</div></article></div><div class="py-5 first:pt-0"><article data-slot="search-result-card" class="group space-y-1 max-w-none"><div class="flex items-center gap-2 text-xs text-muted-foreground"><span>Journal</span><span class="truncate">veil-ui.dev/journal/theming</span></div><h3 class="text-base font-medium"><a href="#" class="text-primary outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring">Theming your product with CSS variables</a></h3><p class="line-clamp-2 text-sm text-muted-foreground">A practical walkthrough of building a theme layer on top of the registry using CSS variables and semantic tokens.</p><div class="text-xs text-muted-foreground">Journal · 6 min read</div></article></div><div class="py-5 first:pt-0"><article data-slot="search-result-card" class="group space-y-1 max-w-none"><div class="flex items-center gap-2 text-xs text-muted-foreground"><span>Docs</span><span class="truncate">veil-ui.dev/docs/accessibility</span></div><h3 class="text-base font-medium"><a href="#" class="text-primary outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring">Accessibility checklist for new components</a></h3><p class="line-clamp-2 text-sm text-muted-foreground">Keyboard support, focus management and labeling requirements every new component should meet before it ships.</p><div class="text-xs text-muted-foreground">Updated 3 weeks ago · 9 min read</div></article></div></div><div class="flex flex-col items-center justify-between gap-4 border-t pt-5 sm:flex-row"><p class="text-sm text-muted-foreground">Page 1 of 12</p><nav data-slot="pagination" aria-label="Pagination" class="flex items-center gap-1"><button type="button" aria-label="Previous page" disabled="" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border-transparent"><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-chevron-left size-4" aria-hidden="true"><path d="m15 18-6-6 6-6"></path></svg></button><button type="button" aria-label="Go to page 1" aria-current="page" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border-foreground bg-foreground text-background hover:bg-foreground hover:text-background">1</button><button type="button" aria-label="Go to page 2" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50">2</button><button type="button" aria-label="Go to page 3" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50">3</button><button type="button" aria-label="Go to page 4" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50">4</button><button type="button" aria-label="Go to page 5" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50">5</button><span aria-hidden="true" class="px-1 text-sm text-muted-foreground">…</span><button type="button" aria-label="Go to page 12" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50">12</button><button type="button" aria-label="Next page" class="inline-flex size-8 items-center justify-center rounded-md border text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border-transparent"><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-chevron-right size-4" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button></nav></div></div><aside class="space-y-4"><div data-slot="card" class="flex flex-col gap-4 rounded-lg border bg-card py-5 text-card-foreground shadow-xs"><div data-slot="card-header" class="grid auto-rows-min items-start gap-1 px-5 has-[[data-slot=card-action]]:grid-cols-[1fr_auto]"><div data-slot="card-title" class="font-medium text-sm">Related searches</div></div><div data-slot="card-content" class="px-5 space-y-2"><a href="#component-registry" class="flex items-center justify-between rounded-md px-1 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"><span class="inline-flex items-center gap-2"><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-search size-3.5" aria-hidden="true"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg> component registry</span></a><a href="#design-tokens" class="flex items-center justify-between rounded-md px-1 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"><span class="inline-flex items-center gap-2"><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-search size-3.5" aria-hidden="true"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg> design tokens</span></a><a href="#radix-primitives" class="flex items-center justify-between rounded-md px-1 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"><span class="inline-flex items-center gap-2"><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-search size-3.5" aria-hidden="true"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg> radix primitives</span></a><a href="#tailwind-v4-setup" class="flex items-center justify-between rounded-md px-1 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"><span class="inline-flex items-center gap-2"><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-search size-3.5" aria-hidden="true"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg> tailwind v4 setup</span></a><a href="#dark-mode" class="flex items-center justify-between rounded-md px-1 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"><span class="inline-flex items-center gap-2"><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-search size-3.5" aria-hidden="true"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg> dark mode</span></a><a href="#form-validation" class="flex items-center justify-between rounded-md px-1 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"><span class="inline-flex items-center gap-2"><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-search size-3.5" aria-hidden="true"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg> form validation</span></a></div></div><div data-slot="card" class="flex flex-col gap-4 rounded-lg border bg-card py-5 text-card-foreground shadow-xs"><div data-slot="card-header" class="grid auto-rows-min items-start gap-1 px-5 has-[[data-slot=card-action]]:grid-cols-[1fr_auto]"><div data-slot="card-title" class="font-medium text-sm">Search in</div></div><div data-slot="card-content" class="px-5 space-y-1 text-sm"><a href="#" class="flex items-center gap-2 rounded-md px-1 py-1 text-muted-foreground hover:bg-accent hover:text-foreground"><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-file-text size-4" aria-hidden="true"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"></path><path d="M14 2v5a1 1 0 0 0 1 1h5"></path><path d="M10 9H8"></path><path d="M16 13H8"></path><path d="M16 17H8"></path></svg>Documentation<span class="ml-auto text-xs">842</span></a><a href="#" class="flex items-center gap-2 rounded-md px-1 py-1 text-muted-foreground hover:bg-accent hover:text-foreground"><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-globe size-4" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg>Blog<span class="ml-auto text-xs">186</span></a><a href="#" class="flex items-center gap-2 rounded-md px-1 py-1 text-muted-foreground hover:bg-accent hover:text-foreground"><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-video size-4" aria-hidden="true"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"></path><rect x="2" y="6" width="14" height="12" rx="2"></rect></svg>Videos<span class="ml-auto text-xs">94</span></a><a href="#" class="flex items-center gap-2 rounded-md px-1 py-1 text-muted-foreground hover:bg-accent hover:text-foreground"><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-image size-4" aria-hidden="true"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg>Images<span class="ml-auto text-xs">118</span></a></div></div></aside></div></div></div>
</template>

On this page