diff --git a/app/components/demo/FeatureCardDemo.vue b/app/components/demo/FeatureCardDemo.vue new file mode 100644 index 0000000..d9f23f9 --- /dev/null +++ b/app/components/demo/FeatureCardDemo.vue @@ -0,0 +1,59 @@ + + + diff --git a/app/registry/blocks/feature-card/FeatureCard.vue b/app/registry/blocks/feature-card/FeatureCard.vue new file mode 100644 index 0000000..81866a8 --- /dev/null +++ b/app/registry/blocks/feature-card/FeatureCard.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/registry/blocks/feature-card/index.ts b/app/registry/blocks/feature-card/index.ts new file mode 100644 index 0000000..efb8fc9 --- /dev/null +++ b/app/registry/blocks/feature-card/index.ts @@ -0,0 +1 @@ +export { default as FeatureCard, type FeatureCardProps } from "./FeatureCard.vue"; diff --git a/content/docs/2.components/11.feature-card.md b/content/docs/2.components/11.feature-card.md new file mode 100644 index 0000000..1530467 --- /dev/null +++ b/content/docs/2.components/11.feature-card.md @@ -0,0 +1,75 @@ +--- +title: FeatureCard +description: Render a reusable feature, content, or navigation card with optional link and icon slot. +category: marketing +--- + +::component-preview +--- +name: FeatureCardDemo +--- +:: + +## Installation + +```bash +npx shadcn-vue@latest add "https://ui.stackhacker.io/r/feature-card.json" +``` + +## Usage + +```vue + + + +``` + +## App-Owned Feature Data + +`FeatureCard` owns a portable card surface for feature, content, or navigation teasers. Your app owns the card list, copy, route generation, analytics events, active states, and any icon system you choose to use. + +The component intentionally does not accept Nuxt Icon string names, require `NuxtLink`, or install an icon package. Pass icon markup through the `icon` slot so the consuming app can use Lucide, Nuxt Icon, custom SVGs, or no icon at all. + +When `href` is omitted, the component renders static card content. When `href` is supplied, it renders an anchor. For `target="_blank"`, the component adds `rel="noopener noreferrer"` unless you provide a custom `rel` value. + +## Examples + +### Default + +::component-preview +--- +name: FeatureCardDemo +--- +:: + +## API Reference + +### Props + +| Prop | Type | Default | Description | +|------|------|---------|-------------| +| `title` | `string` | — | Feature title supplied by your app. | +| `description` | `string` | — | Optional supporting feature copy supplied by your app. | +| `href` | `string` | — | Optional destination. When omitted, the card renders as static content. | +| `target` | `HTMLAnchorElement['target']` | — | Anchor target used when `href` is supplied. | +| `rel` | `string` | — | Anchor rel used when `href` is supplied. Defaults to `noopener noreferrer` for blank-target links. | +| `class` | `string` | — | Additional CSS classes for the root element. | + +### Slots + +| Slot | Description | +|------|-------------| +| `icon` | Optional icon markup rendered above the title. | diff --git a/scripts/registry-verify.ts b/scripts/registry-verify.ts index 6ffba00..29340ea 100644 --- a/scripts/registry-verify.ts +++ b/scripts/registry-verify.ts @@ -119,6 +119,10 @@ const expectedItems: Record = { dependencies: [], registryDependencies: ["button"], }, + "feature-card": { + dependencies: [], + registryDependencies: [], + }, }; if (registryIndex) {