Components
Search Result Card
A search hit with breadcrumb, link, snippet and metadata.
Installation
$ npx veil-ui@latest add search-result-cardUsage
import { SearchResultCard } from "@/components/ui/search-result-card";
<SearchResultCard
title="Getting started with design tokens"
url="https://veil-ui.dev/docs/tokens"
snippet="Define a minimal token set for color, spacing and radius."
/>;Examples
Basic
veil-ui.dev › docshttps://veil-ui.dev/docs/tokens
Getting started with design tokens
Define a minimal token set for color, spacing and radius, then let every component read from the same scale.
Updated Mar 12, 2026
Stack
https://veil-ui.dev/docs/focus
Accessible focus styles
Focus rings should be visible on every interactive surface and never rely on color alone.
https://veil-ui.dev/docs/cards
Composing cards
Card primitives split into header, content and footer so layouts stay predictable.
API reference
The package exports search-result-card along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.
Accessibility
- Content uses semantic HTML — lists are lists, tables are tables and metadata uses a definition list.
- Interactive elements are real buttons or links with visible focus states.
- Images require meaningful
alttext; icons used decoratively arearia-hidden.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add search-result-card --framework vue or switch the framework in components.json.
<script setup lang="ts">
import { cn } from "@/lib/utils";
const props = withDefaults(
defineProps<{
title: string;
url: string;
snippet: string;
breadcrumb?: string;
href?: string;
class?: string;
}>(),
{ href: "#" },
);
</script>
<template>
<article
data-slot="search-result-card"
:class="cn('group max-w-2xl space-y-1', props.class)"
>
<div class="flex items-center gap-2 text-xs text-muted-foreground">
<span v-if="breadcrumb">{{ breadcrumb }}</span>
<span class="truncate">{{ url }}</span>
</div>
<h3 class="text-base font-medium">
<a
:href="href"
class="text-primary outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring"
>
<slot name="title">{{ title }}</slot>
</a>
</h3>
<p class="line-clamp-2 text-sm text-muted-foreground">
<slot name="snippet">{{ snippet }}</slot>
</p>
<div v-if="$slots.meta" class="text-xs text-muted-foreground">
<slot name="meta" />
</div>
</article>
</template>