@@ -14,18 +14,19 @@ The Hoverkraft theme ships a `HoverkraftHero` component that encapsulates the br
1414
1515## Props
1616
17- | Prop | Type | Required | Default | Description |
18- | ------------------ | -------------------------- | -------- | ------------ | --------------------------------------------------- |
19- | ` title ` | ` ReactNode ` | ✅ | - | Main heading text |
20- | ` description ` | ` ReactNode ` | ❌ | - | Subheading text |
21- | ` eyebrow ` | ` string ` | ❌ | - | Small text above title |
22- | ` brandedText ` | ` ReactNode ` | ❌ | - | Deprecated: use ` HoverkraftBrandHighlight ` in title |
23- | ` supportingVisual ` | ` ReactNode ` | ❌ | - | Image or graphic to display |
24- | ` actions ` | ` HoverkraftAction[] ` | ❌ | - | Call-to-action buttons |
25- | ` align ` | ` 'left' \| 'center' ` | ❌ | ` 'left' ` | Text alignment and grid alignment |
26- | ` tone ` | ` 'midnight' \| 'daylight' ` | ❌ | ` 'midnight' ` | Color scheme (dark or light background) |
27- | ` id ` | ` string ` | ❌ | - | Optional DOM ID for deep-linking |
28- | ` className ` | ` string ` | ❌ | - | Extend styling with additional classes |
17+ | Prop | Type | Required | Default | Description |
18+ | --------------------- | -------------------------- | -------- | ------------ | --------------------------------------------------- |
19+ | ` title ` | ` ReactNode ` | ✅ | - | Main heading text |
20+ | ` description ` | ` ReactNode ` | ❌ | - | Subheading text |
21+ | ` eyebrow ` | ` string ` | ❌ | - | Small text above title |
22+ | ` brandedText ` | ` ReactNode ` | ❌ | - | Deprecated: use ` HoverkraftBrandHighlight ` in title |
23+ | ` supportingVisual ` | ` string ` | ❌ | - | Path to the supporting image (e.g., ` img/hero.png ` ) |
24+ | ` supportingVisualAlt ` | ` string ` | ❌ | ` "" ` | Alt text describing the supporting image |
25+ | ` actions ` | ` HoverkraftAction[] ` | ❌ | - | Call-to-action buttons |
26+ | ` align ` | ` 'left' \| 'center' ` | ❌ | ` 'left' ` | Text alignment and grid alignment |
27+ | ` tone ` | ` 'midnight' \| 'daylight' ` | ❌ | ` 'midnight' ` | Color scheme (dark or light background) |
28+ | ` id ` | ` string ` | ❌ | - | Optional DOM ID for deep-linking |
29+ | ` className ` | ` string ` | ❌ | - | Extend styling with additional classes |
2930
3031### Action Object Structure
3132
@@ -75,25 +76,7 @@ const actions = [
7576 },
7677];
7778
78- const supportingVisual = (
79- <div
80- style = { {
81- display: " grid" ,
82- placeItems: " center" ,
83- width: " 100%" ,
84- aspectRatio: " 4 / 3" ,
85- borderRadius: " 1rem" ,
86- background:
87- " radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 55%), linear-gradient(135deg, #1b2735, #090a0f)" ,
88- color: " #fff" ,
89- fontWeight: 600 ,
90- fontSize: " 1.15rem" ,
91- }}
92- aria-hidden = " true"
93- >
94- Midnight tone
95- </div >
96- );
79+ const supportingVisual = " img/home.png" ;
9780
9881render (
9982 <HoverkraftHero
@@ -108,6 +91,7 @@ render(
10891 tone = " midnight"
10992 align = " center"
11093 supportingVisual = { supportingVisual }
94+ supportingVisualAlt = " Screenshot of Hoverkraft shown in midnight tone"
11195 id = " hero-midnight"
11296 />
11397);
@@ -121,25 +105,7 @@ const actions = [
121105 { label: " Configuration" , to: " /docs/configuration" , variant: " secondary" },
122106];
123107
124- const supportingVisual = (
125- <div
126- style = { {
127- display: " grid" ,
128- placeItems: " center" ,
129- width: " 100%" ,
130- aspectRatio: " 4 / 3" ,
131- borderRadius: " 1rem" ,
132- background:
133- " radial-gradient(circle at 60% 30%, rgba(20, 60, 120, 0.15), transparent 55%), linear-gradient(135deg, #f6f8fb, #ffffff)" ,
134- color: " #1c2738" ,
135- fontWeight: 600 ,
136- fontSize: " 1.15rem" ,
137- }}
138- aria-hidden = " true"
139- >
140- Daylight tone
141- </div >
142- );
108+ const supportingVisual = " img/home.png" ;
143109
144110render (
145111 <HoverkraftHero
@@ -155,6 +121,7 @@ render(
155121 tone = " daylight"
156122 align = " left"
157123 supportingVisual = { supportingVisual }
124+ supportingVisualAlt = " Screenshot of Hoverkraft shown in daylight tone"
158125 id = " hero-daylight"
159126 />
160127);
0 commit comments