@damarkuncoro/landing-page 0.1.5 → 0.1.6

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
@@ -7,6 +7,8 @@ interface ButtonConfig extends WithBaseConfig<{
7
7
  size?: "sm" | "md" | "lg";
8
8
  target?: "_blank" | "_self";
9
9
  skin?: "default" | "tailwind";
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
43
  skin?: "default" | "tailwind";
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
  }> {
@@ -975,6 +973,9 @@ declare const sectionConfigSchemas: {
975
973
  initialSearchValue: {
976
974
  type: string;
977
975
  };
976
+ showSearchInMobileMenu: {
977
+ type: string;
978
+ };
978
979
  languageSelector: {
979
980
  type: string;
980
981
  properties: {