From 5785577f1d219e4d98982146623084e47ea68554 Mon Sep 17 00:00:00 2001 From: Hirotaka Mizutani <52546+hirotaka@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:20:12 +0900 Subject: [PATCH 1/2] feat(registry): Add feature card component --- app/components/demo/FeatureCardDemo.vue | 59 +++++++++++++++ .../blocks/feature-card/FeatureCard.vue | 65 ++++++++++++++++ app/registry/blocks/feature-card/index.ts | 1 + content/docs/2.components/10.feature-card.md | 75 +++++++++++++++++++ scripts/registry-verify.ts | 4 + 5 files changed, 204 insertions(+) create mode 100644 app/components/demo/FeatureCardDemo.vue create mode 100644 app/registry/blocks/feature-card/FeatureCard.vue create mode 100644 app/registry/blocks/feature-card/index.ts create mode 100644 content/docs/2.components/10.feature-card.md 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/10.feature-card.md b/content/docs/2.components/10.feature-card.md new file mode 100644 index 0000000..1530467 --- /dev/null +++ b/content/docs/2.components/10.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) { From 2347b6e8ad65e9302ef0acd8c2a5a79a1230b7a3 Mon Sep 17 00:00:00 2001 From: Hirotaka Mizutani <52546+hirotaka@users.noreply.github.com> Date: Fri, 26 Jun 2026 15:22:25 +0900 Subject: [PATCH 2/2] docs(registry): Reorder feature card docs page --- .../docs/2.components/{10.feature-card.md => 11.feature-card.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename content/docs/2.components/{10.feature-card.md => 11.feature-card.md} (100%) diff --git a/content/docs/2.components/10.feature-card.md b/content/docs/2.components/11.feature-card.md similarity index 100% rename from content/docs/2.components/10.feature-card.md rename to content/docs/2.components/11.feature-card.md