@zoyth/simple-site-framework 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +572 -0
- package/bin/create-simple-site.js +390 -0
- package/bin/simple-site.js +664 -0
- package/dist/client.js +135 -0
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +107 -0
- package/dist/client.mjs.map +1 -0
- package/dist/components/index.d.mts +3936 -0
- package/dist/components/index.d.ts +3936 -0
- package/dist/components/index.js +38265 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +38173 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/config/index.d.mts +298 -0
- package/dist/config/index.d.ts +298 -0
- package/dist/config/index.js +19 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.mjs +1 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/index.d.mts +2184 -0
- package/dist/index.d.ts +2184 -0
- package/dist/index.js +1713 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1605 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/i18n/index.js +665 -0
- package/dist/lib/i18n/index.js.map +1 -0
- package/dist/lib/i18n/index.mjs +621 -0
- package/dist/lib/i18n/index.mjs.map +1 -0
- package/docs/DOCUMENTATION-STRUCTURE.md +1156 -0
- package/docs/EXPORTS.md +125 -0
- package/docs/PERFORMANCE.md +757 -0
- package/docs/POLICY-PAGES.md +867 -0
- package/docs/ROADMAP.md +334 -0
- package/docs/SEO.md +455 -0
- package/docs/SITEMAP.md +708 -0
- package/docs/STRUCTURED-DATA.md +671 -0
- package/docs/accessibility/common-patterns.md +529 -0
- package/docs/accessibility/keyboard-navigation.md +263 -0
- package/docs/accessibility/overview.md +122 -0
- package/docs/accessibility/screen-readers.md +311 -0
- package/docs/accessibility/wcag-compliance.md +159 -0
- package/docs/api/README.md +164 -0
- package/docs/api/components/Accessibility.md +356 -0
- package/docs/api/components/Button.md +240 -0
- package/docs/api/components/HeroSection.md +306 -0
- package/docs/architecture/decisions.md +449 -0
- package/docs/components/AnalyticsTracker.md +58 -0
- package/docs/components/AnimatedCounter.md +48 -0
- package/docs/components/AnimatedSection.md +56 -0
- package/docs/components/BlogCard.md +42 -0
- package/docs/components/Checkbox.md +56 -0
- package/docs/components/CodeBlock.md +52 -0
- package/docs/components/ComparisonTable.md +40 -0
- package/docs/components/ComponentDemo.md +38 -0
- package/docs/components/CountdownTimer.md +51 -0
- package/docs/components/ExitIntentModal.md +56 -0
- package/docs/components/FAQAccordion.md +66 -0
- package/docs/components/FeaturesGrid.md +55 -0
- package/docs/components/FileUpload.md +54 -0
- package/docs/components/I18nMetaTags.md +55 -0
- package/docs/components/Icon.md +53 -0
- package/docs/components/LazySection.md +46 -0
- package/docs/components/LiveProof.md +53 -0
- package/docs/components/LoadingSpinner.md +46 -0
- package/docs/components/MultiStepForm.md +48 -0
- package/docs/components/PolicyLayout.md +55 -0
- package/docs/components/PricingTable.md +49 -0
- package/docs/components/Radio.md +59 -0
- package/docs/components/SEOMetaTags.md +58 -0
- package/docs/components/ScriptInjector.md +50 -0
- package/docs/components/Select.md +72 -0
- package/docs/components/Skeleton.md +47 -0
- package/docs/components/StatsSection.md +48 -0
- package/docs/components/StickyBar.md +62 -0
- package/docs/components/StructuredData.md +99 -0
- package/docs/components/StyleGuide.md +46 -0
- package/docs/components/TableOfContents.md +47 -0
- package/docs/components/TestimonialCarousel.md +42 -0
- package/docs/components/Timeline.md +51 -0
- package/docs/components/Toast.md +59 -0
- package/docs/components/TrackedLink.md +62 -0
- package/docs/components/TrustBadges.md +44 -0
- package/docs/components/conversion/MobileCTA.md +363 -0
- package/docs/components/forms/ContactForm.md +75 -0
- package/docs/components/forms/FormField.md +74 -0
- package/docs/components/layout/Footer.md +601 -0
- package/docs/components/layout/Header.md +549 -0
- package/docs/components/layout/LanguageSelector.md +54 -0
- package/docs/components/layout/LanguageSwitcher.md +24 -0
- package/docs/components/overview.md +447 -0
- package/docs/components/sections/AboutSection.md +48 -0
- package/docs/components/sections/CTASection.md +596 -0
- package/docs/components/sections/CaseStudySection.md +47 -0
- package/docs/components/sections/ContactSection.md +599 -0
- package/docs/components/sections/FeatureSection.md +44 -0
- package/docs/components/sections/HeroSection.md +404 -0
- package/docs/components/sections/LogosSection.md +47 -0
- package/docs/components/sections/PersonalTaxesSection.md +23 -0
- package/docs/components/sections/RecruitingSection.md +23 -0
- package/docs/components/sections/SecurePortalSection.md +23 -0
- package/docs/components/sections/ServicePageLayout.md +52 -0
- package/docs/components/sections/ServicesSection.md +49 -0
- package/docs/components/sections/TestimonialSection.md +44 -0
- package/docs/components/sections/WhyChooseUsSection.md +54 -0
- package/docs/components/ui/Breadcrumb.md +70 -0
- package/docs/components/ui/Button.md +514 -0
- package/docs/components/ui/Card.md +501 -0
- package/docs/components/ui/Input.md +54 -0
- package/docs/components/ui/MobileLinks.md +43 -0
- package/docs/components/ui/Modal.md +60 -0
- package/docs/components/ui/Tabs.md +62 -0
- package/docs/components/ui/Textarea.md +52 -0
- package/docs/core-concepts/configuration-driven.md +552 -0
- package/docs/core-concepts/overview.md +351 -0
- package/docs/features/accessibility/README.md +73 -0
- package/docs/features/accessibility/aria-support.md +177 -0
- package/docs/features/accessibility/color-contrast.md +155 -0
- package/docs/features/accessibility/focus-management.md +187 -0
- package/docs/features/accessibility/testing.md +196 -0
- package/docs/features/analytics/README.md +51 -0
- package/docs/features/analytics/ab-testing.md +171 -0
- package/docs/features/analytics/conversion-tracking.md +207 -0
- package/docs/features/analytics/custom-events.md +219 -0
- package/docs/features/analytics/privacy.md +198 -0
- package/docs/features/analytics/setup.md +114 -0
- package/docs/features/analytics/tracking-events.md +224 -0
- package/docs/features/i18n/README.md +51 -0
- package/docs/features/i18n/best-practices.md +273 -0
- package/docs/features/i18n/configuration.md +84 -0
- package/docs/features/i18n/formatting.md +133 -0
- package/docs/features/i18n/locale-detection.md +122 -0
- package/docs/features/i18n/routing.md +99 -0
- package/docs/features/i18n/rtl-support.md +191 -0
- package/docs/features/i18n/translations.md +129 -0
- package/docs/features/internationalization.md +595 -0
- package/docs/features/performance/README.md +77 -0
- package/docs/features/performance/bundle-size.md +134 -0
- package/docs/features/performance/caching.md +131 -0
- package/docs/features/performance/code-splitting.md +121 -0
- package/docs/features/performance/image-optimization.md +110 -0
- package/docs/features/performance/lazy-loading.md +92 -0
- package/docs/features/performance/monitoring.md +148 -0
- package/docs/features/seo/README.md +51 -0
- package/docs/features/seo/best-practices.md +184 -0
- package/docs/features/seo/canonical-urls.md +182 -0
- package/docs/features/seo/meta-tags.md +126 -0
- package/docs/features/seo/open-graph.md +166 -0
- package/docs/features/seo/robots-txt.md +146 -0
- package/docs/features/seo/sitemaps.md +162 -0
- package/docs/features/seo/structured-data.md +166 -0
- package/docs/getting-started/installation.md +292 -0
- package/docs/getting-started/introduction.md +195 -0
- package/docs/getting-started/quick-start.md +460 -0
- package/docs/guides/analytics-setup.md +616 -0
- package/docs/i18n/CONFIGURATION.md +353 -0
- package/docs/i18n/EXAMPLES.md +402 -0
- package/docs/i18n/MIGRATION.md +260 -0
- package/docs/i18n/SEO.md +392 -0
- package/docs/i18n/STATIC-GENERATION-FIX.md +71 -0
- package/docs/migration/changelog.md +136 -0
- package/docs/migration/overview.md +233 -0
- package/docs/recipes/adding-animations.md +475 -0
- package/docs/recipes/forms-with-validation.md +393 -0
- package/package.json +152 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
# Components Overview
|
|
2
|
+
|
|
3
|
+
Simple Site Framework provides 35+ production-ready components organized into logical categories.
|
|
4
|
+
|
|
5
|
+
## Component Categories
|
|
6
|
+
|
|
7
|
+
### Layout Components
|
|
8
|
+
|
|
9
|
+
Persistent elements that structure your site:
|
|
10
|
+
|
|
11
|
+
- **[Header](./layout/Header.md)** - Navigation bar with logo, menu, and CTA
|
|
12
|
+
- **[Footer](./layout/Footer.md)** - Site footer with links, social media, legal
|
|
13
|
+
- **[LanguageSelector](./layout/LanguageSelector.md)** - Language switcher (dropdown or toggle)
|
|
14
|
+
|
|
15
|
+
### Section Components
|
|
16
|
+
|
|
17
|
+
Complete, full-width page sections:
|
|
18
|
+
|
|
19
|
+
- **[HeroSection](./sections/HeroSection.md)** - Above-the-fold hero banner
|
|
20
|
+
- **[AboutSection](./sections/AboutSection.md)** - Company story, team, statistics
|
|
21
|
+
- **[ServicesSection](./sections/ServicesSection.md)** - Service offerings grid
|
|
22
|
+
- **[TestimonialSection](./sections/TestimonialSection.md)** - Customer testimonials
|
|
23
|
+
- **[ContactSection](./sections/ContactSection.md)** - Contact form with location info
|
|
24
|
+
- **[ServicePageLayout](./sections/ServicePageLayout.md)** - Individual service page layout
|
|
25
|
+
|
|
26
|
+
### UI Components
|
|
27
|
+
|
|
28
|
+
Building blocks for custom layouts:
|
|
29
|
+
|
|
30
|
+
- **[Button](./ui/Button.md)** - Themeable button with multiple variants
|
|
31
|
+
- **[Card](./ui/Card.md)** - Container with shadow, border, and padding
|
|
32
|
+
- **[Input](./ui/Input.md)** - Text input with validation states
|
|
33
|
+
- **[Textarea](./ui/Textarea.md)** - Multi-line text input
|
|
34
|
+
- **[Breadcrumb](./ui/Breadcrumb.md)** - Navigation breadcrumb trail
|
|
35
|
+
- **[Modal](./ui/Modal.md)** - Accessible dialog component
|
|
36
|
+
- **[Tabs](./ui/Tabs.md)** - Tabbed content interface
|
|
37
|
+
- **[Select](./ui/Select.md)** - Dropdown select input
|
|
38
|
+
|
|
39
|
+
### Form Components
|
|
40
|
+
|
|
41
|
+
Production-ready forms with validation:
|
|
42
|
+
|
|
43
|
+
- **[ContactForm](./forms/ContactForm.md)** - Complete contact form with React Hook Form + Zod
|
|
44
|
+
- **[FormField](./forms/FormField.md)** - Individual form field with label, error, help text
|
|
45
|
+
- **[Checkbox](./forms/Checkbox.md)** - Checkbox input with label
|
|
46
|
+
- **[Radio](./forms/Radio.md)** - Radio button input
|
|
47
|
+
|
|
48
|
+
### Conversion Components
|
|
49
|
+
|
|
50
|
+
Specialized components for improving conversion rates:
|
|
51
|
+
|
|
52
|
+
- **[MobileCTA](./conversion/MobileCTA.md)** - Sticky mobile CTA (scroll-triggered)
|
|
53
|
+
- **[CTASection](./conversion/CTASection.md)** - Full-width call-to-action section
|
|
54
|
+
- **[LiveProof](./conversion/LiveProof.md)** - Social proof notification system
|
|
55
|
+
|
|
56
|
+
### Accessibility Components
|
|
57
|
+
|
|
58
|
+
WCAG 2.1 AA compliant accessibility helpers:
|
|
59
|
+
|
|
60
|
+
- **[SkipLink](./accessibility/SkipLink.md)** - Skip to main content link
|
|
61
|
+
- **[A11yAnnouncer](./accessibility/A11yAnnouncer.md)** - Screen reader announcements
|
|
62
|
+
- **[FormFieldARIA](./accessibility/FormFieldARIA.md)** - ARIA-enhanced form field wrapper
|
|
63
|
+
- **[CheckboxGroupARIA](./accessibility/CheckboxGroupARIA.md)** - ARIA-enhanced checkbox group
|
|
64
|
+
- **[RadioGroupARIA](./accessibility/RadioGroupARIA.md)** - ARIA-enhanced radio group
|
|
65
|
+
|
|
66
|
+
### Utility Components
|
|
67
|
+
|
|
68
|
+
Helper components for specific functionality:
|
|
69
|
+
|
|
70
|
+
- **[AnalyticsTracker](./utilities/AnalyticsTracker.md)** - Page view and scroll tracking
|
|
71
|
+
- **[TrackedLink](./utilities/TrackedLink.md)** - Link with analytics tracking
|
|
72
|
+
- **[LazySection](./utilities/LazySection.md)** - Lazy-load sections below the fold
|
|
73
|
+
- **[CodeBlock](./utilities/CodeBlock.md)** - Syntax-highlighted code display
|
|
74
|
+
- **[Icon](./utilities/Icon.md)** - Icon component with built-in icons
|
|
75
|
+
- **[FeaturesGrid](./utilities/FeaturesGrid.md)** - Grid of features with icons
|
|
76
|
+
|
|
77
|
+
## Import Paths
|
|
78
|
+
|
|
79
|
+
### Server-Safe Components (Default Export)
|
|
80
|
+
|
|
81
|
+
Most components are server-safe and imported from the main package:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import {
|
|
85
|
+
HeroSection,
|
|
86
|
+
AboutSection,
|
|
87
|
+
ServicesSection,
|
|
88
|
+
TestimonialSection,
|
|
89
|
+
ContactSection,
|
|
90
|
+
CTASection,
|
|
91
|
+
Header,
|
|
92
|
+
Footer,
|
|
93
|
+
Button,
|
|
94
|
+
Card,
|
|
95
|
+
Input,
|
|
96
|
+
FormField,
|
|
97
|
+
FeaturesGrid,
|
|
98
|
+
} from '@zoyth/simple-site-framework';
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Client-Only Components (`/client` Export)
|
|
102
|
+
|
|
103
|
+
Components using browser APIs or React hooks must be imported from `/client`:
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
import {
|
|
107
|
+
AnalyticsTracker,
|
|
108
|
+
MobileCTA,
|
|
109
|
+
getABTestVariant,
|
|
110
|
+
trackABTestEvent,
|
|
111
|
+
} from '@zoyth/simple-site-framework/client';
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Why separate?** Next.js Server Components require explicit client boundaries. Separating client-only code prevents accidental server-side usage and keeps your server bundles small.
|
|
115
|
+
|
|
116
|
+
See **[Server/Client Split](../core-concepts/server-client-split.md)** for details.
|
|
117
|
+
|
|
118
|
+
## Component Patterns
|
|
119
|
+
|
|
120
|
+
### All Components Support
|
|
121
|
+
|
|
122
|
+
#### 1. Custom Styling
|
|
123
|
+
|
|
124
|
+
Every component accepts a `className` prop for custom styling:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
<HeroSection
|
|
128
|
+
heading="Welcome"
|
|
129
|
+
className="bg-gradient-to-r from-blue-600 to-purple-600"
|
|
130
|
+
/>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The framework uses `cn()` utility (clsx + tailwind-merge) to merge classes intelligently.
|
|
134
|
+
|
|
135
|
+
#### 2. Responsive Design
|
|
136
|
+
|
|
137
|
+
All components are mobile-first and responsive by default:
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
<FeaturesGrid
|
|
141
|
+
features={features}
|
|
142
|
+
columns={3} // 3 columns on desktop, auto-adjusts for mobile
|
|
143
|
+
/>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
No additional configuration needed.
|
|
147
|
+
|
|
148
|
+
#### 3. Type Safety
|
|
149
|
+
|
|
150
|
+
Full TypeScript support with exported prop types:
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
import type { HeroSectionProps, ButtonProps, CardProps } from '@zoyth/simple-site-framework';
|
|
154
|
+
|
|
155
|
+
const heroProps: HeroSectionProps = {
|
|
156
|
+
heading: 'Welcome',
|
|
157
|
+
description: '...',
|
|
158
|
+
};
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### 4. Accessibility
|
|
162
|
+
|
|
163
|
+
All components are WCAG 2.1 AA compliant:
|
|
164
|
+
|
|
165
|
+
- Semantic HTML
|
|
166
|
+
- Proper ARIA attributes
|
|
167
|
+
- Keyboard navigation
|
|
168
|
+
- Focus management
|
|
169
|
+
- Screen reader support
|
|
170
|
+
|
|
171
|
+
No additional configuration required.
|
|
172
|
+
|
|
173
|
+
## Component Variants
|
|
174
|
+
|
|
175
|
+
Many components support variants for different visual styles:
|
|
176
|
+
|
|
177
|
+
### Button Variants
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
<Button variant="filled" /> // Solid background
|
|
181
|
+
<Button variant="outline" /> // Border only
|
|
182
|
+
<Button variant="ghost" /> // Transparent
|
|
183
|
+
<Button variant="link" /> // Text link style
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Hero Variants
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
<HeroSection variant="centered" /> // Centered text, CTA below
|
|
190
|
+
<HeroSection variant="split" /> // Image on left, content on right
|
|
191
|
+
<HeroSection variant="minimal" /> // Simplified version
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Card Variants
|
|
195
|
+
|
|
196
|
+
```typescript
|
|
197
|
+
<Card variant="default" /> // Standard card
|
|
198
|
+
<Card variant="bordered" /> // With border
|
|
199
|
+
<Card variant="elevated" /> // With shadow
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Composition Patterns
|
|
203
|
+
|
|
204
|
+
### Pattern 1: Full-Page Sections
|
|
205
|
+
|
|
206
|
+
Stack sections to build complete pages:
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
export default function HomePage() {
|
|
210
|
+
return (
|
|
211
|
+
<main>
|
|
212
|
+
<HeroSection {...heroProps} />
|
|
213
|
+
<FeaturesGrid {...featuresProps} />
|
|
214
|
+
<TestimonialSection {...testimonialProps} />
|
|
215
|
+
<CTASection {...ctaProps} />
|
|
216
|
+
</main>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Pattern 2: Layout Wrapping
|
|
222
|
+
|
|
223
|
+
Wrap pages with consistent layout:
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
export default function RootLayout({ children }) {
|
|
227
|
+
return (
|
|
228
|
+
<html>
|
|
229
|
+
<body>
|
|
230
|
+
<Header {...headerProps} />
|
|
231
|
+
{children}
|
|
232
|
+
<Footer {...footerProps} />
|
|
233
|
+
</body>
|
|
234
|
+
</html>
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Pattern 3: Conditional Rendering
|
|
240
|
+
|
|
241
|
+
Show components based on conditions:
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
{user.isPremium && (
|
|
245
|
+
<CTASection
|
|
246
|
+
heading="Upgrade Available"
|
|
247
|
+
primaryCTA={{ text: 'Upgrade Now', href: '/upgrade' }}
|
|
248
|
+
/>
|
|
249
|
+
)}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Pattern 4: Dynamic Content
|
|
253
|
+
|
|
254
|
+
Load content from CMS or API:
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
export default async function DynamicPage({ params }) {
|
|
258
|
+
const content = await fetchPageContent(params.slug);
|
|
259
|
+
|
|
260
|
+
return (
|
|
261
|
+
<>
|
|
262
|
+
<HeroSection {...content.hero} />
|
|
263
|
+
<AboutSection {...content.about} />
|
|
264
|
+
</>
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Component Organization
|
|
270
|
+
|
|
271
|
+
### By Feature
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
src/app/
|
|
275
|
+
features/
|
|
276
|
+
page.tsx # <FeaturesGrid />
|
|
277
|
+
pricing/
|
|
278
|
+
page.tsx # <PricingSection />
|
|
279
|
+
about/
|
|
280
|
+
page.tsx # <AboutSection />
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### By Content Type
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
src/app/
|
|
287
|
+
services/
|
|
288
|
+
[slug]/
|
|
289
|
+
page.tsx # <ServicePageLayout />
|
|
290
|
+
blog/
|
|
291
|
+
[slug]/
|
|
292
|
+
page.tsx # <BlogPost />
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Mixed Approach
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
src/app/
|
|
299
|
+
page.tsx # Homepage with multiple sections
|
|
300
|
+
about/
|
|
301
|
+
page.tsx # About page with AboutSection
|
|
302
|
+
services/
|
|
303
|
+
page.tsx # Services listing with ServicesSection
|
|
304
|
+
[slug]/
|
|
305
|
+
page.tsx # Individual service with ServicePageLayout
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Performance Considerations
|
|
309
|
+
|
|
310
|
+
### Code Splitting
|
|
311
|
+
|
|
312
|
+
The framework automatically code-splits:
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
// Heavy dependencies only loaded when used
|
|
316
|
+
import { LazySection } from '@zoyth/simple-site-framework';
|
|
317
|
+
|
|
318
|
+
<LazySection>
|
|
319
|
+
<TestimonialSection {...props} />
|
|
320
|
+
</LazySection>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Server Components
|
|
324
|
+
|
|
325
|
+
Most components are server components by default:
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
// Server-rendered, no client JavaScript
|
|
329
|
+
<HeroSection heading="Welcome" />
|
|
330
|
+
|
|
331
|
+
// Only ships client code for interactivity
|
|
332
|
+
<ContactForm onSubmit={handleSubmit} />
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Lazy Loading
|
|
336
|
+
|
|
337
|
+
Images and assets are automatically optimized:
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
<HeroSection
|
|
341
|
+
backgroundImage="/hero.jpg" // Next.js Image optimization applied
|
|
342
|
+
/>
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## Common Props
|
|
346
|
+
|
|
347
|
+
Many components share common props:
|
|
348
|
+
|
|
349
|
+
### Locale
|
|
350
|
+
|
|
351
|
+
For internationalized content:
|
|
352
|
+
|
|
353
|
+
```typescript
|
|
354
|
+
<HeroSection
|
|
355
|
+
heading={{ en: 'Welcome', fr: 'Bienvenue' }}
|
|
356
|
+
locale="fr" // Displays French content
|
|
357
|
+
/>
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### ClassName
|
|
361
|
+
|
|
362
|
+
For custom styling:
|
|
363
|
+
|
|
364
|
+
```typescript
|
|
365
|
+
<Button className="my-custom-class" />
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### MaxWidth
|
|
369
|
+
|
|
370
|
+
To constrain content width:
|
|
371
|
+
|
|
372
|
+
```typescript
|
|
373
|
+
<HeroSection
|
|
374
|
+
heading="Welcome"
|
|
375
|
+
maxWidth="xl" // max-w-xl container
|
|
376
|
+
/>
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Variant
|
|
380
|
+
|
|
381
|
+
For visual variations:
|
|
382
|
+
|
|
383
|
+
```typescript
|
|
384
|
+
<Card variant="elevated" />
|
|
385
|
+
<Button variant="outline" />
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
## Component Status
|
|
389
|
+
|
|
390
|
+
### Production-Ready ✅
|
|
391
|
+
|
|
392
|
+
These components are battle-tested in production:
|
|
393
|
+
|
|
394
|
+
- HeroSection
|
|
395
|
+
- ContactSection
|
|
396
|
+
- Header
|
|
397
|
+
- Footer
|
|
398
|
+
- Button
|
|
399
|
+
- Card
|
|
400
|
+
- Input
|
|
401
|
+
- FormField
|
|
402
|
+
- ContactForm
|
|
403
|
+
- MobileCTA
|
|
404
|
+
- CTASection
|
|
405
|
+
- LiveProof
|
|
406
|
+
|
|
407
|
+
### Beta 🧪
|
|
408
|
+
|
|
409
|
+
Fully functional but less battle-tested:
|
|
410
|
+
|
|
411
|
+
- ServicePageLayout
|
|
412
|
+
- AboutSection
|
|
413
|
+
- ServicesSection
|
|
414
|
+
- TestimonialSection
|
|
415
|
+
|
|
416
|
+
### Experimental ⚠️
|
|
417
|
+
|
|
418
|
+
API may change:
|
|
419
|
+
|
|
420
|
+
- A/B testing utilities
|
|
421
|
+
- Advanced animations
|
|
422
|
+
- Form builders
|
|
423
|
+
|
|
424
|
+
## Next Steps
|
|
425
|
+
|
|
426
|
+
### Explore Specific Components
|
|
427
|
+
|
|
428
|
+
- **[HeroSection](./sections/HeroSection.md)** - Most commonly used component
|
|
429
|
+
- **[ContactForm](./forms/ContactForm.md)** - Essential for lead generation
|
|
430
|
+
- **[Button](./ui/Button.md)** - Fundamental building block
|
|
431
|
+
- **[MobileCTA](./conversion/MobileCTA.md)** - Improve mobile conversions
|
|
432
|
+
|
|
433
|
+
### Learn Concepts
|
|
434
|
+
|
|
435
|
+
- **[Configuration-Driven](../core-concepts/configuration-driven.md)** - How to configure components
|
|
436
|
+
- **[Server/Client Split](../core-concepts/server-client-split.md)** - Understanding imports
|
|
437
|
+
- **[Theme System](../core-concepts/theme-system.md)** - Customize appearance
|
|
438
|
+
|
|
439
|
+
### See Examples
|
|
440
|
+
|
|
441
|
+
- **[Landing Page Example](../examples/landing-page-simple.md)** - Complete page using multiple components
|
|
442
|
+
- **[Multi-Language Site](../examples/multi-language-site.md)** - Internationalization in action
|
|
443
|
+
- **[Service Site](../examples/service-site.md)** - Professional services website
|
|
444
|
+
|
|
445
|
+
## Component Reference
|
|
446
|
+
|
|
447
|
+
For complete API documentation, see individual component pages or the **[API Reference](../api/components.md)**.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# AboutSection
|
|
2
|
+
|
|
3
|
+
Company story, team, and statistics section.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { AboutSection } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<AboutSection
|
|
17
|
+
heading="About Our Company"
|
|
18
|
+
story="Founded in 2010, we've helped over 500 businesses transform their operations..."
|
|
19
|
+
team={[
|
|
20
|
+
{
|
|
21
|
+
name: 'John Doe',
|
|
22
|
+
role: 'CEO',
|
|
23
|
+
bio: 'Former consultant at McKinsey...',
|
|
24
|
+
image: '/team/john.jpg',
|
|
25
|
+
},
|
|
26
|
+
]}
|
|
27
|
+
stats={[
|
|
28
|
+
{ value: '500+', label: 'Clients Served' },
|
|
29
|
+
{ value: '15', label: 'Years Experience' },
|
|
30
|
+
]}
|
|
31
|
+
/>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Props
|
|
35
|
+
|
|
36
|
+
| Prop | Type | Required | Description |
|
|
37
|
+
|------|------|----------|-------------|
|
|
38
|
+
| `heading` | `string \| LocalizedString` | Yes | Section heading |
|
|
39
|
+
| `story` | `string \| LocalizedString` | No | Company story |
|
|
40
|
+
| `team` | `TeamMember[]` | No | Team members |
|
|
41
|
+
| `stats` | `Stat[]` | No | Statistics |
|
|
42
|
+
| `className` | `string` | No | Custom classes |
|
|
43
|
+
| `locale` | `string` | No | Current locale |
|
|
44
|
+
|
|
45
|
+
## See Also
|
|
46
|
+
|
|
47
|
+
- [HeroSection](./HeroSection.md)
|
|
48
|
+
- [StatsSection](../StatsSection.md)
|