diff --git a/app/components/demo/FeatureSplitDemo.vue b/app/components/demo/FeatureSplitDemo.vue new file mode 100644 index 0000000..9f06cd3 --- /dev/null +++ b/app/components/demo/FeatureSplitDemo.vue @@ -0,0 +1,88 @@ + + + diff --git a/app/registry/blocks/feature-split/FeatureSplit.vue b/app/registry/blocks/feature-split/FeatureSplit.vue new file mode 100644 index 0000000..86ad159 --- /dev/null +++ b/app/registry/blocks/feature-split/FeatureSplit.vue @@ -0,0 +1,169 @@ + + + diff --git a/app/registry/blocks/feature-split/index.ts b/app/registry/blocks/feature-split/index.ts new file mode 100644 index 0000000..3871f88 --- /dev/null +++ b/app/registry/blocks/feature-split/index.ts @@ -0,0 +1 @@ +export { default as FeatureSplit, type FeatureSplitFeature, type FeatureSplitProps, type FeatureSplitSection } from "./FeatureSplit.vue"; diff --git a/content/docs/2.components/17.feature-split.md b/content/docs/2.components/17.feature-split.md new file mode 100644 index 0000000..4ba400e --- /dev/null +++ b/content/docs/2.components/17.feature-split.md @@ -0,0 +1,114 @@ +--- +title: FeatureSplit +description: Render alternating split feature sections with app-owned media and icon slots. +category: marketing +--- + +::component-preview +--- +name: FeatureSplitDemo +--- +:: + +## Installation + +```bash +npx shadcn-vue@latest add "https://ui.stackhacker.io/r/feature-split.json" +``` + +## Usage + +```vue + + + +``` + +## App-Owned Media and Icons + +`FeatureSplit` owns the responsive split-section layout. Your app owns screenshots, videos, custom art, icon packages, routing, analytics, localization, and content sources. + +Pass media through the scoped `media` slot and feature icons through the scoped `icon` slot. The component intentionally does not accept Nuxt Icon string names or import local placeholder components. + +## Examples + +### Default + +::component-preview +--- +name: FeatureSplitDemo +--- +:: + +## API Reference + +### Props + +| Prop | Type | Default | Description | +|------|------|---------|-------------| +| `title` | `string` | — | Optional group title shown above all sections. | +| `description` | `string` | — | Optional group description shown above all sections. | +| `sections` | `FeatureSplitSection[] \| null` | `[]` | Split sections supplied by your app. | +| `class` | `string` | — | Additional CSS classes for the section group. | + +### Types + +```ts +interface FeatureSplitFeature { + id?: string + title: string + description?: string +} + +interface FeatureSplitSection { + id?: string + title: string + description?: string + reverse?: boolean + features?: FeatureSplitFeature[] | null +} +``` + +### Slots + +| Slot | Props | Description | +|------|-------|-------------| +| `icon` | `{ feature, featureIndex, section, sectionIndex }` | Optional icon markup rendered beside each feature. | +| `media` | `{ section, sectionIndex }` | Optional media panel rendered beside section copy. | diff --git a/scripts/registry-verify.ts b/scripts/registry-verify.ts index 22521ca..69804de 100644 --- a/scripts/registry-verify.ts +++ b/scripts/registry-verify.ts @@ -159,6 +159,10 @@ const expectedItems: Record = { dependencies: ["@lucide/vue"], registryDependencies: [], }, + "feature-split": { + dependencies: [], + registryDependencies: [], + }, }; if (registryIndex) {