@app-studio/web 0.9.80 → 0.9.82
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/components/Accordion/Accordion/Accordion.type.d.ts +1 -1
- package/dist/components/Accordion/Accordion/Accordion.view.d.ts +1 -1
- package/dist/components/Badge/Badge/Badge.type.d.ts +1 -1
- package/dist/components/Card/Card/Card.type.d.ts +1 -1
- package/dist/components/ChatInput/ChatInput/ChatInput.type.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker/ColorPicker.type.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPicker/EmojiPicker.type.d.ts +1 -1
- package/dist/components/Form/ColorInput/ColorInput/ColorInput.type.d.ts +1 -1
- package/dist/components/Form/TagInput/TagInput/TagInput.type.d.ts +1 -1
- package/dist/components/Form/TextArea/TextArea/TextArea.type.d.ts +1 -1
- package/dist/components/Input/Input.type.d.ts +1 -1
- package/dist/components/Message/Message/Message.type.d.ts +1 -1
- package/dist/components/Modal/Modal/Modal.props.d.ts +2 -2
- package/dist/components/Slider/Slider/Slider.type.d.ts +1 -1
- package/dist/components/Title/Title/Title.props.d.ts +0 -5
- package/dist/components/Toggle/Toggle/Toggle.type.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup/ToggleGroup.type.d.ts +1 -1
- package/dist/pages/tabs.page.d.ts +1 -1
- package/dist/web.cjs.development.js +61 -77
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +61 -77
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +61 -77
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Background.mdx +133 -134
- package/docs/components/Button.mdx +154 -131
- package/docs/components/Chart.mdx +93 -368
- package/docs/components/ChatWidget.mdx +106 -0
- package/docs/components/EditComponent.mdx +76 -0
- package/docs/components/ProgressBar.mdx +77 -394
- package/docs/components/Title.mdx +102 -290
- package/package.json +1 -1
- package/docs/components/ChatInput.mdx +0 -1039
|
@@ -1,145 +1,144 @@
|
|
|
1
1
|
# Background
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A comprehensive collection of background effects, including animated particles, gradients, images, and videos.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
6
|
```tsx
|
|
7
7
|
import { Background } from '@app-studio/web';
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
### **
|
|
10
|
+
### **Aurora**
|
|
11
|
+
A smooth, flowing gradient animation resembling the northern lights.
|
|
12
|
+
|
|
13
|
+
**Props:**
|
|
14
|
+
- `showRadialGradient` (boolean): Adds a radial gradient overlay.
|
|
15
|
+
|
|
11
16
|
```tsx
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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={<Background.Overlay />}
|
|
82
|
-
blendMode="multiply"
|
|
83
|
-
>
|
|
84
|
-
<Text color="white" fontSize={18} fontWeight="500">
|
|
85
|
-
Image Background with Overlay
|
|
86
|
-
</Text>
|
|
87
|
-
</Background.Image>
|
|
88
|
-
</Vertical>
|
|
89
|
-
|
|
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>
|
|
106
|
-
|
|
107
|
-
<Vertical gap={16}>
|
|
108
|
-
<Text fontSize={14} color="color.gray.600">
|
|
109
|
-
Background Video
|
|
110
|
-
</Text>
|
|
111
|
-
<Background.Video
|
|
112
|
-
src="https://www.w3schools.com/html/mov_bbb.mp4"
|
|
113
|
-
height="200px"
|
|
114
|
-
overlay={<Background.Overlay />}
|
|
115
|
-
>
|
|
116
|
-
<Text color="white" fontSize={18} fontWeight="500">
|
|
117
|
-
Video Background
|
|
118
|
-
</Text>
|
|
119
|
-
</Background.Video>
|
|
120
|
-
</Vertical>
|
|
121
|
-
|
|
122
|
-
<Vertical gap={16}>
|
|
123
|
-
<Text fontSize={14} color="color.gray.600">
|
|
124
|
-
Multi-color Gradient
|
|
125
|
-
</Text>
|
|
126
|
-
<Background.Gradient
|
|
127
|
-
type="radial"
|
|
128
|
-
colors={[
|
|
129
|
-
{ color: 'color.red.500', position: '0%' },
|
|
130
|
-
{ color: 'color.orange.500', position: '50%' },
|
|
131
|
-
{ color: 'color.yellow.500', position: '100%' },
|
|
132
|
-
]}
|
|
133
|
-
height="200px"
|
|
134
|
-
shape="ellipse"
|
|
135
|
-
position="top-left"
|
|
136
|
-
>
|
|
137
|
-
<Text color="white" fontSize={18} fontWeight="500">
|
|
138
|
-
Radial Multi-color Gradient
|
|
139
|
-
</Text>
|
|
140
|
-
</Background.Gradient>
|
|
141
|
-
</Vertical>
|
|
142
|
-
</Vertical>
|
|
143
|
-
);
|
|
17
|
+
<Background.Aurora height="300px" showRadialGradient>
|
|
18
|
+
<Center height="100%">
|
|
19
|
+
<Title color="white">Aurora Effect</Title>
|
|
20
|
+
</Center>
|
|
21
|
+
</Background.Aurora>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### **Meteors**
|
|
25
|
+
Falling meteor effects, perfect for dark themes.
|
|
26
|
+
|
|
27
|
+
**Props:**
|
|
28
|
+
- `number` (number): Number of meteors to render.
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
<Background.Meteors number={20}>
|
|
32
|
+
<Center height="300px" backgroundColor="#0f172a">
|
|
33
|
+
<Title color="white">Meteor Shower</Title>
|
|
34
|
+
</Center>
|
|
35
|
+
</Background.Meteors>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### **Particles**
|
|
39
|
+
Interactive floating particles.
|
|
40
|
+
|
|
41
|
+
**Props:**
|
|
42
|
+
- `count` (number): Number of particles.
|
|
43
|
+
- `speed` ('slow' | 'medium' | 'fast'): Movement speed.
|
|
44
|
+
- `shapes` (Array): Shapes to use ('circle', 'square', 'triangle').
|
|
45
|
+
- `colors` (string[]): Array of colors for particles.
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<Background.Particles
|
|
49
|
+
count={50}
|
|
50
|
+
speed="slow"
|
|
51
|
+
shapes={['circle']}
|
|
52
|
+
colors={['#6366f1', '#a855f7']}
|
|
53
|
+
/>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### **Wall**
|
|
57
|
+
A grid of squares that can animate.
|
|
58
|
+
|
|
59
|
+
**Props:**
|
|
60
|
+
- `rows` (number): Number of rows.
|
|
61
|
+
- `cols` (number): Number of columns.
|
|
62
|
+
- `squareSize` (number): Size of each square.
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
<Background.Wall rows={10} cols={10} squareSize={50} />
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### **Grid**
|
|
69
|
+
A retro-style perspective grid.
|
|
70
|
+
|
|
71
|
+
**Props:**
|
|
72
|
+
- `gridSize` (number): Size of grid cells.
|
|
73
|
+
- `animationSpeed` ('slow' | 'medium' | 'fast').
|
|
74
|
+
- `lineColor` (string).
|
|
75
|
+
- `pulseColor` (string).
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
<Background.Grid gridSize={40} animationSpeed="medium" lineColor="rgba(255,255,255,0.1)" />
|
|
144
79
|
```
|
|
145
80
|
|
|
81
|
+
### **Ripples**
|
|
82
|
+
Concentric ripple animations.
|
|
83
|
+
|
|
84
|
+
**Props:**
|
|
85
|
+
- `rippleCount` (number).
|
|
86
|
+
- `maxSize` (number).
|
|
87
|
+
- `frequency` (number).
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
<Background.Ripples rippleCount={3} maxSize={300} />
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### **Image**
|
|
94
|
+
Background image with optional overlay and blend modes.
|
|
95
|
+
|
|
96
|
+
**Props:**
|
|
97
|
+
- `src` (string): Image URL.
|
|
98
|
+
- `backgroundSize`, `backgroundPosition`, `backgroundRepeat`.
|
|
99
|
+
- `overlay` (ReactNode): Content to overlay (like `<Background.Overlay />`).
|
|
100
|
+
- `blendMode` (BlendMode): CSS blend mode.
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
<Background.Image
|
|
104
|
+
src="https://example.com/bg.jpg"
|
|
105
|
+
height="400px"
|
|
106
|
+
overlay={<Background.Overlay contentPosition="center" backgroundColor="rgba(0,0,0,0.6)" />}
|
|
107
|
+
>
|
|
108
|
+
<Title color="white">Hero Section</Title>
|
|
109
|
+
</Background.Image>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### **Video**
|
|
113
|
+
Background video with auto-play support.
|
|
114
|
+
|
|
115
|
+
**Props:**
|
|
116
|
+
- `src` (string): Video URL.
|
|
117
|
+
- `autoPlay`, `loop`, `muted`, `playsInline` (boolean).
|
|
118
|
+
- `overlay` (ReactNode).
|
|
119
|
+
- `blendMode` (BlendMode).
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
<Background.Video
|
|
123
|
+
src="/assets/background.mp4"
|
|
124
|
+
height="100vh"
|
|
125
|
+
overlay={<Background.Overlay backgroundColor="rgba(0,0,0,0.4)" />}
|
|
126
|
+
>
|
|
127
|
+
<Title>Cinematic Experience</Title>
|
|
128
|
+
</Background.Video>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### **Gradient**
|
|
132
|
+
Advanced gradient backgrounds.
|
|
133
|
+
|
|
134
|
+
**Props:**
|
|
135
|
+
- Inherits `GradientProps`.
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
<Background.Gradient
|
|
139
|
+
from="color.blue.600"
|
|
140
|
+
to="color.purple.600"
|
|
141
|
+
direction="45deg"
|
|
142
|
+
height="300px"
|
|
143
|
+
/>
|
|
144
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Button
|
|
2
2
|
|
|
3
|
-
A versatile button component for user interaction with various styles, sizes, and interactive effects.
|
|
3
|
+
A versatile button component for user interaction with various styles, sizes, shapes, and interactive effects.
|
|
4
4
|
|
|
5
5
|
### **Import**
|
|
6
6
|
```tsx
|
|
@@ -17,204 +17,227 @@ export const DefaultButton = () => (
|
|
|
17
17
|
);
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
### **
|
|
21
|
-
|
|
20
|
+
### **variant**
|
|
21
|
+
Variant to define the stylistic variation of the button.
|
|
22
22
|
|
|
23
|
-
- **Type:** `
|
|
24
|
-
- **
|
|
23
|
+
- **Type:** `Variant`
|
|
24
|
+
- **Default:** `filled`
|
|
25
|
+
- **Possible Values:** `filled, outline, link, ghost, empty, subtle`
|
|
25
26
|
|
|
26
27
|
```tsx
|
|
27
28
|
import React from 'react';
|
|
28
29
|
import { Button } from '@app-studio/web';
|
|
29
30
|
import { Vertical } from 'app-studio';
|
|
31
|
+
import { Variant } from '@app-studio/web';
|
|
30
32
|
|
|
31
|
-
export const
|
|
33
|
+
export const VariantButtons = () => (
|
|
32
34
|
<Vertical gap={15}>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
{['filled', 'outline', 'link', 'ghost', 'subtle'].map((variant, index) => (
|
|
36
|
+
<Button
|
|
37
|
+
key={index}
|
|
38
|
+
variant={variant as Variant}
|
|
39
|
+
>
|
|
40
|
+
{variant}
|
|
41
|
+
</Button>
|
|
42
|
+
))}
|
|
43
|
+
<Button variant="link" to="https://google.com" isExternal>
|
|
44
|
+
External Link
|
|
41
45
|
</Button>
|
|
42
46
|
</Vertical>
|
|
43
47
|
);
|
|
44
48
|
```
|
|
45
49
|
|
|
46
|
-
### **
|
|
47
|
-
Optional
|
|
50
|
+
### **size**
|
|
51
|
+
Optional Size to specify the size of the button.
|
|
48
52
|
|
|
49
|
-
- **Type:** `
|
|
50
|
-
- **
|
|
53
|
+
- **Type:** `Size`
|
|
54
|
+
- **Default:** `md`
|
|
55
|
+
- **Possible Values:** `xs, sm, md, lg, xl`
|
|
51
56
|
|
|
52
57
|
```tsx
|
|
53
58
|
import React from 'react';
|
|
54
59
|
import { Button } from '@app-studio/web';
|
|
55
|
-
import {
|
|
56
|
-
|
|
57
|
-
import { DustBinIcon } from '@app-studio/web';
|
|
58
|
-
|
|
59
|
-
import { Shape } from '@app-studio/web';
|
|
60
|
+
import { Vertical } from 'app-studio';
|
|
61
|
+
import { Size } from '@app-studio/web';
|
|
60
62
|
|
|
61
|
-
export const
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
shape={'pillShaped' as Shape}
|
|
70
|
-
iconPosition="right"
|
|
71
|
-
>
|
|
72
|
-
Delete
|
|
73
|
-
</Button>
|
|
74
|
-
<Button icon={<DustBinIcon widthHeight={16} />} isIconRounded isAuto />
|
|
75
|
-
<Button
|
|
76
|
-
icon={<DustBinIcon widthHeight={16} />}
|
|
77
|
-
size="md"
|
|
78
|
-
iconPosition="top"
|
|
79
|
-
>
|
|
80
|
-
Delete
|
|
81
|
-
</Button>
|
|
82
|
-
<Button
|
|
83
|
-
size="md"
|
|
84
|
-
icon={<DustBinIcon widthHeight={16} />}
|
|
85
|
-
shape={'pillShaped' as Shape}
|
|
86
|
-
iconPosition="bottom"
|
|
87
|
-
>
|
|
88
|
-
Delete
|
|
89
|
-
</Button>
|
|
90
|
-
</Center>
|
|
63
|
+
export const ButtonSizes = () => (
|
|
64
|
+
<Vertical gap={10}>
|
|
65
|
+
{['xs', 'sm', 'md', 'lg', 'xl'].map((size, index) => (
|
|
66
|
+
<Button key={index} size={size as Size}>
|
|
67
|
+
Button {size.toUpperCase()}
|
|
68
|
+
</Button>
|
|
69
|
+
))}
|
|
70
|
+
</Vertical>
|
|
91
71
|
);
|
|
92
72
|
```
|
|
93
73
|
|
|
94
|
-
### **
|
|
95
|
-
Optional
|
|
74
|
+
### **shape**
|
|
75
|
+
Optional Shape to specify the border radius style of the button.
|
|
96
76
|
|
|
97
|
-
- **Type:** `
|
|
98
|
-
- **Default:** `
|
|
99
|
-
- **Possible Values:**
|
|
77
|
+
- **Type:** `Shape`
|
|
78
|
+
- **Default:** `rounded`
|
|
79
|
+
- **Possible Values:** `sharp, rounded, pillShaped`
|
|
100
80
|
|
|
101
81
|
```tsx
|
|
102
82
|
import React from 'react';
|
|
103
83
|
import { Button } from '@app-studio/web';
|
|
84
|
+
import { Horizontal } from 'app-studio';
|
|
85
|
+
import { Shape } from '@app-studio/web';
|
|
104
86
|
|
|
105
|
-
export const
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
</Button>
|
|
87
|
+
export const ShapeButtons = () => (
|
|
88
|
+
<Horizontal gap={15}>
|
|
89
|
+
{['sharp', 'rounded', 'pillShaped'].map((shape, index) => (
|
|
90
|
+
<Button key={index} shape={shape as Shape}>
|
|
91
|
+
{shape}
|
|
92
|
+
</Button>
|
|
93
|
+
))}
|
|
94
|
+
</Horizontal>
|
|
114
95
|
);
|
|
115
96
|
```
|
|
116
97
|
|
|
117
|
-
### **
|
|
118
|
-
|
|
98
|
+
### **isLoading**
|
|
99
|
+
Boolean to indicate if the button is in a loading state. Shows a loader and disables interactions.
|
|
119
100
|
|
|
120
101
|
- **Type:** `boolean`
|
|
121
102
|
- **Default:** `false`
|
|
122
|
-
- **
|
|
103
|
+
- **Related:** `loaderPosition`, `loaderProps`
|
|
123
104
|
|
|
124
105
|
```tsx
|
|
125
106
|
import React from 'react';
|
|
126
107
|
import { Button } from '@app-studio/web';
|
|
127
|
-
import {
|
|
128
|
-
|
|
129
|
-
import { Shape } from '@app-studio/web';
|
|
108
|
+
import { Vertical } from 'app-studio';
|
|
130
109
|
|
|
131
|
-
export const
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
110
|
+
export const LoadingButtons = () => (
|
|
111
|
+
<Vertical gap={15}>
|
|
112
|
+
<Button isLoading>Loading...</Button>
|
|
113
|
+
<Button isLoading loaderPosition="right">
|
|
114
|
+
Submitted
|
|
115
|
+
</Button>
|
|
116
|
+
<Button isLoading isFilled={false} variant="outline">
|
|
117
|
+
Loading Outline
|
|
118
|
+
</Button>
|
|
119
|
+
</Vertical>
|
|
139
120
|
);
|
|
140
121
|
```
|
|
141
122
|
|
|
142
|
-
### **
|
|
143
|
-
|
|
123
|
+
### **animation**
|
|
124
|
+
Apply special animation effects to the button.
|
|
144
125
|
|
|
145
|
-
- **Type:** `
|
|
146
|
-
- **
|
|
147
|
-
- **Possible Values:** `xs, sm, md, lg, xl`
|
|
126
|
+
- **Type:** `Animation`
|
|
127
|
+
- **Possible Values:** `borderMoving, animatedStroke, borderReveal`
|
|
148
128
|
|
|
149
129
|
```tsx
|
|
150
130
|
import React from 'react';
|
|
151
131
|
import { Button } from '@app-studio/web';
|
|
152
132
|
import { Vertical } from 'app-studio';
|
|
153
133
|
|
|
154
|
-
|
|
134
|
+
export const AnimatedButtons = () => (
|
|
135
|
+
<Vertical gap={15}>
|
|
136
|
+
<Button
|
|
137
|
+
animation="borderMoving"
|
|
138
|
+
borderMovingDuration={2}
|
|
139
|
+
borderMovingGradientColors={['#705CFF', '#FF5C97', '#FFC75C']}
|
|
140
|
+
>
|
|
141
|
+
Border Moving
|
|
142
|
+
</Button>
|
|
143
|
+
|
|
144
|
+
<Button
|
|
145
|
+
animation="animatedStroke"
|
|
146
|
+
variant="outline"
|
|
147
|
+
animatedStrokeAccentColor="#705CFF"
|
|
148
|
+
>
|
|
149
|
+
Animated Stroke
|
|
150
|
+
</Button>
|
|
155
151
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
))}
|
|
152
|
+
<Button
|
|
153
|
+
animation="borderReveal"
|
|
154
|
+
variant="outline"
|
|
155
|
+
>
|
|
156
|
+
Border Reveal (Hover)
|
|
157
|
+
</Button>
|
|
163
158
|
</Vertical>
|
|
164
159
|
);
|
|
165
160
|
```
|
|
166
161
|
|
|
167
|
-
### **
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
162
|
+
### **color & backgroundColor**
|
|
163
|
+
Override the main color of the button.
|
|
164
|
+
- `backgroundColor`: Sets the primary background color (filled variant).
|
|
165
|
+
- `color`: Sets the main color token used for text/borders (outline/ghost variants).
|
|
166
|
+
- `textColor`: Explicitly sets the text color.
|
|
172
167
|
|
|
173
168
|
```tsx
|
|
174
169
|
import React from 'react';
|
|
175
170
|
import { Button } from '@app-studio/web';
|
|
171
|
+
import { Horizontal } from 'app-studio';
|
|
176
172
|
|
|
177
|
-
export const
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
export const ColoredButtons = () => (
|
|
174
|
+
<Horizontal gap={15}>
|
|
175
|
+
<Button backgroundColor="#F43F5E">Custom Red</Button>
|
|
176
|
+
<Button variant="outline" color="#10B981">Custom Green</Button>
|
|
177
|
+
<Button backgroundColor="theme.primary" textColor="white">
|
|
178
|
+
Theme Primary
|
|
179
|
+
</Button>
|
|
180
|
+
</Horizontal>
|
|
181
181
|
);
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
### **
|
|
185
|
-
|
|
184
|
+
### **icon**
|
|
185
|
+
Optional React node(s) defining the icon to be displayed within the button.
|
|
186
186
|
|
|
187
|
-
- **Type:** `
|
|
188
|
-
- **
|
|
189
|
-
- **Possible Values:** `filled, outline, link, ghost, borderMoving, animatedStroke`
|
|
187
|
+
- **Type:** `React.ReactNode`
|
|
188
|
+
- **Related:** `iconPosition`, `isIconRounded`
|
|
190
189
|
|
|
191
190
|
```tsx
|
|
192
191
|
import React from 'react';
|
|
193
|
-
import { Button } from '@app-studio/web';
|
|
194
|
-
import {
|
|
192
|
+
import { Button, DustBinIcon } from '@app-studio/web';
|
|
193
|
+
import { Center } from 'app-studio';
|
|
195
194
|
|
|
196
|
-
|
|
195
|
+
export const IconButtons = () => (
|
|
196
|
+
<Center gap={15}>
|
|
197
|
+
<Button icon={<DustBinIcon widthHeight={16} />} size="md">
|
|
198
|
+
Delete
|
|
199
|
+
</Button>
|
|
200
|
+
<Button
|
|
201
|
+
size="md"
|
|
202
|
+
icon={<DustBinIcon widthHeight={16} />}
|
|
203
|
+
iconPosition="right"
|
|
204
|
+
>
|
|
205
|
+
Right Icon
|
|
206
|
+
</Button>
|
|
207
|
+
<Button icon={<DustBinIcon widthHeight={16} />} isIconRounded />
|
|
208
|
+
</Center>
|
|
209
|
+
);
|
|
210
|
+
```
|
|
197
211
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
</Button>
|
|
213
|
-
))}
|
|
214
|
-
{/* Effect variants */}
|
|
215
|
-
<Button variant="borderMoving">Border Moving Effect</Button>
|
|
216
|
-
<Button variant="animatedStroke">Animated Stroke Effect</Button>
|
|
217
|
-
</Vertical>
|
|
212
|
+
### **isDisabled**
|
|
213
|
+
Optional boolean to indicate if the button is non-interactive/disabled.
|
|
214
|
+
|
|
215
|
+
- **Type:** `boolean`
|
|
216
|
+
- **Default:** `false`
|
|
217
|
+
|
|
218
|
+
```tsx
|
|
219
|
+
import React from 'react';
|
|
220
|
+
import { Button } from '@app-studio/web';
|
|
221
|
+
|
|
222
|
+
export const DisabledButton = () => (
|
|
223
|
+
<Button isDisabled onClick={() => alert('Disabled')}>
|
|
224
|
+
Disabled
|
|
225
|
+
</Button>
|
|
218
226
|
);
|
|
219
227
|
```
|
|
220
228
|
|
|
229
|
+
### **isAuto**
|
|
230
|
+
Optional boolean indicating if the button size should automatically adjust to its content (fit-content).
|
|
231
|
+
|
|
232
|
+
- **Type:** `boolean`
|
|
233
|
+
- **Default:** `true`
|
|
234
|
+
|
|
235
|
+
### **to**
|
|
236
|
+
The destination URL or path for a link button. Renders as a `<a>` or routing link.
|
|
237
|
+
|
|
238
|
+
- **Type:** `string`
|
|
239
|
+
|
|
240
|
+
```tsx
|
|
241
|
+
<Button to="/dashboard">Go to Dashboard</Button>
|
|
242
|
+
<Button to="https://google.com" isExternal>Open Google</Button>
|
|
243
|
+
```
|