diff --git a/packages/docs/content/components/hero.md b/packages/docs/content/components/hero.md index 730f526..e03fd8e 100644 --- a/packages/docs/content/components/hero.md +++ b/packages/docs/content/components/hero.md @@ -14,18 +14,19 @@ The Hoverkraft theme ships a `HoverkraftHero` component that encapsulates the br ## Props -| Prop | Type | Required | Default | Description | -| ------------------ | -------------------------- | -------- | ------------ | --------------------------------------------------- | -| `title` | `ReactNode` | ✅ | - | Main heading text | -| `description` | `ReactNode` | ❌ | - | Subheading text | -| `eyebrow` | `string` | ❌ | - | Small text above title | -| `brandedText` | `ReactNode` | ❌ | - | Deprecated: use `HoverkraftBrandHighlight` in title | -| `supportingVisual` | `ReactNode` | ❌ | - | Image or graphic to display | -| `actions` | `HoverkraftAction[]` | ❌ | - | Call-to-action buttons | -| `align` | `'left' \| 'center'` | ❌ | `'left'` | Text alignment and grid alignment | -| `tone` | `'midnight' \| 'daylight'` | ❌ | `'midnight'` | Color scheme (dark or light background) | -| `id` | `string` | ❌ | - | Optional DOM ID for deep-linking | -| `className` | `string` | ❌ | - | Extend styling with additional classes | +| Prop | Type | Required | Default | Description | +| --------------------- | -------------------------- | -------- | ------------ | --------------------------------------------------- | +| `title` | `ReactNode` | ✅ | - | Main heading text | +| `description` | `ReactNode` | ❌ | - | Subheading text | +| `eyebrow` | `string` | ❌ | - | Small text above title | +| `brandedText` | `ReactNode` | ❌ | - | Deprecated: use `HoverkraftBrandHighlight` in title | +| `supportingVisual` | `string` | ❌ | - | Path to the supporting image (e.g., `img/hero.png`) | +| `supportingVisualAlt` | `string` | ❌ | `""` | Alt text describing the supporting image | +| `actions` | `HoverkraftAction[]` | ❌ | - | Call-to-action buttons | +| `align` | `'left' \| 'center'` | ❌ | `'left'` | Text alignment and grid alignment | +| `tone` | `'midnight' \| 'daylight'` | ❌ | `'midnight'` | Color scheme (dark or light background) | +| `id` | `string` | ❌ | - | Optional DOM ID for deep-linking | +| `className` | `string` | ❌ | - | Extend styling with additional classes | ### Action Object Structure @@ -75,25 +76,7 @@ const actions = [ }, ]; -const supportingVisual = ( -
-); +const supportingVisual = "img/home.png"; render(
}
+ supportingVisual="/static/img/home.png"
+ supportingVisualAlt="Screenshot of the Hoverkraft platform"
actions={[
{ label: "Explore Projects", to: "/docs/intro", variant: "primary" },
{
@@ -77,7 +78,6 @@ export default function Home() {
/>
-
{/* Projects Grid */}
}
+ supportingVisual="img/home.png"
+ supportingVisualAlt="Illustration of the highlighted feature"
/>
>
```
diff --git a/packages/docs/src/pages/index.tsx b/packages/docs/src/pages/index.tsx
index 002bc7e..efaf2a0 100644
--- a/packages/docs/src/pages/index.tsx
+++ b/packages/docs/src/pages/index.tsx
@@ -95,12 +95,12 @@ export default function Home(): JSX.Element {