@app-studio/web 0.9.39 → 0.9.43
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/dist/bot/Bot.d.ts +15 -0
- package/dist/bot/Cache.d.ts +13 -0
- package/dist/bot/Config.d.ts +13 -0
- package/dist/bot/ContentFetcher.d.ts +9 -0
- package/dist/bot/DocuCode.d.ts +19 -0
- package/dist/bot/FileHandler.d.ts +39 -0
- package/dist/bot/ai/AnthropicConnector.d.ts +6 -0
- package/dist/bot/ai/GeminiConnector.d.ts +7 -0
- package/dist/bot/ai/GroqConnector.d.ts +7 -0
- package/dist/bot/ai/HuggingFaceConnector.d.ts +6 -0
- package/dist/bot/ai/OpenAIConnector.d.ts +11 -0
- package/dist/bot/ai/ReplicateConnector.d.ts +7 -0
- package/dist/bot/ai/SambaNovaConnector.d.ts +6 -0
- package/dist/bot/ai/ai.config.d.ts +12 -0
- package/dist/bot/ai/ai.service.d.ts +36 -0
- package/dist/bot/data.d.ts +19 -0
- package/dist/bot/extractors.d.ts +8 -0
- package/dist/bot/index.d.ts +1 -0
- package/dist/bot/prompt/1-project.d.ts +1 -0
- package/dist/bot/prompt/2-response.d.ts +1 -0
- package/dist/bot/prompt/3-comment.d.ts +1 -0
- package/docs/components/Accordion.mdx +74 -121
- package/docs/components/Alert.mdx +18 -69
- package/docs/components/AspectRatio.mdx +11 -9
- package/docs/components/AudioInput.mdx +43 -0
- package/docs/components/Avatar.mdx +17 -42
- package/docs/components/Background.mdx +99 -491
- package/docs/components/Badge.mdx +37 -122
- package/docs/components/Button.mdx +71 -123
- package/docs/components/Calendar.mdx +7 -7
- package/docs/components/Card.mdx +238 -281
- package/docs/components/Carousel.mdx +88 -315
- package/docs/components/Center.mdx +22 -22
- package/docs/components/Chart.mdx +171 -26
- package/docs/components/ChatInput.mdx +327 -275
- package/docs/components/Checkbox.mdx +3 -5
- package/docs/components/ColorInput.mdx +10 -10
- package/docs/components/ColorPicker.mdx +452 -0
- package/docs/components/ComboBox.mdx +14 -14
- package/docs/components/Command.mdx +140 -188
- package/docs/components/ContextMenu.mdx +47 -171
- package/docs/components/CookieConsent.mdx +53 -0
- package/docs/components/CountryPicker.mdx +10 -10
- package/docs/components/DatePicker.mdx +4 -4
- package/docs/components/DragAndDrop.mdx +279 -463
- package/docs/components/Drawer.mdx +401 -100
- package/docs/components/DropdownMenu.mdx +37 -155
- package/docs/components/EmojiPicker.mdx +84 -0
- package/docs/components/File.mdx +130 -4
- package/docs/components/Flow.mdx +3 -3
- package/docs/components/Form.mdx +4 -4
- package/docs/components/Formik.mdx +41 -41
- package/docs/components/Gradient.mdx +355 -178
- package/docs/components/Horizontal.mdx +1 -2
- package/docs/components/HoverCard.mdx +57 -125
- package/docs/components/Icon.mdx +10 -10
- package/docs/components/KanbanBoard.mdx +12 -12
- package/docs/components/Label.mdx +8 -8
- package/docs/components/Link.mdx +19 -27
- package/docs/components/Loader.mdx +224 -407
- package/docs/components/Menubar.mdx +71 -67
- package/docs/components/Message.mdx +211 -526
- package/docs/components/Modal.mdx +351 -475
- package/docs/components/NavigationMenu.mdx +8 -8
- package/docs/components/OTPInput.mdx +194 -0
- package/docs/components/Pagination.mdx +451 -107
- package/docs/components/Password.mdx +8 -8
- package/docs/components/ProgressBar.mdx +460 -0
- package/docs/components/Resizable.mdx +103 -102
- package/docs/components/Select.mdx +5 -5
- package/docs/components/Separator.mdx +11 -98
- package/docs/components/ShareButton.mdx +29 -0
- package/docs/components/Sidebar.mdx +70 -131
- package/docs/components/Slider.mdx +99 -185
- package/docs/components/StatusIndicator.mdx +373 -0
- package/docs/components/Switch.mdx +3 -3
- package/docs/components/Table.mdx +25 -105
- package/docs/components/Tabs.mdx +40 -143
- package/docs/components/TagInput.mdx +32 -32
- package/docs/components/Text.mdx +3 -3
- package/docs/components/TextArea.mdx +9 -9
- package/docs/components/TextField.mdx +17 -17
- package/docs/components/Title.mdx +267 -525
- package/docs/components/Toast.mdx +65 -142
- package/docs/components/Toggle.mdx +34 -46
- package/docs/components/ToggleGroup.mdx +29 -50
- package/docs/components/Tooltip.mdx +500 -137
- package/docs/components/Tree.mdx +4 -4
- package/docs/components/Uploader.mdx +205 -351
- package/docs/components/Vertical.mdx +22 -22
- package/package.json +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +0 -35
- package/dist/components/AuthGuard/index.d.ts +0 -1
- package/docs/adk-components.md +0 -319
- package/docs/adk-quick-start.md +0 -268
|
@@ -1,522 +1,130 @@
|
|
|
1
1
|
# Background
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
No description provided.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
6
|
```tsx
|
|
7
7
|
import { Background } from '@app-studio/web';
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
### **
|
|
11
|
-
Creates a beautiful animated aurora gradient background effect.
|
|
12
|
-
|
|
13
|
-
```tsx
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import { Background } from '../Background';
|
|
16
|
-
import { Text } from 'app-studio';
|
|
17
|
-
|
|
18
|
-
export const AuroraDemo = () => (
|
|
19
|
-
<Background.Aurora height="300px" showRadialGradient={true}>
|
|
20
|
-
<Text color="white" fontSize={20}>
|
|
21
|
-
Aurora Effect Background
|
|
22
|
-
</Text>
|
|
23
|
-
</Background.Aurora>
|
|
24
|
-
);
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### **Meteors Effect**
|
|
28
|
-
Animated falling meteors effect with customizable count.
|
|
29
|
-
|
|
30
|
-
```tsx
|
|
31
|
-
import React from 'react';
|
|
32
|
-
import { Background } from '../Background';
|
|
33
|
-
import { Text } from 'app-studio';
|
|
34
|
-
|
|
35
|
-
export const MeteorsDemo = () => (
|
|
36
|
-
<Background.Meteors number={20} height="300px">
|
|
37
|
-
<Text color="white" fontSize={20}>
|
|
38
|
-
Meteors Effect Background
|
|
39
|
-
</Text>
|
|
40
|
-
</Background.Meteors>
|
|
41
|
-
);
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### **Wall Effect**
|
|
45
|
-
Interactive grid wall with hover color effects.
|
|
46
|
-
|
|
10
|
+
### **Default**
|
|
47
11
|
```tsx
|
|
48
12
|
import React from 'react';
|
|
49
|
-
import { Background } from '
|
|
50
|
-
|
|
51
|
-
export const WallDemo = () => (
|
|
52
|
-
<Background.Wall rows={15} cols={10} squareSize={40} />
|
|
53
|
-
);
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### **Particles Effect**
|
|
57
|
-
Floating animated particles with customizable shapes and colors.
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
import React from 'react';
|
|
61
|
-
import { Background } from '../Background';
|
|
62
|
-
|
|
63
|
-
export const ParticlesDemo = () => (
|
|
64
|
-
<Background.Particles
|
|
65
|
-
count={50}
|
|
66
|
-
speed="medium"
|
|
67
|
-
shapes={['circle', 'square', 'triangle']}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### **Grid Effect**
|
|
73
|
-
Animated geometric grid with pulsing cells.
|
|
74
|
-
|
|
75
|
-
```tsx
|
|
76
|
-
import React from 'react';
|
|
77
|
-
import { Background } from '../Background';
|
|
78
|
-
|
|
79
|
-
export const GridDemo = () => (
|
|
80
|
-
<Background.Grid
|
|
81
|
-
gridSize={30}
|
|
82
|
-
animationSpeed="medium"
|
|
83
|
-
/>
|
|
84
|
-
);
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### **Ripples Effect**
|
|
88
|
-
Expanding circular ripples from random points.
|
|
89
|
-
|
|
90
|
-
```tsx
|
|
91
|
-
import React from 'react';
|
|
92
|
-
import { Background } from '../Background';
|
|
93
|
-
|
|
94
|
-
export const RipplesDemo = () => (
|
|
95
|
-
<Background.Ripples
|
|
96
|
-
rippleCount={5}
|
|
97
|
-
maxSize={200}
|
|
98
|
-
frequency={3}
|
|
99
|
-
/>
|
|
100
|
-
);
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### **Background Image**
|
|
104
|
-
Display images as backgrounds with overlay support and blend modes.
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
import React from 'react';
|
|
108
|
-
import { Background } from '../Background';
|
|
109
|
-
import { Text } from 'app-studio';
|
|
110
|
-
|
|
111
|
-
export const BackgroundImageDemo = () => (
|
|
112
|
-
<Background.Image
|
|
113
|
-
src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=400&fit=crop"
|
|
114
|
-
height="300px"
|
|
115
|
-
backgroundSize="cover"
|
|
116
|
-
overlay="rgba(0,0,0,0.4)"
|
|
117
|
-
blendMode="multiply"
|
|
118
|
-
>
|
|
119
|
-
<Text color="white" fontSize={20} fontWeight="600">
|
|
120
|
-
Beautiful Image Background
|
|
121
|
-
</Text>
|
|
122
|
-
</Background.Image>
|
|
123
|
-
);
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### **Background Gradient**
|
|
127
|
-
Create beautiful gradient backgrounds with animation support.
|
|
128
|
-
|
|
129
|
-
```tsx
|
|
130
|
-
import React from 'react';
|
|
131
|
-
import { Background } from '../Background';
|
|
13
|
+
import { Background } from '@app-studio/web';
|
|
14
|
+
import { Vertical } from 'app-studio';
|
|
132
15
|
import { Text } from 'app-studio';
|
|
133
16
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
to="color.purple.500"
|
|
139
|
-
height="300px"
|
|
140
|
-
animate={true}
|
|
141
|
-
animationDuration={4}
|
|
142
|
-
>
|
|
143
|
-
<Text color="white" fontSize={20} fontWeight="600">
|
|
144
|
-
Animated Gradient
|
|
145
|
-
</Text>
|
|
146
|
-
</Background.Gradient>
|
|
147
|
-
);
|
|
148
|
-
|
|
149
|
-
// Multi-color radial gradient
|
|
150
|
-
export const RadialGradientDemo = () => (
|
|
151
|
-
<Background.Gradient
|
|
152
|
-
type="radial"
|
|
153
|
-
colors={[
|
|
154
|
-
{ color: 'color.red.500', position: '0%' },
|
|
155
|
-
{ color: 'color.orange.500', position: '50%' },
|
|
156
|
-
{ color: 'color.yellow.500', position: '100%' },
|
|
157
|
-
]}
|
|
158
|
-
height="300px"
|
|
159
|
-
shape="ellipse"
|
|
160
|
-
position="center"
|
|
161
|
-
>
|
|
162
|
-
<Text color="white" fontSize={20} fontWeight="600">
|
|
163
|
-
Radial Multi-color Gradient
|
|
17
|
+
export const DefaultDemo = () => (
|
|
18
|
+
<Vertical gap={32}>
|
|
19
|
+
<Text fontSize={16} fontWeight="600">
|
|
20
|
+
Background Component Examples
|
|
164
21
|
</Text>
|
|
165
|
-
</Background.Gradient>
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
// Conic gradient
|
|
169
|
-
export const ConicGradientDemo = () => (
|
|
170
|
-
<Background.Gradient
|
|
171
|
-
type="conic"
|
|
172
|
-
colors={[
|
|
173
|
-
{ color: 'color.blue.500', position: '0deg' },
|
|
174
|
-
{ color: 'color.green.500', position: '120deg' },
|
|
175
|
-
{ color: 'color.red.500', position: '240deg' },
|
|
176
|
-
{ color: 'color.blue.500', position: '360deg' },
|
|
177
|
-
]}
|
|
178
|
-
height="300px"
|
|
179
|
-
animate={true}
|
|
180
|
-
>
|
|
181
|
-
<Text color="white" fontSize={20} fontWeight="600">
|
|
182
|
-
Animated Conic Gradient
|
|
183
|
-
</Text>
|
|
184
|
-
</Background.Gradient>
|
|
185
|
-
);
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### **Border Moving Button**
|
|
189
|
-
Button with animated moving gradient border.
|
|
190
|
-
|
|
191
|
-
```tsx
|
|
192
|
-
import React from 'react';
|
|
193
|
-
import { Background } from '../Background';
|
|
194
|
-
|
|
195
|
-
export const BorderButtonDemo = () => (
|
|
196
|
-
<Background.BorderMovingButton
|
|
197
|
-
duration={2}
|
|
198
|
-
borderRadius={25}
|
|
199
|
-
gradientColors={['#705CFF', '#FF5C97', '#FFC75C']}
|
|
200
|
-
>
|
|
201
|
-
Click Me
|
|
202
|
-
</Background.BorderMovingButton>
|
|
203
|
-
);
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### **Animated Stroke Button**
|
|
207
|
-
Button with animated stroke effect on hover.
|
|
208
22
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
export const StrokeButtonDemo = () => (
|
|
214
|
-
<Background.AnimatedStrokeButton
|
|
215
|
-
text="Hover Me"
|
|
216
|
-
width={300}
|
|
217
|
-
height={60}
|
|
218
|
-
accentColor="color.blue.500"
|
|
219
|
-
textColor="color.gray.800"
|
|
220
|
-
onClick={() => console.log('Clicked!')}
|
|
221
|
-
/>
|
|
222
|
-
);
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
### **Combined Effects**
|
|
226
|
-
Multiple background effects can be combined for rich visual experiences.
|
|
227
|
-
|
|
228
|
-
```tsx
|
|
229
|
-
import React from 'react';
|
|
230
|
-
import { Background } from '../Background';
|
|
231
|
-
import { Text } from 'app-studio';
|
|
232
|
-
import { Vertical, Horizontal } from 'app-studio';
|
|
233
|
-
|
|
234
|
-
// Aurora with content
|
|
235
|
-
export const CombinedAuroraDemo = () => (
|
|
236
|
-
<Background.Aurora height="400px" showRadialGradient={true}>
|
|
237
|
-
<Vertical alignItems="center" gap={24}>
|
|
238
|
-
<Text color="white" fontSize={24} fontWeight="600">
|
|
239
|
-
Welcome to the Future
|
|
23
|
+
<Vertical gap={16}>
|
|
24
|
+
<Text fontSize={14} color="color.gray.600">
|
|
25
|
+
Aurora Background
|
|
240
26
|
</Text>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
<Background.AnimatedStrokeButton
|
|
248
|
-
text="Learn More"
|
|
249
|
-
accentColor="white"
|
|
250
|
-
textColor="white"
|
|
251
|
-
/>
|
|
252
|
-
</Horizontal>
|
|
27
|
+
<Background.Aurora height="200px" showRadialGradient={true}>
|
|
28
|
+
<Text color="white" fontSize={18} fontWeight="500">
|
|
29
|
+
Aurora Effect Background
|
|
30
|
+
</Text>
|
|
31
|
+
</Background.Aurora>
|
|
253
32
|
</Vertical>
|
|
254
|
-
</Background.Aurora>
|
|
255
|
-
);
|
|
256
33
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=400&fit=crop"
|
|
261
|
-
height="400px"
|
|
262
|
-
backgroundSize="cover"
|
|
263
|
-
overlay="linear-gradient(45deg, rgba(59, 130, 246, 0.8), rgba(147, 51, 234, 0.8))"
|
|
264
|
-
blendMode="overlay"
|
|
265
|
-
>
|
|
266
|
-
<Vertical alignItems="center" gap={24}>
|
|
267
|
-
<Text color="white" fontSize={28} fontWeight="700">
|
|
268
|
-
Stunning Visuals
|
|
269
|
-
</Text>
|
|
270
|
-
<Text color="white" fontSize={16} textAlign="center" maxWidth="400px">
|
|
271
|
-
Combine beautiful images with gradient overlays for captivating designs
|
|
34
|
+
<Vertical gap={16}>
|
|
35
|
+
<Text fontSize={14} color="color.gray.600">
|
|
36
|
+
Meteors Effect
|
|
272
37
|
</Text>
|
|
38
|
+
<Background.Meteors number={15} />
|
|
273
39
|
</Vertical>
|
|
274
|
-
</Background.Image>
|
|
275
|
-
);
|
|
276
40
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
from="color.indigo.900"
|
|
281
|
-
to="color.purple.900"
|
|
282
|
-
height="400px"
|
|
283
|
-
>
|
|
284
|
-
<Background.Particles
|
|
285
|
-
count={30}
|
|
286
|
-
speed="slow"
|
|
287
|
-
shapes={['circle']}
|
|
288
|
-
colors={['rgba(255,255,255,0.3)', 'rgba(147,51,234,0.5)']}
|
|
289
|
-
/>
|
|
290
|
-
<Vertical alignItems="center" gap={24} style={{ position: 'relative', zIndex: 2 }}>
|
|
291
|
-
<Text color="white" fontSize={24} fontWeight="600">
|
|
292
|
-
Layered Effects
|
|
293
|
-
</Text>
|
|
294
|
-
<Text color="white" fontSize={16} textAlign="center">
|
|
295
|
-
Gradient background with floating particles
|
|
41
|
+
<Vertical gap={16}>
|
|
42
|
+
<Text fontSize={14} color="color.gray.600">
|
|
43
|
+
Wall Effect
|
|
296
44
|
</Text>
|
|
45
|
+
<Background.Wall rows={15} cols={10} squareSize={40} />
|
|
297
46
|
</Vertical>
|
|
298
|
-
</Background.Gradient>
|
|
299
|
-
);
|
|
300
|
-
```
|
|
301
47
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
- `height?: number` - Container height
|
|
313
|
-
|
|
314
|
-
### Wall Props
|
|
315
|
-
- `rows?: number` - Number of rows in the grid (default: 15)
|
|
316
|
-
- `cols?: number` - Number of columns in the grid (default: 10)
|
|
317
|
-
- `squareSize?: number` - Size of each grid square (default: 40)
|
|
318
|
-
- `width?: number` - Container width
|
|
319
|
-
- `height?: number` - Container height
|
|
320
|
-
|
|
321
|
-
### Particles Props
|
|
322
|
-
- `count?: number` - Number of particles to display (default: 50)
|
|
323
|
-
- `colors?: string[]` - Array of particle colors (default: blue/purple/pink palette)
|
|
324
|
-
- `speed?: 'slow' | 'medium' | 'fast'` - Animation speed (default: 'medium')
|
|
325
|
-
- `shapes?: ('circle' | 'square' | 'triangle')[]` - Particle shapes (default: ['circle'])
|
|
326
|
-
- `width?: number` - Container width
|
|
327
|
-
- `height?: number` - Container height
|
|
328
|
-
|
|
329
|
-
### Grid Props
|
|
330
|
-
- `gridSize?: number` - Size of each grid cell in pixels (default: 30)
|
|
331
|
-
- `lineColor?: string` - Color of grid lines (default: 'rgba(59, 130, 246, 0.3)')
|
|
332
|
-
- `pulseColor?: string` - Color of pulsing cells (default: 'rgba(59, 130, 246, 0.8)')
|
|
333
|
-
- `animationSpeed?: 'slow' | 'medium' | 'fast'` - Speed of pulse animation (default: 'medium')
|
|
334
|
-
- `width?: number` - Container width
|
|
335
|
-
- `height?: number` - Container height
|
|
336
|
-
|
|
337
|
-
### Ripples Props
|
|
338
|
-
- `rippleCount?: number` - Number of ripple sources (default: 5)
|
|
339
|
-
- `colors?: string[]` - Array of ripple colors (default: blue/purple/pink/green palette)
|
|
340
|
-
- `maxSize?: number` - Maximum ripple size in pixels (default: 200)
|
|
341
|
-
- `frequency?: number` - Ripple generation frequency (default: 3)
|
|
342
|
-
- `width?: number` - Container width
|
|
343
|
-
- `height?: number` - Container height
|
|
344
|
-
|
|
345
|
-
### Background Image Props
|
|
346
|
-
- `src: string` - **Required.** Image source URL
|
|
347
|
-
- `backgroundSize?: string` - How the image should be sized ('cover', 'contain', 'auto', or custom) (default: 'cover')
|
|
348
|
-
- `backgroundPosition?: string` - Image position ('center', 'top', 'bottom', 'left', 'right', or custom) (default: 'center')
|
|
349
|
-
- `backgroundRepeat?: string` - Image repeat behavior ('no-repeat', 'repeat', 'repeat-x', 'repeat-y', 'space', 'round') (default: 'no-repeat')
|
|
350
|
-
- `backgroundAttachment?: string` - Scroll behavior ('scroll', 'fixed', 'local') (default: 'scroll')
|
|
351
|
-
- `imageOpacity?: number` - Image opacity (0-1) (default: 1)
|
|
352
|
-
- `overlay?: string` - Overlay color or gradient to blend with image
|
|
353
|
-
- `blendMode?: string` - CSS blend mode for overlay ('normal', 'multiply', 'screen', 'overlay', etc.) (default: 'normal')
|
|
354
|
-
- `children?: ReactNode` - Content to display over the image
|
|
355
|
-
- `width?: number` - Container width
|
|
356
|
-
- `height?: number` - Container height
|
|
357
|
-
|
|
358
|
-
### Background Gradient Props
|
|
359
|
-
*Inherits all props from the Gradient component:*
|
|
360
|
-
|
|
361
|
-
- `type?: 'linear' | 'radial' | 'conic'` - Type of gradient (default: 'linear')
|
|
362
|
-
- `direction?: string` - Direction for linear gradients ('to-right', 'to-left', 'to-bottom', 'to-top', or custom angle) (default: 'to-right')
|
|
363
|
-
- `shape?: 'circle' | 'ellipse'` - Shape for radial gradients (default: 'circle')
|
|
364
|
-
- `position?: string` - Position for radial/conic gradients ('center', 'top', 'bottom', etc.) (default: 'center')
|
|
365
|
-
- `from?: string` - Starting color for simple two-color gradients
|
|
366
|
-
- `to?: string` - Ending color for simple two-color gradients
|
|
367
|
-
- `colors?: ColorStop[]` - Array of color stops for multi-color gradients (takes precedence over from/to)
|
|
368
|
-
- `animate?: boolean` - Whether to animate the gradient (default: false)
|
|
369
|
-
- `animationDuration?: number` - Animation duration in seconds (default: 3)
|
|
370
|
-
- `children?: ReactNode` - Content to display over the gradient
|
|
371
|
-
- `width?: number` - Container width
|
|
372
|
-
- `height?: number` - Container height
|
|
373
|
-
|
|
374
|
-
#### ColorStop Interface
|
|
375
|
-
```tsx
|
|
376
|
-
interface ColorStop {
|
|
377
|
-
color: string; // Color value (supports theme colors like 'color.blue.500')
|
|
378
|
-
position?: string; // Position as percentage ('0%', '50%', '100%') or angle for conic
|
|
379
|
-
}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
### Border Moving Button Props
|
|
383
|
-
- `children: ReactNode` - Button content
|
|
384
|
-
- `duration?: number` - Animation duration in seconds (default: 2)
|
|
385
|
-
- `borderRadius?: number` - Border radius (default: 50)
|
|
386
|
-
- `gradientColors?: string[]` - Array of gradient colors
|
|
387
|
-
- `width?: number` - Button width (default: 300)
|
|
388
|
-
- `height?: number` - Button height (default: 64)
|
|
389
|
-
|
|
390
|
-
### Animated Stroke Button Props
|
|
391
|
-
- `text?: string` - Button text (default: "Learn CSS")
|
|
392
|
-
- `width?: number` - Button width (default: 300)
|
|
393
|
-
- `height?: number` - Button height (default: 60)
|
|
394
|
-
- `accentColor?: string` - Stroke color (default: "#705CFF")
|
|
395
|
-
- `textColor?: string` - Text color (default: "#333333")
|
|
396
|
-
- `href?: string` - Link URL
|
|
397
|
-
- `onClick?: () => void` - Click handler
|
|
398
|
-
|
|
399
|
-
## Usage Guide
|
|
400
|
-
|
|
401
|
-
### **Theme Integration**
|
|
402
|
-
All Background components integrate seamlessly with the app-studio theme system:
|
|
403
|
-
|
|
404
|
-
```tsx
|
|
405
|
-
// Use theme colors
|
|
406
|
-
<Background.Gradient
|
|
407
|
-
from="color.blue.500"
|
|
408
|
-
to="color.purple.500"
|
|
409
|
-
animate={true}
|
|
410
|
-
/>
|
|
411
|
-
|
|
412
|
-
// Use theme colors in overlays
|
|
413
|
-
<Background.Image
|
|
414
|
-
src="/hero-image.jpg"
|
|
415
|
-
overlay="color.gray.900"
|
|
416
|
-
imageOpacity={0.8}
|
|
417
|
-
/>
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
### **Responsive Design**
|
|
421
|
-
Background components work well with responsive layouts:
|
|
422
|
-
|
|
423
|
-
```tsx
|
|
424
|
-
// Responsive sizing
|
|
425
|
-
<Background.Image
|
|
426
|
-
src="/hero-image.jpg"
|
|
427
|
-
height={{ base: "300px", md: "400px", lg: "500px" }}
|
|
428
|
-
backgroundPosition={{ base: "center", md: "top" }}
|
|
429
|
-
/>
|
|
430
|
-
|
|
431
|
-
// Adaptive content
|
|
432
|
-
<Background.Gradient from="color.blue.500" to="color.purple.500">
|
|
433
|
-
<Vertical gap={{ base: 16, md: 24 }} alignItems="center">
|
|
434
|
-
<Text fontSize={{ base: 20, md: 24, lg: 28 }} color="white">
|
|
435
|
-
Responsive Content
|
|
436
|
-
</Text>
|
|
437
|
-
</Vertical>
|
|
438
|
-
</Background.Gradient>
|
|
439
|
-
```
|
|
440
|
-
|
|
441
|
-
### **Performance Considerations**
|
|
442
|
-
- Use appropriate image sizes and formats for Background.Image
|
|
443
|
-
- Consider using `loading="lazy"` for images below the fold
|
|
444
|
-
- Limit the number of animated particles for better performance
|
|
445
|
-
- Use CSS transforms for animations when possible
|
|
48
|
+
<Vertical gap={16}>
|
|
49
|
+
<Text fontSize={14} color="color.gray.600">
|
|
50
|
+
Particles Effect
|
|
51
|
+
</Text>
|
|
52
|
+
<Background.Particles
|
|
53
|
+
count={30}
|
|
54
|
+
speed="medium"
|
|
55
|
+
shapes={['circle', 'square']}
|
|
56
|
+
/>
|
|
57
|
+
</Vertical>
|
|
446
58
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
59
|
+
<Vertical gap={16}>
|
|
60
|
+
<Text fontSize={14} color="color.gray.600">
|
|
61
|
+
Grid Effect
|
|
62
|
+
</Text>
|
|
63
|
+
<Background.Grid gridSize={25} animationSpeed="medium" />
|
|
64
|
+
</Vertical>
|
|
452
65
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
>
|
|
459
|
-
<Text color="white" fontSize={24}>
|
|
460
|
-
High Contrast Text
|
|
461
|
-
</Text>
|
|
462
|
-
</Background.Image>
|
|
463
|
-
```
|
|
66
|
+
<Vertical gap={16}>
|
|
67
|
+
<Text fontSize={14} color="color.gray.600">
|
|
68
|
+
Ripples Effect
|
|
69
|
+
</Text>
|
|
70
|
+
<Background.Ripples rippleCount={4} maxSize={150} frequency={2} />
|
|
71
|
+
</Vertical>
|
|
464
72
|
|
|
465
|
-
|
|
73
|
+
<Vertical gap={16}>
|
|
74
|
+
<Text fontSize={14} color="color.gray.600">
|
|
75
|
+
Background Image
|
|
76
|
+
</Text>
|
|
77
|
+
<Background.Image
|
|
78
|
+
src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=400&fit=crop"
|
|
79
|
+
height="200px"
|
|
80
|
+
backgroundSize="cover"
|
|
81
|
+
overlay="rgba(0,0,0,0.3)"
|
|
82
|
+
blendMode="multiply"
|
|
83
|
+
>
|
|
84
|
+
<Text color="white" fontSize={18} fontWeight="500">
|
|
85
|
+
Image Background with Overlay
|
|
86
|
+
</Text>
|
|
87
|
+
</Background.Image>
|
|
88
|
+
</Vertical>
|
|
466
89
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
</
|
|
483
|
-
<Button variant="filled" size="lg">
|
|
484
|
-
Get Started
|
|
485
|
-
</Button>
|
|
486
|
-
</Vertical>
|
|
487
|
-
</Background.Image>
|
|
488
|
-
```
|
|
90
|
+
<Vertical gap={16}>
|
|
91
|
+
<Text fontSize={14} color="color.gray.600">
|
|
92
|
+
Background Gradient
|
|
93
|
+
</Text>
|
|
94
|
+
<Background.Gradient
|
|
95
|
+
from="color.blue.500"
|
|
96
|
+
to="color.purple.500"
|
|
97
|
+
height="200px"
|
|
98
|
+
animate={true}
|
|
99
|
+
animationDuration={4}
|
|
100
|
+
>
|
|
101
|
+
<Text color="white" fontSize={18} fontWeight="500">
|
|
102
|
+
Animated Gradient Background
|
|
103
|
+
</Text>
|
|
104
|
+
</Background.Gradient>
|
|
105
|
+
</Vertical>
|
|
489
106
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
107
|
+
<Vertical gap={16}>
|
|
108
|
+
<Text fontSize={14} color="color.gray.600">
|
|
109
|
+
Multi-color Gradient
|
|
110
|
+
</Text>
|
|
111
|
+
<Background.Gradient
|
|
112
|
+
type="radial"
|
|
113
|
+
colors={[
|
|
114
|
+
{ color: 'color.red.500', position: '0%' },
|
|
115
|
+
{ color: 'color.orange.500', position: '50%' },
|
|
116
|
+
{ color: 'color.yellow.500', position: '100%' },
|
|
117
|
+
]}
|
|
118
|
+
height="200px"
|
|
119
|
+
shape="ellipse"
|
|
120
|
+
position="top-left"
|
|
121
|
+
>
|
|
122
|
+
<Text color="white" fontSize={18} fontWeight="500">
|
|
123
|
+
Radial Multi-color Gradient
|
|
124
|
+
</Text>
|
|
125
|
+
</Background.Gradient>
|
|
126
|
+
</Vertical>
|
|
505
127
|
</Vertical>
|
|
506
|
-
|
|
128
|
+
);
|
|
507
129
|
```
|
|
508
130
|
|
|
509
|
-
#### Loading States
|
|
510
|
-
```tsx
|
|
511
|
-
<Background.Particles
|
|
512
|
-
count={20}
|
|
513
|
-
speed="medium"
|
|
514
|
-
shapes={['circle']}
|
|
515
|
-
colors={['color.blue.400', 'color.purple.400']}
|
|
516
|
-
>
|
|
517
|
-
<Vertical alignItems="center" gap={16}>
|
|
518
|
-
<Spinner size="lg" />
|
|
519
|
-
<Text>Loading...</Text>
|
|
520
|
-
</Vertical>
|
|
521
|
-
</Background.Particles>
|
|
522
|
-
```
|