Components
Feature Card
An icon, title and description used to explain product capabilities.
Installation
$ npx veil-ui@latest add feature-cardUsage
import { Zap } from "lucide-react";
import { FeatureCard } from "@/components/ui/feature-card";
<FeatureCard
icon={Zap}
title="Fast by default"
description="Sensible defaults with no runtime surprises."
/>;Examples
Basic
Fast by default
Every component ships with sensible defaults and no runtime surprises.
Grid
Accessible
Keyboard support and ARIA semantics come baked in.
Themeable
Design tokens drive color, spacing and radius across the system.
API reference
The package exports feature-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 feature-card --framework vue or switch the framework in components.json.
<script setup lang="ts">
import type { Component } from "vue";
import { Card, CardContent } from "@/components/ui/card";
import { cn } from "@/lib/utils";
const props = defineProps<{
icon: Component;
title: string;
description: string;
class?: string;
}>();
</script>
<template>
<Card data-slot="feature-card" :class="cn('max-w-sm gap-3', props.class)">
<CardContent class="space-y-3">
<span class="flex size-10 items-center justify-center rounded-lg bg-primary/10 text-primary">
<component :is="icon" class="size-5" aria-hidden="true" />
</span>
<h3 class="text-base font-medium">
<slot name="title">{{ title }}</slot>
</h3>
<p class="text-sm text-muted-foreground">
<slot name="description">{{ description }}</slot>
</p>
</CardContent>
</Card>
</template>