@farzadbagheri/fb-components 0.1.0 → 0.1.4
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/COMPONENTS.md +1101 -0
- package/EXAMPLES.md +1064 -0
- package/LICENSE +20 -20
- package/README.md +744 -131
- package/dist/ai.cjs +3 -3
- package/dist/ai.css.map +1 -1
- package/dist/ai.js +1 -1
- package/dist/backgrounds.cjs +7 -7
- package/dist/backgrounds.css.map +1 -1
- package/dist/backgrounds.js +1 -1
- package/dist/buttons.cjs +4 -4
- package/dist/buttons.css.map +1 -1
- package/dist/buttons.js +1 -1
- package/dist/{chunk-MKCSRMHF.cjs → chunk-4YAFXF3T.cjs} +2 -2
- package/dist/chunk-4YAFXF3T.cjs.map +1 -0
- package/dist/{chunk-H2AV67DY.cjs → chunk-7PUXKRNW.cjs} +7 -5
- package/dist/chunk-7PUXKRNW.cjs.map +1 -0
- package/dist/{chunk-CTD2GDO6.cjs → chunk-B5HDPUQK.cjs} +2 -2
- package/dist/chunk-B5HDPUQK.cjs.map +1 -0
- package/dist/{chunk-K5QRX5CZ.js → chunk-ENCZZRVK.js} +2 -2
- package/dist/chunk-ENCZZRVK.js.map +1 -0
- package/dist/{chunk-H6Y3EJPA.cjs → chunk-F4XFUSPM.cjs} +2 -2
- package/dist/chunk-F4XFUSPM.cjs.map +1 -0
- package/dist/{chunk-4FWJRWS5.cjs → chunk-HPWZ5OL2.cjs} +2 -2
- package/dist/chunk-HPWZ5OL2.cjs.map +1 -0
- package/dist/{chunk-JHOJY54P.js → chunk-HSY72AJ4.js} +2 -2
- package/dist/chunk-HSY72AJ4.js.map +1 -0
- package/dist/{chunk-R2F3FTBL.js → chunk-IZJHBS5M.js} +2 -2
- package/dist/chunk-IZJHBS5M.js.map +1 -0
- package/dist/{chunk-T7CC3CLH.js → chunk-J4ZYYB2O.js} +2 -2
- package/dist/chunk-J4ZYYB2O.js.map +1 -0
- package/dist/{chunk-C3ASXASL.cjs → chunk-MWSE4C6T.cjs} +2 -2
- package/dist/chunk-MWSE4C6T.cjs.map +1 -0
- package/dist/{chunk-WDUETPNG.js → chunk-P77GGWU6.js} +7 -5
- package/dist/chunk-P77GGWU6.js.map +1 -0
- package/dist/{chunk-ROKPXWY2.cjs → chunk-QTX5BFS6.cjs} +2 -2
- package/dist/chunk-QTX5BFS6.cjs.map +1 -0
- package/dist/{chunk-YQSTEIU5.js → chunk-RFI4526D.js} +2 -2
- package/dist/chunk-RFI4526D.js.map +1 -0
- package/dist/{chunk-BSEOOGOV.cjs → chunk-SS4GAAED.cjs} +2 -2
- package/dist/chunk-SS4GAAED.cjs.map +1 -0
- package/dist/{chunk-UWQ5QNE3.cjs → chunk-TG7XM34D.cjs} +2 -2
- package/dist/chunk-TG7XM34D.cjs.map +1 -0
- package/dist/{chunk-EIE6FLCL.js → chunk-VODRAWMB.js} +2 -2
- package/dist/chunk-VODRAWMB.js.map +1 -0
- package/dist/{chunk-RUSFF3MZ.js → chunk-XJGKXWK3.js} +2 -2
- package/dist/chunk-XJGKXWK3.js.map +1 -0
- package/dist/{chunk-JWV3IITG.js → chunk-YPBGV2B5.js} +2 -2
- package/dist/chunk-YPBGV2B5.js.map +1 -0
- package/dist/data.cjs +4 -4
- package/dist/data.css.map +1 -1
- package/dist/data.d.cts +2 -1
- package/dist/data.d.ts +2 -1
- package/dist/data.js +1 -1
- package/dist/heroes.cjs +2 -2
- package/dist/heroes.css.map +1 -1
- package/dist/heroes.js +1 -1
- package/dist/index.cjs +31 -31
- package/dist/index.css.map +1 -1
- package/dist/index.js +9 -9
- package/dist/landing.cjs +2 -2
- package/dist/landing.css.map +1 -1
- package/dist/landing.js +1 -1
- package/dist/motion.cjs +3 -3
- package/dist/motion.css.map +1 -1
- package/dist/motion.js +1 -1
- package/dist/text.cjs +3 -3
- package/dist/text.css.map +1 -1
- package/dist/text.js +1 -1
- package/dist/ui.cjs +3 -3
- package/dist/ui.css.map +1 -1
- package/dist/ui.js +1 -1
- package/package.json +167 -134
- package/dist/chunk-4FWJRWS5.cjs.map +0 -1
- package/dist/chunk-BSEOOGOV.cjs.map +0 -1
- package/dist/chunk-C3ASXASL.cjs.map +0 -1
- package/dist/chunk-CTD2GDO6.cjs.map +0 -1
- package/dist/chunk-EIE6FLCL.js.map +0 -1
- package/dist/chunk-H2AV67DY.cjs.map +0 -1
- package/dist/chunk-H6Y3EJPA.cjs.map +0 -1
- package/dist/chunk-JHOJY54P.js.map +0 -1
- package/dist/chunk-JWV3IITG.js.map +0 -1
- package/dist/chunk-K5QRX5CZ.js.map +0 -1
- package/dist/chunk-MKCSRMHF.cjs.map +0 -1
- package/dist/chunk-R2F3FTBL.js.map +0 -1
- package/dist/chunk-ROKPXWY2.cjs.map +0 -1
- package/dist/chunk-RUSFF3MZ.js.map +0 -1
- package/dist/chunk-T7CC3CLH.js.map +0 -1
- package/dist/chunk-UWQ5QNE3.cjs.map +0 -1
- package/dist/chunk-WDUETPNG.js.map +0 -1
- package/dist/chunk-YQSTEIU5.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,131 +1,744 @@
|
|
|
1
|
-
FB Components
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
1
|
+
# FB Components
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@farzadbagheri/fb-components)
|
|
4
|
+
[](https://www.npmjs.com/package/@farzadbagheri/fb-components)
|
|
5
|
+
[](https://github.com/BAGHERIFarzad/fb-components/actions/workflows/ci.yml)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
[](https://react.dev/)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
|
|
11
|
+
**Production-minded React components for motion, AI interfaces, modern landing pages, data visualization, and polished product experiences.**
|
|
12
|
+
|
|
13
|
+
FB Components is a modern React component library built for polished product interfaces. It includes reusable components with TypeScript declarations, ESM/CommonJS builds, category-based entry points, and category-specific CSS so you can import only what you need.
|
|
14
|
+
|
|
15
|
+
## Documentation
|
|
16
|
+
|
|
17
|
+
- [Component API Reference](./COMPONENTS.md)
|
|
18
|
+
- [Usage Examples](./EXAMPLES.md)
|
|
19
|
+
- [Development Guide](./DEVELOPMENT.md)
|
|
20
|
+
- [Contributing](./CONTRIBUTING.md)
|
|
21
|
+
- [Release Guide](./RELEASING.md)
|
|
22
|
+
- [Security Policy](./SECURITY.md)
|
|
23
|
+
|
|
24
|
+
- **npm:** `@farzadbagheri/fb-components`
|
|
25
|
+
- **Current release:** `0.1.3`
|
|
26
|
+
- **Website:** https://farzadbagheri.fr/en/components
|
|
27
|
+
- **GitHub:** https://github.com/BAGHERIFarzad/fb-components
|
|
28
|
+
- **License:** MIT
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Highlights
|
|
33
|
+
|
|
34
|
+
- 22 free React components
|
|
35
|
+
- React 18 and React 19 support
|
|
36
|
+
- TypeScript declarations included
|
|
37
|
+
- ESM and CommonJS builds
|
|
38
|
+
- Tree-shaking-friendly JavaScript exports
|
|
39
|
+
- Category-based imports
|
|
40
|
+
- Category-specific CSS exports
|
|
41
|
+
- Root convenience import
|
|
42
|
+
- Modern UI, motion, AI, data, hero, landing, and background components
|
|
43
|
+
- Accessibility-conscious APIs
|
|
44
|
+
- Automated release validation
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install @farzadbagheri/fb-components
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Requirements:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
React >=18 <20
|
|
58
|
+
React DOM >=18 <20
|
|
59
|
+
Node >=18
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`lucide-react` is installed automatically as a package dependency.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Recommended usage
|
|
67
|
+
|
|
68
|
+
For the smallest CSS footprint, import from a category entry point:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { GlowButton } from "@farzadbagheri/fb-components/buttons";
|
|
72
|
+
import "@farzadbagheri/fb-components/buttons.css";
|
|
73
|
+
|
|
74
|
+
export function Example() {
|
|
75
|
+
return <GlowButton>Launch</GlowButton>;
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This is the recommended pattern when you only need components from one category.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Convenience usage
|
|
84
|
+
|
|
85
|
+
You can also import from the root package:
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
import { GlowButton } from "@farzadbagheri/fb-components";
|
|
89
|
+
import "@farzadbagheri/fb-components/styles.css";
|
|
90
|
+
|
|
91
|
+
export function Example() {
|
|
92
|
+
return <GlowButton>Launch</GlowButton>;
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The root JavaScript entry remains tree-shaking friendly, while `styles.css` includes the complete stylesheet bundle.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Component catalog
|
|
101
|
+
|
|
102
|
+
FB Components currently includes **22 free public components** across nine categories.
|
|
103
|
+
|
|
104
|
+
| Category | Components |
|
|
105
|
+
|---|---|
|
|
106
|
+
| Backgrounds | PredictiveArc, SignalParticles, DotMatrix, GradientMesh, AuroraGrid, NoiseField |
|
|
107
|
+
| Buttons | MagneticButton, GlowButton, GlassButton |
|
|
108
|
+
| Text | RevealText, BlurReveal |
|
|
109
|
+
| UI | SpotlightCard, GlassCard |
|
|
110
|
+
| Motion | GlowCursor, MagneticCursor |
|
|
111
|
+
| AI | AiPromptBox, StreamingResponse |
|
|
112
|
+
| Heroes | SaasLaunchHero |
|
|
113
|
+
| Landing | StartupLanding |
|
|
114
|
+
| Data | AnimatedCounter, RadialProgress, MetricGrid |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Backgrounds
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
import {
|
|
122
|
+
PredictiveArc,
|
|
123
|
+
SignalParticles,
|
|
124
|
+
DotMatrix,
|
|
125
|
+
GradientMesh,
|
|
126
|
+
AuroraGrid,
|
|
127
|
+
NoiseField,
|
|
128
|
+
} from "@farzadbagheri/fb-components/backgrounds";
|
|
129
|
+
|
|
130
|
+
import "@farzadbagheri/fb-components/backgrounds.css";
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Available components:
|
|
134
|
+
|
|
135
|
+
- `PredictiveArc`
|
|
136
|
+
- `SignalParticles`
|
|
137
|
+
- `DotMatrix`
|
|
138
|
+
- `GradientMesh`
|
|
139
|
+
- `AuroraGrid`
|
|
140
|
+
- `NoiseField`
|
|
141
|
+
|
|
142
|
+
Example:
|
|
143
|
+
|
|
144
|
+
```tsx
|
|
145
|
+
<PredictiveArc
|
|
146
|
+
color="#9b7cff"
|
|
147
|
+
size={70}
|
|
148
|
+
thickness={3}
|
|
149
|
+
glow={16}
|
|
150
|
+
/>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Buttons
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
import {
|
|
159
|
+
MagneticButton,
|
|
160
|
+
GlowButton,
|
|
161
|
+
GlassButton,
|
|
162
|
+
} from "@farzadbagheri/fb-components/buttons";
|
|
163
|
+
|
|
164
|
+
import "@farzadbagheri/fb-components/buttons.css";
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Available components:
|
|
168
|
+
|
|
169
|
+
- `MagneticButton`
|
|
170
|
+
- `GlowButton`
|
|
171
|
+
- `GlassButton`
|
|
172
|
+
|
|
173
|
+
Example:
|
|
174
|
+
|
|
175
|
+
```tsx
|
|
176
|
+
<GlassButton
|
|
177
|
+
tint="#9b7cff"
|
|
178
|
+
opacity={0.12}
|
|
179
|
+
blur={18}
|
|
180
|
+
>
|
|
181
|
+
Explore
|
|
182
|
+
</GlassButton>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Text animation
|
|
188
|
+
|
|
189
|
+
```tsx
|
|
190
|
+
import {
|
|
191
|
+
RevealText,
|
|
192
|
+
BlurReveal,
|
|
193
|
+
} from "@farzadbagheri/fb-components/text";
|
|
194
|
+
|
|
195
|
+
import "@farzadbagheri/fb-components/text.css";
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Available components:
|
|
199
|
+
|
|
200
|
+
- `RevealText`
|
|
201
|
+
- `BlurReveal`
|
|
202
|
+
|
|
203
|
+
Example:
|
|
204
|
+
|
|
205
|
+
```tsx
|
|
206
|
+
<RevealText>
|
|
207
|
+
Build better interfaces.
|
|
208
|
+
</RevealText>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## UI
|
|
214
|
+
|
|
215
|
+
```tsx
|
|
216
|
+
import {
|
|
217
|
+
SpotlightCard,
|
|
218
|
+
GlassCard,
|
|
219
|
+
} from "@farzadbagheri/fb-components/ui";
|
|
220
|
+
|
|
221
|
+
import "@farzadbagheri/fb-components/ui.css";
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Available components:
|
|
225
|
+
|
|
226
|
+
- `SpotlightCard`
|
|
227
|
+
- `GlassCard`
|
|
228
|
+
|
|
229
|
+
Example:
|
|
230
|
+
|
|
231
|
+
```tsx
|
|
232
|
+
<SpotlightCard>
|
|
233
|
+
<h3>AI Platform</h3>
|
|
234
|
+
<p>Build modern AI experiences.</p>
|
|
235
|
+
</SpotlightCard>
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Motion
|
|
241
|
+
|
|
242
|
+
```tsx
|
|
243
|
+
import {
|
|
244
|
+
GlowCursor,
|
|
245
|
+
MagneticCursor,
|
|
246
|
+
} from "@farzadbagheri/fb-components/motion";
|
|
247
|
+
|
|
248
|
+
import "@farzadbagheri/fb-components/motion.css";
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Available components:
|
|
252
|
+
|
|
253
|
+
- `GlowCursor`
|
|
254
|
+
- `MagneticCursor`
|
|
255
|
+
|
|
256
|
+
Example:
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
<MagneticCursor>
|
|
260
|
+
<button
|
|
261
|
+
type="button"
|
|
262
|
+
data-magnetic-target
|
|
263
|
+
>
|
|
264
|
+
Explore
|
|
265
|
+
</button>
|
|
266
|
+
</MagneticCursor>
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## AI
|
|
272
|
+
|
|
273
|
+
```tsx
|
|
274
|
+
import {
|
|
275
|
+
AiPromptBox,
|
|
276
|
+
StreamingResponse,
|
|
277
|
+
} from "@farzadbagheri/fb-components/ai";
|
|
278
|
+
|
|
279
|
+
import "@farzadbagheri/fb-components/ai.css";
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Available components:
|
|
283
|
+
|
|
284
|
+
- `AiPromptBox`
|
|
285
|
+
- `StreamingResponse`
|
|
286
|
+
|
|
287
|
+
Example:
|
|
288
|
+
|
|
289
|
+
```tsx
|
|
290
|
+
<AiPromptBox
|
|
291
|
+
modelLabel="FB AI · Fast"
|
|
292
|
+
placeholder="Describe your task"
|
|
293
|
+
onSubmit={(value) => {
|
|
294
|
+
console.log(value);
|
|
295
|
+
}}
|
|
296
|
+
/>
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Heroes
|
|
302
|
+
|
|
303
|
+
```tsx
|
|
304
|
+
import { SaasLaunchHero } from "@farzadbagheri/fb-components/heroes";
|
|
305
|
+
import "@farzadbagheri/fb-components/heroes.css";
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Available component:
|
|
309
|
+
|
|
310
|
+
- `SaasLaunchHero`
|
|
311
|
+
|
|
312
|
+
Example:
|
|
313
|
+
|
|
314
|
+
```tsx
|
|
315
|
+
<SaasLaunchHero
|
|
316
|
+
eyebrow="BUILT FOR MODERN TEAMS"
|
|
317
|
+
title={"Ship faster.\nScale smarter."}
|
|
318
|
+
primaryLabel="Start free"
|
|
319
|
+
secondaryLabel="See demo"
|
|
320
|
+
/>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Landing
|
|
326
|
+
|
|
327
|
+
```tsx
|
|
328
|
+
import { StartupLanding } from "@farzadbagheri/fb-components/landing";
|
|
329
|
+
import "@farzadbagheri/fb-components/landing.css";
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Available component:
|
|
333
|
+
|
|
334
|
+
- `StartupLanding`
|
|
335
|
+
|
|
336
|
+
Example:
|
|
337
|
+
|
|
338
|
+
```tsx
|
|
339
|
+
<StartupLanding
|
|
340
|
+
accent="#7d63ff"
|
|
341
|
+
showMetrics
|
|
342
|
+
showFeatures
|
|
343
|
+
/>
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## Data
|
|
349
|
+
|
|
350
|
+
```tsx
|
|
351
|
+
import {
|
|
352
|
+
AnimatedCounter,
|
|
353
|
+
RadialProgress,
|
|
354
|
+
MetricGrid,
|
|
355
|
+
} from "@farzadbagheri/fb-components/data";
|
|
356
|
+
|
|
357
|
+
import "@farzadbagheri/fb-components/data.css";
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Available components:
|
|
361
|
+
|
|
362
|
+
- `AnimatedCounter`
|
|
363
|
+
- `RadialProgress`
|
|
364
|
+
- `MetricGrid`
|
|
365
|
+
|
|
366
|
+
Examples:
|
|
367
|
+
|
|
368
|
+
```tsx
|
|
369
|
+
<AnimatedCounter
|
|
370
|
+
value={128}
|
|
371
|
+
suffix="K"
|
|
372
|
+
label="ACTIVE USERS"
|
|
373
|
+
delta="+18.4%"
|
|
374
|
+
/>
|
|
375
|
+
|
|
376
|
+
<RadialProgress
|
|
377
|
+
value={72}
|
|
378
|
+
label="COMPLETE"
|
|
379
|
+
ariaLabel="Profile completion"
|
|
380
|
+
/>
|
|
381
|
+
|
|
382
|
+
<MetricGrid />
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## All root exports
|
|
388
|
+
|
|
389
|
+
The root entry exports all 22 free components:
|
|
390
|
+
|
|
391
|
+
```tsx
|
|
392
|
+
import {
|
|
393
|
+
AiPromptBox,
|
|
394
|
+
AnimatedCounter,
|
|
395
|
+
AuroraGrid,
|
|
396
|
+
BlurReveal,
|
|
397
|
+
DotMatrix,
|
|
398
|
+
GlassButton,
|
|
399
|
+
GlassCard,
|
|
400
|
+
GlowButton,
|
|
401
|
+
GlowCursor,
|
|
402
|
+
GradientMesh,
|
|
403
|
+
MagneticButton,
|
|
404
|
+
MagneticCursor,
|
|
405
|
+
MetricGrid,
|
|
406
|
+
NoiseField,
|
|
407
|
+
PredictiveArc,
|
|
408
|
+
RadialProgress,
|
|
409
|
+
RevealText,
|
|
410
|
+
SaasLaunchHero,
|
|
411
|
+
SignalParticles,
|
|
412
|
+
SpotlightCard,
|
|
413
|
+
StartupLanding,
|
|
414
|
+
StreamingResponse,
|
|
415
|
+
} from "@farzadbagheri/fb-components";
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Package entry points
|
|
421
|
+
|
|
422
|
+
| Category | JavaScript import | CSS import |
|
|
423
|
+
|---|---|---|
|
|
424
|
+
| Root | `@farzadbagheri/fb-components` | `@farzadbagheri/fb-components/styles.css` |
|
|
425
|
+
| Backgrounds | `@farzadbagheri/fb-components/backgrounds` | `@farzadbagheri/fb-components/backgrounds.css` |
|
|
426
|
+
| Buttons | `@farzadbagheri/fb-components/buttons` | `@farzadbagheri/fb-components/buttons.css` |
|
|
427
|
+
| Text | `@farzadbagheri/fb-components/text` | `@farzadbagheri/fb-components/text.css` |
|
|
428
|
+
| UI | `@farzadbagheri/fb-components/ui` | `@farzadbagheri/fb-components/ui.css` |
|
|
429
|
+
| Motion | `@farzadbagheri/fb-components/motion` | `@farzadbagheri/fb-components/motion.css` |
|
|
430
|
+
| AI | `@farzadbagheri/fb-components/ai` | `@farzadbagheri/fb-components/ai.css` |
|
|
431
|
+
| Heroes | `@farzadbagheri/fb-components/heroes` | `@farzadbagheri/fb-components/heroes.css` |
|
|
432
|
+
| Landing | `@farzadbagheri/fb-components/landing` | `@farzadbagheri/fb-components/landing.css` |
|
|
433
|
+
| Data | `@farzadbagheri/fb-components/data` | `@farzadbagheri/fb-components/data.css` |
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## CSS strategy
|
|
438
|
+
|
|
439
|
+
FB Components does **not** automatically inject the complete stylesheet when you import JavaScript.
|
|
440
|
+
|
|
441
|
+
### Category CSS — recommended
|
|
442
|
+
|
|
443
|
+
```tsx
|
|
444
|
+
import { GlowButton } from "@farzadbagheri/fb-components/buttons";
|
|
445
|
+
import "@farzadbagheri/fb-components/buttons.css";
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
Use this when you want a smaller CSS footprint.
|
|
449
|
+
|
|
450
|
+
### Full stylesheet
|
|
451
|
+
|
|
452
|
+
```tsx
|
|
453
|
+
import { GlowButton } from "@farzadbagheri/fb-components";
|
|
454
|
+
import "@farzadbagheri/fb-components/styles.css";
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
Use this when you prefer convenience or are using components across several categories.
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## TypeScript
|
|
462
|
+
|
|
463
|
+
Type declarations are included with the package. No separate `@types` package is required.
|
|
464
|
+
|
|
465
|
+
```tsx
|
|
466
|
+
import { RadialProgress } from "@farzadbagheri/fb-components/data";
|
|
467
|
+
import "@farzadbagheri/fb-components/data.css";
|
|
468
|
+
|
|
469
|
+
export function ProgressExample() {
|
|
470
|
+
return (
|
|
471
|
+
<RadialProgress
|
|
472
|
+
value={72}
|
|
473
|
+
ariaLabel="Profile completion"
|
|
474
|
+
/>
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## React compatibility
|
|
482
|
+
|
|
483
|
+
Supported versions:
|
|
484
|
+
|
|
485
|
+
```text
|
|
486
|
+
React 18
|
|
487
|
+
React 19
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Peer dependency range:
|
|
491
|
+
|
|
492
|
+
```text
|
|
493
|
+
>=18 <20
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
FB Components uses standard React APIs and can be integrated into Vite, React Router applications, Next.js client components, and other standard React build systems.
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
500
|
+
## ESM and CommonJS
|
|
501
|
+
|
|
502
|
+
### ESM
|
|
503
|
+
|
|
504
|
+
```ts
|
|
505
|
+
import { GlowButton } from "@farzadbagheri/fb-components/buttons";
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### CommonJS
|
|
509
|
+
|
|
510
|
+
```js
|
|
511
|
+
const { GlowButton } = require("@farzadbagheri/fb-components/buttons");
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
## Tree shaking
|
|
517
|
+
|
|
518
|
+
FB Components is built with category entry points and tree-shaking-friendly JavaScript output.
|
|
519
|
+
|
|
520
|
+
For performance-oriented applications, prefer:
|
|
521
|
+
|
|
522
|
+
```tsx
|
|
523
|
+
import { GlowButton } from "@farzadbagheri/fb-components/buttons";
|
|
524
|
+
import "@farzadbagheri/fb-components/buttons.css";
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
This avoids importing unrelated category CSS.
|
|
528
|
+
|
|
529
|
+
The root JavaScript entry can still be tree-shaken by modern bundlers, while the root stylesheet intentionally contains styles for all categories.
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
## Accessibility
|
|
534
|
+
|
|
535
|
+
Accessibility is treated as part of the public component API.
|
|
536
|
+
|
|
537
|
+
Examples include:
|
|
538
|
+
|
|
539
|
+
- semantic native buttons
|
|
540
|
+
- explicit button types
|
|
541
|
+
- progressbar ARIA semantics
|
|
542
|
+
- descriptive labels where required
|
|
543
|
+
- decorative elements hidden from assistive technology
|
|
544
|
+
- keyboard-compatible native controls
|
|
545
|
+
- accessibility-focused automated tests
|
|
546
|
+
|
|
547
|
+
Applications should still test complete pages in their own accessibility context.
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
## Testing and quality
|
|
552
|
+
|
|
553
|
+
The public component library is covered by automated tests across:
|
|
554
|
+
|
|
555
|
+
- rendering
|
|
556
|
+
- component props
|
|
557
|
+
- interactions
|
|
558
|
+
- keyboard behavior
|
|
559
|
+
- visual configuration
|
|
560
|
+
- accessibility
|
|
561
|
+
- public exports
|
|
562
|
+
- animation behavior
|
|
563
|
+
- lifecycle cleanup
|
|
564
|
+
- edge cases
|
|
565
|
+
- fresh package installation
|
|
566
|
+
|
|
567
|
+
The project also validates:
|
|
568
|
+
|
|
569
|
+
```text
|
|
570
|
+
TypeScript
|
|
571
|
+
Tests
|
|
572
|
+
Build
|
|
573
|
+
Package size
|
|
574
|
+
Fresh consumer installation
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
before release.
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
581
|
+
## Package size guard
|
|
582
|
+
|
|
583
|
+
Current release guard limits:
|
|
584
|
+
|
|
585
|
+
```text
|
|
586
|
+
Packed package: <= 100 kB
|
|
587
|
+
Unpacked package: <= 600 kB
|
|
588
|
+
Files: <= 150
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
This helps prevent accidental package growth.
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
## Documentation and live previews
|
|
596
|
+
|
|
597
|
+
Explore the component catalog, live previews, installation guidance, and additional examples:
|
|
598
|
+
|
|
599
|
+
https://farzadbagheri.fr/en/components
|
|
600
|
+
|
|
601
|
+
French component pages:
|
|
602
|
+
|
|
603
|
+
https://farzadbagheri.fr/fr/composants
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
## MCP
|
|
608
|
+
|
|
609
|
+
FB Components also has an MCP-oriented component discovery experience in the wider FB Components platform, allowing compatible AI tooling to discover component metadata and source availability.
|
|
610
|
+
|
|
611
|
+
Documentation:
|
|
612
|
+
|
|
613
|
+
https://farzadbagheri.fr/en/components/mcp
|
|
614
|
+
|
|
615
|
+
The npm package itself remains a standard React package and does not require MCP to use the components.
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
## Free and Pro components
|
|
620
|
+
|
|
621
|
+
The npm package currently contains the **22 free components** listed in this README.
|
|
622
|
+
|
|
623
|
+
The wider FB Components catalog may also display Pro components. Pro source code is not included in the public npm package.
|
|
624
|
+
|
|
625
|
+
---
|
|
626
|
+
|
|
627
|
+
## Versioning
|
|
628
|
+
|
|
629
|
+
FB Components currently follows pre-1.0 semantic versioning:
|
|
630
|
+
|
|
631
|
+
```text
|
|
632
|
+
0.1.x → patches and fixes
|
|
633
|
+
0.2.0 → new public features/components or meaningful API expansion
|
|
634
|
+
1.0.0 → stable public API milestone
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
Release history:
|
|
638
|
+
|
|
639
|
+
https://github.com/BAGHERIFarzad/fb-components/releases
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
## Contributing
|
|
644
|
+
|
|
645
|
+
Issues, bug reports, ideas, and feedback are welcome:
|
|
646
|
+
|
|
647
|
+
https://github.com/BAGHERIFarzad/fb-components/issues
|
|
648
|
+
|
|
649
|
+
See `CONTRIBUTING.md` before submitting larger changes.
|
|
650
|
+
|
|
651
|
+
When reporting a problem, please include:
|
|
652
|
+
|
|
653
|
+
- component name
|
|
654
|
+
- React version
|
|
655
|
+
- package version
|
|
656
|
+
- reproduction steps
|
|
657
|
+
- expected behavior
|
|
658
|
+
- actual behavior
|
|
659
|
+
- a minimal reproduction when possible
|
|
660
|
+
|
|
661
|
+
---
|
|
662
|
+
|
|
663
|
+
## Development
|
|
664
|
+
|
|
665
|
+
Install dependencies:
|
|
666
|
+
|
|
667
|
+
```bash
|
|
668
|
+
npm install
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
Run tests:
|
|
672
|
+
|
|
673
|
+
```bash
|
|
674
|
+
npm run test
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
Run coverage:
|
|
678
|
+
|
|
679
|
+
```bash
|
|
680
|
+
npm run test:coverage
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
Run type checking:
|
|
684
|
+
|
|
685
|
+
```bash
|
|
686
|
+
npm run typecheck
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
Build the package:
|
|
690
|
+
|
|
691
|
+
```bash
|
|
692
|
+
npm run build
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
Run complete release validation:
|
|
696
|
+
|
|
697
|
+
```bash
|
|
698
|
+
npm run release:check
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|
|
703
|
+
## Security
|
|
704
|
+
|
|
705
|
+
Please do not publish secrets, credentials, tokens, API keys, or private application data in public issues.
|
|
706
|
+
|
|
707
|
+
See `SECURITY.md` for security reporting guidance.
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
711
|
+
## Developer Documentation
|
|
712
|
+
|
|
713
|
+
For deeper technical documentation:
|
|
714
|
+
|
|
715
|
+
- [Component API Reference](./COMPONENTS.md)
|
|
716
|
+
- [Usage Examples](./EXAMPLES.md)
|
|
717
|
+
- [Development Guide](./DEVELOPMENT.md)
|
|
718
|
+
- [Contributing Guide](./CONTRIBUTING.md)
|
|
719
|
+
- [Release Guide](./RELEASING.md)
|
|
720
|
+
- [Branch Protection](./BRANCH-PROTECTION.md)
|
|
721
|
+
- [Security Policy](./SECURITY.md)
|
|
722
|
+
|
|
723
|
+
---
|
|
724
|
+
|
|
725
|
+
## License
|
|
726
|
+
|
|
727
|
+
MIT © 2026 Farzad Bagheri.
|
|
728
|
+
|
|
729
|
+
See [LICENSE](./LICENSE).
|
|
730
|
+
|
|
731
|
+
---
|
|
732
|
+
|
|
733
|
+
## Links
|
|
734
|
+
|
|
735
|
+
- **Website:** https://farzadbagheri.fr/en/components
|
|
736
|
+
- **npm:** https://www.npmjs.com/package/@farzadbagheri/fb-components
|
|
737
|
+
- **GitHub:** https://github.com/BAGHERIFarzad/fb-components
|
|
738
|
+
- **Releases:** https://github.com/BAGHERIFarzad/fb-components/releases
|
|
739
|
+
- **Issues:** https://github.com/BAGHERIFarzad/fb-components/issues
|
|
740
|
+
- **MCP docs:** https://farzadbagheri.fr/en/components/mcp
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
Built for modern React product experiences.
|