@damarkuncoro/landing-page 0.1.5 → 0.1.7

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/README.md CHANGED
@@ -22,6 +22,119 @@ Config-driven landing page library for building beautiful, responsive landing pa
22
22
  npm install @damarkuncoro/landing-page
23
23
  ```
24
24
 
25
+ ## Using "No Skin" (Base UI)
26
+
27
+ The library supports a "no skin" option that allows you to use the base UI components without any additional styling. This gives you full control over the styling through CSS or inline styles.
28
+
29
+ ### Usage
30
+
31
+ ```typescript
32
+ import { defineLandingPage } from '@damarkuncoro/landing-page'
33
+
34
+ const landingPage = defineLandingPage({
35
+ title: 'My Landing Page with Base UI',
36
+ description: 'A landing page using the base UI components',
37
+ sections: [
38
+ {
39
+ id: 'hero',
40
+ type: 'hero',
41
+ config: {
42
+ title: 'Welcome to Our Platform',
43
+ subtitle: 'Discover amazing features that will transform your workflow',
44
+ buttons: [
45
+ {
46
+ id: 'primary-button',
47
+ text: 'Get Started',
48
+ url: '/signup',
49
+ variant: 'primary',
50
+ size: 'md',
51
+ skin: 'none', // Use base UI without skin
52
+ },
53
+ {
54
+ id: 'secondary-button',
55
+ text: 'Learn More',
56
+ url: '/about',
57
+ variant: 'secondary',
58
+ size: 'md',
59
+ skin: 'none', // Use base UI without skin
60
+ },
61
+ ],
62
+ skin: 'none', // Use base UI without skin
63
+ },
64
+ },
65
+ {
66
+ id: 'features',
67
+ type: 'features',
68
+ config: {
69
+ features: [
70
+ {
71
+ id: 'feature-1',
72
+ title: 'Fast Performance',
73
+ description: 'Our platform is optimized for speed and efficiency',
74
+ },
75
+ {
76
+ id: 'feature-2',
77
+ title: 'Modern Design',
78
+ description: 'Beautiful, responsive interface that works on all devices',
79
+ },
80
+ {
81
+ id: 'feature-3',
82
+ title: 'Secure & Reliable',
83
+ description: 'Enterprise-grade security and reliability',
84
+ },
85
+ ],
86
+ skin: 'none', // Use base UI without skin
87
+ },
88
+ },
89
+ ],
90
+ })
91
+ ```
92
+
93
+ ### Customizing Base UI
94
+
95
+ When using `skin: 'none'`, you can customize the components using the `style` and `className` props:
96
+
97
+ ```typescript
98
+ const landingPage = defineLandingPage({
99
+ title: 'My Customized Landing Page',
100
+ description: 'A landing page with customized base UI components',
101
+ sections: [
102
+ {
103
+ id: 'hero',
104
+ type: 'hero',
105
+ config: {
106
+ title: 'Welcome to Our Platform',
107
+ subtitle: 'Discover amazing features that will transform your workflow',
108
+ buttons: [
109
+ {
110
+ id: 'primary-button',
111
+ text: 'Get Started',
112
+ url: '/signup',
113
+ variant: 'primary',
114
+ size: 'md',
115
+ skin: 'none',
116
+ className: 'my-custom-button', // Custom CSS class
117
+ style: {
118
+ backgroundColor: '#ff0000',
119
+ color: '#ffffff',
120
+ padding: '12px 24px',
121
+ borderRadius: '8px',
122
+ fontSize: '16px',
123
+ },
124
+ },
125
+ ],
126
+ skin: 'none',
127
+ className: 'my-custom-hero', // Custom CSS class
128
+ style: {
129
+ padding: '80px 0',
130
+ backgroundColor: '#f5f5f5',
131
+ },
132
+ },
133
+ },
134
+ ],
135
+ })
136
+ ```
137
+
25
138
  ## Quick Start
26
139
 
27
140
  1. Define your landing page configuration:
@@ -283,7 +396,7 @@ interface HeroConfig {
283
396
  video?: string
284
397
  buttons: ButtonConfig[]
285
398
  alignment?: 'left' | 'center' | 'right'
286
- skin?: 'default' | 'skin2' | 'skin3' | 'skin4' | 'skin5' | 'skin6' | 'skin7' | 'skin8'
399
+ skin?: 'default' | 'skin2' | 'skin3' | 'skin4' | 'skin5' | 'skin6' | 'skin7' | 'skin8' | 'none'
287
400
  }
288
401
 
289
402
  ### Hero Skins
@@ -6,7 +6,9 @@ interface ButtonConfig extends WithBaseConfig<{
6
6
  variant: "primary" | "secondary" | "outline" | "ghost";
7
7
  size?: "sm" | "md" | "lg";
8
8
  target?: "_blank" | "_self";
9
- skin?: "default" | "tailwind";
9
+ skin?: "default" | "tailwind" | "none";
10
+ padding?: string;
11
+ fontSize?: string;
10
12
  }> {
11
13
  }
12
14
  interface NavbarLinkConfig {
@@ -35,18 +37,14 @@ interface HeaderConfig extends WithBaseConfig<{
35
37
  logo?: string;
36
38
  title?: string;
37
39
  links: NavbarLinkConfig[];
38
- buttons?: {
39
- text: string;
40
- url: string;
41
- variant: "primary" | "secondary" | "outline" | "ghost";
42
- target?: "_blank" | "_self";
43
- }[];
40
+ buttons?: ButtonConfig[];
44
41
  fixed?: boolean;
45
42
  scrollEffect?: boolean;
46
- skin?: "default" | "tailwind";
43
+ skin?: "default" | "tailwind" | "modern" | "none";
47
44
  searchPlaceholder?: string;
48
45
  onSearch?: (query: string) => void;
49
46
  initialSearchValue?: string;
47
+ showSearchInMobileMenu?: boolean;
50
48
  languageSelector?: LanguageSelectorConfig;
51
49
  themeSwitcher?: ThemeSwitcherConfig;
52
50
  }> {
@@ -60,7 +58,7 @@ interface HeroConfig extends WithBaseConfig<{
60
58
  captionsSrc?: string;
61
59
  buttons: ButtonConfig[];
62
60
  alignment?: "left" | "center" | "right";
63
- skin?: "default" | "skin2" | "skin3" | "skin4" | "skin5" | "skin6" | "skin7" | "skin8" | "skin9" | "skin10" | "tailwind";
61
+ skin?: "default" | "skin2" | "skin3" | "skin4" | "skin5" | "skin6" | "skin7" | "skin8" | "skin9" | "skin10" | "tailwind" | "none";
64
62
  }> {
65
63
  }
66
64
  interface FeatureConfig extends WithBaseConfig<{
@@ -68,7 +66,7 @@ interface FeatureConfig extends WithBaseConfig<{
68
66
  description: string;
69
67
  icon?: string;
70
68
  image?: string;
71
- skin?: "default" | "tailwind";
69
+ skin?: "default" | "tailwind" | "none";
72
70
  }> {
73
71
  }
74
72
  interface TestimonialConfig extends WithBaseConfig<{
@@ -89,6 +87,7 @@ interface PricingConfig extends WithBaseConfig<{
89
87
  button: ButtonConfig;
90
88
  featured?: boolean;
91
89
  }[];
90
+ skin?: "default" | "tailwind" | "none";
92
91
  }> {
93
92
  }
94
93
  interface FooterConfig extends WithBaseConfig<{
@@ -109,6 +108,7 @@ interface FooterConfig extends WithBaseConfig<{
109
108
  icon?: string;
110
109
  }[];
111
110
  copyright?: string;
111
+ skin?: "default" | "tailwind" | "none";
112
112
  }> {
113
113
  }
114
114
  interface CtaConfig extends WithBaseConfig<{
@@ -116,6 +116,7 @@ interface CtaConfig extends WithBaseConfig<{
116
116
  description: string;
117
117
  button: ButtonConfig;
118
118
  image?: string;
119
+ skin?: "default" | "tailwind" | "none";
119
120
  }> {
120
121
  }
121
122
  interface StatConfig extends WithBaseConfig<{
@@ -132,6 +133,7 @@ interface FaqConfig extends WithBaseConfig<{
132
133
  question: string;
133
134
  answer: string;
134
135
  }[];
136
+ skin?: "default" | "tailwind" | "none";
135
137
  }> {
136
138
  }
137
139
 
@@ -285,20 +287,24 @@ interface FeaturesSection extends BaseSectionConfig {
285
287
  type: "features";
286
288
  config: {
287
289
  features: FeatureConfig[];
290
+ skin?: "default" | "tailwind" | "none";
288
291
  };
289
292
  }
290
293
  declare function createFeaturesSection(config: {
291
294
  features: FeatureConfig[];
295
+ skin?: "default" | "tailwind" | "none";
292
296
  }, id?: string, className?: string): FeaturesSection;
293
297
 
294
298
  interface TestimonialsSection extends BaseSectionConfig {
295
299
  type: "testimonials";
296
300
  config: {
297
301
  testimonials: TestimonialConfig[];
302
+ skin?: "default" | "tailwind" | "none";
298
303
  };
299
304
  }
300
305
  declare function createTestimonialsSection(config: {
301
306
  testimonials: TestimonialConfig[];
307
+ skin?: "default" | "tailwind" | "none";
302
308
  }, id?: string, className?: string): TestimonialsSection;
303
309
 
304
310
  interface PricingSection extends BaseSectionConfig {
@@ -323,10 +329,12 @@ interface StatsSection extends BaseSectionConfig {
323
329
  type: "stats";
324
330
  config: {
325
331
  stats: StatConfig[];
332
+ skin?: "default" | "tailwind" | "none";
326
333
  };
327
334
  }
328
335
  declare function createStatsSection(config: {
329
336
  stats: StatConfig[];
337
+ skin?: "default" | "tailwind" | "none";
330
338
  }, id?: string, className?: string): StatsSection;
331
339
 
332
340
  interface FaqSection extends BaseSectionConfig {
@@ -975,6 +983,9 @@ declare const sectionConfigSchemas: {
975
983
  initialSearchValue: {
976
984
  type: string;
977
985
  };
986
+ showSearchInMobileMenu: {
987
+ type: string;
988
+ };
978
989
  languageSelector: {
979
990
  type: string;
980
991
  properties: {