@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.
Files changed (91) hide show
  1. package/COMPONENTS.md +1101 -0
  2. package/EXAMPLES.md +1064 -0
  3. package/LICENSE +20 -20
  4. package/README.md +744 -131
  5. package/dist/ai.cjs +3 -3
  6. package/dist/ai.css.map +1 -1
  7. package/dist/ai.js +1 -1
  8. package/dist/backgrounds.cjs +7 -7
  9. package/dist/backgrounds.css.map +1 -1
  10. package/dist/backgrounds.js +1 -1
  11. package/dist/buttons.cjs +4 -4
  12. package/dist/buttons.css.map +1 -1
  13. package/dist/buttons.js +1 -1
  14. package/dist/{chunk-MKCSRMHF.cjs → chunk-4YAFXF3T.cjs} +2 -2
  15. package/dist/chunk-4YAFXF3T.cjs.map +1 -0
  16. package/dist/{chunk-H2AV67DY.cjs → chunk-7PUXKRNW.cjs} +7 -5
  17. package/dist/chunk-7PUXKRNW.cjs.map +1 -0
  18. package/dist/{chunk-CTD2GDO6.cjs → chunk-B5HDPUQK.cjs} +2 -2
  19. package/dist/chunk-B5HDPUQK.cjs.map +1 -0
  20. package/dist/{chunk-K5QRX5CZ.js → chunk-ENCZZRVK.js} +2 -2
  21. package/dist/chunk-ENCZZRVK.js.map +1 -0
  22. package/dist/{chunk-H6Y3EJPA.cjs → chunk-F4XFUSPM.cjs} +2 -2
  23. package/dist/chunk-F4XFUSPM.cjs.map +1 -0
  24. package/dist/{chunk-4FWJRWS5.cjs → chunk-HPWZ5OL2.cjs} +2 -2
  25. package/dist/chunk-HPWZ5OL2.cjs.map +1 -0
  26. package/dist/{chunk-JHOJY54P.js → chunk-HSY72AJ4.js} +2 -2
  27. package/dist/chunk-HSY72AJ4.js.map +1 -0
  28. package/dist/{chunk-R2F3FTBL.js → chunk-IZJHBS5M.js} +2 -2
  29. package/dist/chunk-IZJHBS5M.js.map +1 -0
  30. package/dist/{chunk-T7CC3CLH.js → chunk-J4ZYYB2O.js} +2 -2
  31. package/dist/chunk-J4ZYYB2O.js.map +1 -0
  32. package/dist/{chunk-C3ASXASL.cjs → chunk-MWSE4C6T.cjs} +2 -2
  33. package/dist/chunk-MWSE4C6T.cjs.map +1 -0
  34. package/dist/{chunk-WDUETPNG.js → chunk-P77GGWU6.js} +7 -5
  35. package/dist/chunk-P77GGWU6.js.map +1 -0
  36. package/dist/{chunk-ROKPXWY2.cjs → chunk-QTX5BFS6.cjs} +2 -2
  37. package/dist/chunk-QTX5BFS6.cjs.map +1 -0
  38. package/dist/{chunk-YQSTEIU5.js → chunk-RFI4526D.js} +2 -2
  39. package/dist/chunk-RFI4526D.js.map +1 -0
  40. package/dist/{chunk-BSEOOGOV.cjs → chunk-SS4GAAED.cjs} +2 -2
  41. package/dist/chunk-SS4GAAED.cjs.map +1 -0
  42. package/dist/{chunk-UWQ5QNE3.cjs → chunk-TG7XM34D.cjs} +2 -2
  43. package/dist/chunk-TG7XM34D.cjs.map +1 -0
  44. package/dist/{chunk-EIE6FLCL.js → chunk-VODRAWMB.js} +2 -2
  45. package/dist/chunk-VODRAWMB.js.map +1 -0
  46. package/dist/{chunk-RUSFF3MZ.js → chunk-XJGKXWK3.js} +2 -2
  47. package/dist/chunk-XJGKXWK3.js.map +1 -0
  48. package/dist/{chunk-JWV3IITG.js → chunk-YPBGV2B5.js} +2 -2
  49. package/dist/chunk-YPBGV2B5.js.map +1 -0
  50. package/dist/data.cjs +4 -4
  51. package/dist/data.css.map +1 -1
  52. package/dist/data.d.cts +2 -1
  53. package/dist/data.d.ts +2 -1
  54. package/dist/data.js +1 -1
  55. package/dist/heroes.cjs +2 -2
  56. package/dist/heroes.css.map +1 -1
  57. package/dist/heroes.js +1 -1
  58. package/dist/index.cjs +31 -31
  59. package/dist/index.css.map +1 -1
  60. package/dist/index.js +9 -9
  61. package/dist/landing.cjs +2 -2
  62. package/dist/landing.css.map +1 -1
  63. package/dist/landing.js +1 -1
  64. package/dist/motion.cjs +3 -3
  65. package/dist/motion.css.map +1 -1
  66. package/dist/motion.js +1 -1
  67. package/dist/text.cjs +3 -3
  68. package/dist/text.css.map +1 -1
  69. package/dist/text.js +1 -1
  70. package/dist/ui.cjs +3 -3
  71. package/dist/ui.css.map +1 -1
  72. package/dist/ui.js +1 -1
  73. package/package.json +167 -134
  74. package/dist/chunk-4FWJRWS5.cjs.map +0 -1
  75. package/dist/chunk-BSEOOGOV.cjs.map +0 -1
  76. package/dist/chunk-C3ASXASL.cjs.map +0 -1
  77. package/dist/chunk-CTD2GDO6.cjs.map +0 -1
  78. package/dist/chunk-EIE6FLCL.js.map +0 -1
  79. package/dist/chunk-H2AV67DY.cjs.map +0 -1
  80. package/dist/chunk-H6Y3EJPA.cjs.map +0 -1
  81. package/dist/chunk-JHOJY54P.js.map +0 -1
  82. package/dist/chunk-JWV3IITG.js.map +0 -1
  83. package/dist/chunk-K5QRX5CZ.js.map +0 -1
  84. package/dist/chunk-MKCSRMHF.cjs.map +0 -1
  85. package/dist/chunk-R2F3FTBL.js.map +0 -1
  86. package/dist/chunk-ROKPXWY2.cjs.map +0 -1
  87. package/dist/chunk-RUSFF3MZ.js.map +0 -1
  88. package/dist/chunk-T7CC3CLH.js.map +0 -1
  89. package/dist/chunk-UWQ5QNE3.cjs.map +0 -1
  90. package/dist/chunk-WDUETPNG.js.map +0 -1
  91. package/dist/chunk-YQSTEIU5.js.map +0 -1
package/COMPONENTS.md ADDED
@@ -0,0 +1,1101 @@
1
+ # FB Components — Component API Reference
2
+
3
+ Complete API reference for the **22 public components** shipped in:
4
+
5
+ ```text
6
+ @farzadbagheri/fb-components
7
+ ```
8
+
9
+ This file is designed as the technical companion to `README.md`.
10
+
11
+ It covers:
12
+
13
+ - purpose
14
+ - import path
15
+ - CSS import
16
+ - key props
17
+ - defaults
18
+ - usage examples
19
+ - accessibility notes
20
+ - behavior notes
21
+
22
+ ---
23
+
24
+ # Table of Contents
25
+
26
+ 1. [Backgrounds](#backgrounds)
27
+ - [PredictiveArc](#predictivearc)
28
+ - [SignalParticles](#signalparticles)
29
+ - [DotMatrix](#dotmatrix)
30
+ - [GradientMesh](#gradientmesh)
31
+ - [AuroraGrid](#auroragrid)
32
+ - [NoiseField](#noisefield)
33
+ 2. [Buttons](#buttons)
34
+ - [MagneticButton](#magneticbutton)
35
+ - [GlowButton](#glowbutton)
36
+ - [GlassButton](#glassbutton)
37
+ 3. [Text](#text)
38
+ - [RevealText](#revealtext)
39
+ - [BlurReveal](#blurreveal)
40
+ 4. [UI](#ui)
41
+ - [SpotlightCard](#spotlightcard)
42
+ - [GlassCard](#glasscard)
43
+ 5. [Motion](#motion)
44
+ - [GlowCursor](#glowcursor)
45
+ - [MagneticCursor](#magneticcursor)
46
+ 6. [AI](#ai)
47
+ - [AiPromptBox](#aipromptbox)
48
+ - [StreamingResponse](#streamingresponse)
49
+ 7. [Heroes](#heroes)
50
+ - [SaasLaunchHero](#saaslaunchhero)
51
+ 8. [Landing](#landing)
52
+ - [StartupLanding](#startuplanding)
53
+ 9. [Data](#data)
54
+ - [AnimatedCounter](#animatedcounter)
55
+ - [RadialProgress](#radialprogress)
56
+ - [MetricGrid](#metricgrid)
57
+
58
+ ---
59
+
60
+ # Backgrounds
61
+
62
+ Import:
63
+
64
+ ```tsx
65
+ import {
66
+ PredictiveArc,
67
+ SignalParticles,
68
+ DotMatrix,
69
+ GradientMesh,
70
+ AuroraGrid,
71
+ NoiseField,
72
+ } from "@farzadbagheri/fb-components/backgrounds";
73
+
74
+ import "@farzadbagheri/fb-components/backgrounds.css";
75
+ ```
76
+
77
+ ---
78
+
79
+ ## PredictiveArc
80
+
81
+ Decorative animated arc background with configurable color, size, thickness, glow, and animation state.
82
+
83
+ ### Import
84
+
85
+ ```tsx
86
+ import { PredictiveArc } from "@farzadbagheri/fb-components/backgrounds";
87
+ import "@farzadbagheri/fb-components/backgrounds.css";
88
+ ```
89
+
90
+ ### Props
91
+
92
+ | Prop | Type | Default | Description |
93
+ |---|---|---:|---|
94
+ | `color` | `string` | `"#9b7cff"` | Main arc color |
95
+ | `background` | `string` | `"#0d0d11"` | Background color |
96
+ | `size` | `number` | `70` | Arc size percentage |
97
+ | `thickness` | `number` | `3` | Arc thickness in pixels |
98
+ | `glow` | `number` | `16` | Glow radius in pixels |
99
+ | `animated` | `boolean` | `true` | Enables animation class |
100
+ | `className` | `string` | `""` | Additional CSS class |
101
+
102
+ ### Example
103
+
104
+ ```tsx
105
+ <PredictiveArc
106
+ color="#9b7cff"
107
+ background="#0d0d11"
108
+ size={82}
109
+ thickness={4}
110
+ glow={24}
111
+ />
112
+ ```
113
+
114
+ ### Notes
115
+
116
+ - Styling values are exposed through CSS custom properties.
117
+ - Intended primarily as a decorative visual layer.
118
+ - `animated={false}` removes the animation modifier class.
119
+
120
+ ### Accessibility
121
+
122
+ The component is decorative and does not expose interactive semantics.
123
+
124
+ ---
125
+
126
+ ## SignalParticles
127
+
128
+ Animated particle background for modern product surfaces and landing sections.
129
+
130
+ ### Import
131
+
132
+ ```tsx
133
+ import { SignalParticles } from "@farzadbagheri/fb-components/backgrounds";
134
+ import "@farzadbagheri/fb-components/backgrounds.css";
135
+ ```
136
+
137
+ ### Props
138
+
139
+ `SignalParticles` exposes visual configuration props and a `className` hook. Refer to generated TypeScript declarations for the exact type surface for the installed package version.
140
+
141
+ ### Example
142
+
143
+ ```tsx
144
+ <SignalParticles />
145
+ ```
146
+
147
+ ### Notes
148
+
149
+ - Designed as a decorative background.
150
+ - Works well behind hero, dashboard, and AI-interface sections.
151
+ - Visual behavior is animation-oriented.
152
+
153
+ ### Accessibility
154
+
155
+ Decorative rendering should not be treated as meaningful page content.
156
+
157
+ ---
158
+
159
+ ## DotMatrix
160
+
161
+ Dot-matrix visual background for dashboards, product surfaces, and modern landing sections.
162
+
163
+ ### Import
164
+
165
+ ```tsx
166
+ import { DotMatrix } from "@farzadbagheri/fb-components/backgrounds";
167
+ import "@farzadbagheri/fb-components/backgrounds.css";
168
+ ```
169
+
170
+ ### Example
171
+
172
+ ```tsx
173
+ <DotMatrix />
174
+ ```
175
+
176
+ ### Notes
177
+
178
+ - Best used as a visual layer rather than semantic content.
179
+ - Can be combined with cards, hero sections, and content overlays.
180
+
181
+ ---
182
+
183
+ ## GradientMesh
184
+
185
+ Layered gradient mesh background for modern interfaces.
186
+
187
+ ### Import
188
+
189
+ ```tsx
190
+ import { GradientMesh } from "@farzadbagheri/fb-components/backgrounds";
191
+ import "@farzadbagheri/fb-components/backgrounds.css";
192
+ ```
193
+
194
+ ### Example
195
+
196
+ ```tsx
197
+ <GradientMesh />
198
+ ```
199
+
200
+ ### Notes
201
+
202
+ - Intended for decorative visual composition.
203
+ - Useful in hero sections and product landing pages.
204
+
205
+ ---
206
+
207
+ ## AuroraGrid
208
+
209
+ Aurora-inspired animated grid background.
210
+
211
+ ### Import
212
+
213
+ ```tsx
214
+ import { AuroraGrid } from "@farzadbagheri/fb-components/backgrounds";
215
+ import "@farzadbagheri/fb-components/backgrounds.css";
216
+ ```
217
+
218
+ ### Example
219
+
220
+ ```tsx
221
+ <AuroraGrid />
222
+ ```
223
+
224
+ ### Notes
225
+
226
+ - Combines grid-like visual structure with an aurora-inspired effect.
227
+ - Best suited to product, AI, and deep-tech themed sections.
228
+
229
+ ---
230
+
231
+ ## NoiseField
232
+
233
+ Noise-based visual layer for adding depth and texture to surfaces.
234
+
235
+ ### Import
236
+
237
+ ```tsx
238
+ import { NoiseField } from "@farzadbagheri/fb-components/backgrounds";
239
+ import "@farzadbagheri/fb-components/backgrounds.css";
240
+ ```
241
+
242
+ ### Example
243
+
244
+ ```tsx
245
+ <NoiseField />
246
+ ```
247
+
248
+ ### Notes
249
+
250
+ - Decorative component.
251
+ - Works well as a subtle visual texture behind content.
252
+
253
+ ---
254
+
255
+ # Buttons
256
+
257
+ Import:
258
+
259
+ ```tsx
260
+ import {
261
+ MagneticButton,
262
+ GlowButton,
263
+ GlassButton,
264
+ } from "@farzadbagheri/fb-components/buttons";
265
+
266
+ import "@farzadbagheri/fb-components/buttons.css";
267
+ ```
268
+
269
+ ---
270
+
271
+ ## MagneticButton
272
+
273
+ Interactive button with magnetic pointer behavior.
274
+
275
+ ### Import
276
+
277
+ ```tsx
278
+ import { MagneticButton } from "@farzadbagheri/fb-components/buttons";
279
+ import "@farzadbagheri/fb-components/buttons.css";
280
+ ```
281
+
282
+ ### Example
283
+
284
+ ```tsx
285
+ <MagneticButton>
286
+ Explore
287
+ </MagneticButton>
288
+ ```
289
+
290
+ ### Notes
291
+
292
+ - Uses native button semantics.
293
+ - Supports standard button props.
294
+ - Designed for high-visibility calls to action.
295
+
296
+ ### Accessibility
297
+
298
+ - Keyboard-compatible through native button behavior.
299
+ - Consumers should provide clear button text.
300
+
301
+ ---
302
+
303
+ ## GlowButton
304
+
305
+ Modern glowing action button.
306
+
307
+ ### Import
308
+
309
+ ```tsx
310
+ import { GlowButton } from "@farzadbagheri/fb-components/buttons";
311
+ import "@farzadbagheri/fb-components/buttons.css";
312
+ ```
313
+
314
+ ### Example
315
+
316
+ ```tsx
317
+ <GlowButton>
318
+ Launch
319
+ </GlowButton>
320
+ ```
321
+
322
+ ### Notes
323
+
324
+ - Uses native button semantics.
325
+ - Suitable for primary product actions.
326
+
327
+ ### Accessibility
328
+
329
+ - Native button keyboard interaction is preserved.
330
+ - Use descriptive action labels.
331
+
332
+ ---
333
+
334
+ ## GlassButton
335
+
336
+ Glass-style button with configurable tint, opacity, blur, radius, and border opacity.
337
+
338
+ ### Import
339
+
340
+ ```tsx
341
+ import { GlassButton } from "@farzadbagheri/fb-components/buttons";
342
+ import "@farzadbagheri/fb-components/buttons.css";
343
+ ```
344
+
345
+ ### Props
346
+
347
+ | Prop | Type | Default | Description |
348
+ |---|---|---:|---|
349
+ | `children` | `ReactNode` | `"Explore"` | Button content |
350
+ | `textColor` | `string` | `"#ffffff"` | Text color |
351
+ | `tint` | `string` | `"#ffffff"` | Glass tint color |
352
+ | `opacity` | `number` | `0.08` | Background tint opacity |
353
+ | `blur` | `number` | `16` | Backdrop blur radius |
354
+ | `radius` | `number` | `16` | Border radius |
355
+ | `borderOpacity` | `number` | `0.18` | Border opacity |
356
+ | Standard button props | `ButtonHTMLAttributes<HTMLButtonElement>` | — | Native button attributes |
357
+
358
+ ### Example
359
+
360
+ ```tsx
361
+ <GlassButton
362
+ tint="#9b7cff"
363
+ opacity={0.12}
364
+ blur={18}
365
+ radius={18}
366
+ >
367
+ Explore
368
+ </GlassButton>
369
+ ```
370
+
371
+ ### Behavior Notes
372
+
373
+ - Defaults to `type="button"` when no type is provided.
374
+ - Invalid non-six-digit hex tint values fall back to white RGB values.
375
+ - Custom `style` is merged before component-controlled visual styles.
376
+
377
+ ### Accessibility
378
+
379
+ - Native button semantics.
380
+ - Decorative shine element is hidden from assistive technology.
381
+
382
+ ---
383
+
384
+ # Text
385
+
386
+ Import:
387
+
388
+ ```tsx
389
+ import {
390
+ RevealText,
391
+ BlurReveal,
392
+ } from "@farzadbagheri/fb-components/text";
393
+
394
+ import "@farzadbagheri/fb-components/text.css";
395
+ ```
396
+
397
+ ---
398
+
399
+ ## RevealText
400
+
401
+ Animated text reveal component.
402
+
403
+ ### Import
404
+
405
+ ```tsx
406
+ import { RevealText } from "@farzadbagheri/fb-components/text";
407
+ import "@farzadbagheri/fb-components/text.css";
408
+ ```
409
+
410
+ ### Example
411
+
412
+ ```tsx
413
+ <RevealText>
414
+ Build better interfaces.
415
+ </RevealText>
416
+ ```
417
+
418
+ ### Notes
419
+
420
+ - Intended for headings, highlights, and animated copy.
421
+ - Supports custom content through children.
422
+
423
+ ---
424
+
425
+ ## BlurReveal
426
+
427
+ Text reveal component using blur-based entrance effects.
428
+
429
+ ### Import
430
+
431
+ ```tsx
432
+ import { BlurReveal } from "@farzadbagheri/fb-components/text";
433
+ import "@farzadbagheri/fb-components/text.css";
434
+ ```
435
+
436
+ ### Example
437
+
438
+ ```tsx
439
+ <BlurReveal>
440
+ Ship faster.
441
+ </BlurReveal>
442
+ ```
443
+
444
+ ### Notes
445
+
446
+ - Useful for hero titles, section intros, and emphasized text.
447
+ - Designed for visual presentation rather than semantic transformation.
448
+
449
+ ---
450
+
451
+ # UI
452
+
453
+ Import:
454
+
455
+ ```tsx
456
+ import {
457
+ SpotlightCard,
458
+ GlassCard,
459
+ } from "@farzadbagheri/fb-components/ui";
460
+
461
+ import "@farzadbagheri/fb-components/ui.css";
462
+ ```
463
+
464
+ ---
465
+
466
+ ## SpotlightCard
467
+
468
+ Interactive card with spotlight-style pointer feedback.
469
+
470
+ ### Import
471
+
472
+ ```tsx
473
+ import { SpotlightCard } from "@farzadbagheri/fb-components/ui";
474
+ import "@farzadbagheri/fb-components/ui.css";
475
+ ```
476
+
477
+ ### Example
478
+
479
+ ```tsx
480
+ <SpotlightCard>
481
+ <h3>AI Platform</h3>
482
+ <p>Build modern AI experiences.</p>
483
+ </SpotlightCard>
484
+ ```
485
+
486
+ ### Notes
487
+
488
+ - Suitable for pricing, features, dashboards, and product cards.
489
+ - Supports children content.
490
+
491
+ ---
492
+
493
+ ## GlassCard
494
+
495
+ Reusable glass-style container.
496
+
497
+ ### Import
498
+
499
+ ```tsx
500
+ import { GlassCard } from "@farzadbagheri/fb-components/ui";
501
+ import "@farzadbagheri/fb-components/ui.css";
502
+ ```
503
+
504
+ ### Example
505
+
506
+ ```tsx
507
+ <GlassCard>
508
+ Dashboard content
509
+ </GlassCard>
510
+ ```
511
+
512
+ ### Notes
513
+
514
+ - Useful as a composable visual surface.
515
+ - Works well with buttons, metrics, and AI content.
516
+
517
+ ---
518
+
519
+ # Motion
520
+
521
+ Import:
522
+
523
+ ```tsx
524
+ import {
525
+ GlowCursor,
526
+ MagneticCursor,
527
+ } from "@farzadbagheri/fb-components/motion";
528
+
529
+ import "@farzadbagheri/fb-components/motion.css";
530
+ ```
531
+
532
+ ---
533
+
534
+ ## GlowCursor
535
+
536
+ Decorative cursor-following effect.
537
+
538
+ ### Import
539
+
540
+ ```tsx
541
+ import { GlowCursor } from "@farzadbagheri/fb-components/motion";
542
+ import "@farzadbagheri/fb-components/motion.css";
543
+ ```
544
+
545
+ ### Example
546
+
547
+ ```tsx
548
+ <GlowCursor>
549
+ <div>
550
+ Interactive content
551
+ </div>
552
+ </GlowCursor>
553
+ ```
554
+
555
+ ### Notes
556
+
557
+ - Intended to enhance interaction feedback.
558
+ - Should wrap a meaningful content region.
559
+
560
+ ---
561
+
562
+ ## MagneticCursor
563
+
564
+ Custom cursor that follows the pointer and can magnetically attract toward marked targets.
565
+
566
+ ### Import
567
+
568
+ ```tsx
569
+ import { MagneticCursor } from "@farzadbagheri/fb-components/motion";
570
+ import "@farzadbagheri/fb-components/motion.css";
571
+ ```
572
+
573
+ ### Props
574
+
575
+ | Prop | Type | Default | Description |
576
+ |---|---|---:|---|
577
+ | `children` | `ReactNode` | — | Wrapped content |
578
+ | `color` | `string` | `"#b99cff"` | Cursor color |
579
+ | `size` | `number` | `18` | Dot size in pixels |
580
+ | `ringSize` | `number` | `44` | Ring size in pixels |
581
+ | `followSpeed` | `number` | `0.14` | Ring transition duration in seconds |
582
+ | `magneticStrength` | `number` | `0.25` | Attraction strength |
583
+ | `className` | `string` | `""` | Additional class |
584
+ | Standard div props | `HTMLAttributes<HTMLDivElement>` | — | Native div attributes |
585
+
586
+ ### Example
587
+
588
+ ```tsx
589
+ <MagneticCursor
590
+ color="#b99cff"
591
+ size={18}
592
+ ringSize={44}
593
+ magneticStrength={0.25}
594
+ >
595
+ <button
596
+ type="button"
597
+ data-magnetic-target
598
+ >
599
+ Explore
600
+ </button>
601
+ </MagneticCursor>
602
+ ```
603
+
604
+ ### Behavior Notes
605
+
606
+ - The native cursor is hidden within the component region.
607
+ - Add `data-magnetic-target` to elements that should attract the cursor.
608
+ - Pointer movement updates local cursor coordinates.
609
+ - Pointer leave hides the custom cursor.
610
+ - Native event listeners are removed during cleanup.
611
+
612
+ ### Accessibility
613
+
614
+ - Cursor visuals are decorative and use `aria-hidden="true"`.
615
+ - Interactive content remains represented by its original semantic elements.
616
+
617
+ ---
618
+
619
+ # AI
620
+
621
+ Import:
622
+
623
+ ```tsx
624
+ import {
625
+ AiPromptBox,
626
+ StreamingResponse,
627
+ } from "@farzadbagheri/fb-components/ai";
628
+
629
+ import "@farzadbagheri/fb-components/ai.css";
630
+ ```
631
+
632
+ ---
633
+
634
+ ## AiPromptBox
635
+
636
+ AI prompt composer with internal text state, optional model label, optional attachment action, and submit handling.
637
+
638
+ ### Import
639
+
640
+ ```tsx
641
+ import { AiPromptBox } from "@farzadbagheri/fb-components/ai";
642
+ import "@farzadbagheri/fb-components/ai.css";
643
+ ```
644
+
645
+ ### Props
646
+
647
+ | Prop | Type | Default | Description |
648
+ |---|---|---:|---|
649
+ | `background` | `string` | `"#111116"` | Root background |
650
+ | `accent` | `string` | `"#9b7cff"` | Accent color |
651
+ | `textColor` | `string` | `"#ffffff"` | Text color |
652
+ | `radius` | `number` | `20` | Border radius |
653
+ | `minHeight` | `number` | `150` | Minimum height |
654
+ | `showModel` | `boolean` | `true` | Shows model label |
655
+ | `showAttachment` | `boolean` | `true` | Shows attachment button |
656
+ | `modelLabel` | `string` | `"FB AI · Fast"` | Model label |
657
+ | `placeholder` | `string` | `"Ask anything..."` | Textarea placeholder and accessible name |
658
+ | `defaultValue` | `string` | `""` | Initial prompt value |
659
+ | `disabled` | `boolean` | `false` | Disables text entry and submit |
660
+ | `onSubmit` | `(value: string) => void` | — | Called with trimmed prompt |
661
+ | `className` | `string` | `""` | Additional class |
662
+ | Standard div props | `HTMLAttributes<HTMLDivElement>` minus `onSubmit` | — | Root attributes |
663
+
664
+ ### Example
665
+
666
+ ```tsx
667
+ <AiPromptBox
668
+ modelLabel="FB AI · Fast"
669
+ placeholder="Describe your task"
670
+ onSubmit={(value) => {
671
+ console.log(value);
672
+ }}
673
+ />
674
+ ```
675
+
676
+ ### Behavior Notes
677
+
678
+ - Input is trimmed before submission.
679
+ - Empty or whitespace-only values are not submitted.
680
+ - Submit is disabled when the prompt is empty.
681
+ - Disabled state blocks submission.
682
+ - `showModel={false}` hides the model label.
683
+ - `showAttachment={false}` hides the attachment action.
684
+
685
+ ### Accessibility
686
+
687
+ - Textarea receives an accessible name from `placeholder`.
688
+ - Buttons expose explicit accessible labels.
689
+ - Decorative icons are hidden from assistive technology.
690
+
691
+ ---
692
+
693
+ ## StreamingResponse
694
+
695
+ Presentation component for streaming-style AI output.
696
+
697
+ ### Import
698
+
699
+ ```tsx
700
+ import { StreamingResponse } from "@farzadbagheri/fb-components/ai";
701
+ import "@farzadbagheri/fb-components/ai.css";
702
+ ```
703
+
704
+ ### Example
705
+
706
+ ```tsx
707
+ <StreamingResponse />
708
+ ```
709
+
710
+ ### Notes
711
+
712
+ - Intended for AI answer or response presentation.
713
+ - Can be paired with `AiPromptBox` for a complete AI-oriented interface.
714
+
715
+ ---
716
+
717
+ # Heroes
718
+
719
+ Import:
720
+
721
+ ```tsx
722
+ import { SaasLaunchHero } from "@farzadbagheri/fb-components/heroes";
723
+ import "@farzadbagheri/fb-components/heroes.css";
724
+ ```
725
+
726
+ ---
727
+
728
+ ## SaasLaunchHero
729
+
730
+ Ready-to-use SaaS hero section with configurable copy, actions, proof section, and visual styling.
731
+
732
+ ### Props
733
+
734
+ | Prop | Type | Default | Description |
735
+ |---|---|---:|---|
736
+ | `accent` | `string` | `"#8f73ff"` | Accent color |
737
+ | `background` | `string` | `"#09090d"` | Section background |
738
+ | `headlineSize` | `number` | `72` | Headline size in pixels |
739
+ | `eyebrow` | `string` | `"BUILT FOR MODERN TEAMS"` | Eyebrow copy |
740
+ | `title` | `string` | `"Ship faster.\nScale smarter."` | Multiline title |
741
+ | `description` | `string` | Default marketing copy | Supporting description |
742
+ | `primaryLabel` | `string` | `"Start free"` | Primary CTA label |
743
+ | `secondaryLabel` | `string` | `"See demo"` | Secondary CTA label |
744
+ | `showSecondary` | `boolean` | `true` | Shows secondary CTA |
745
+ | `showProof` | `boolean` | `true` | Shows proof section |
746
+ | `className` | `string` | `""` | Additional class |
747
+ | Standard section props | `HTMLAttributes<HTMLElement>` | — | Native section attributes |
748
+
749
+ ### Example
750
+
751
+ ```tsx
752
+ <SaasLaunchHero
753
+ eyebrow="BUILT FOR MODERN TEAMS"
754
+ title={"Ship faster.\nScale smarter."}
755
+ primaryLabel="Start free"
756
+ secondaryLabel="See demo"
757
+ />
758
+ ```
759
+
760
+ ### Behavior Notes
761
+
762
+ - Newline characters in `title` are rendered as separate line spans.
763
+ - `showSecondary={false}` removes the secondary CTA.
764
+ - `showProof={false}` removes the proof section.
765
+ - Component-level `background` overrides `style.background`.
766
+
767
+ ### Accessibility
768
+
769
+ - CTA controls use native buttons.
770
+ - Decorative glow and visual dashboard sections are hidden from assistive technology.
771
+
772
+ ---
773
+
774
+ # Landing
775
+
776
+ Import:
777
+
778
+ ```tsx
779
+ import { StartupLanding } from "@farzadbagheri/fb-components/landing";
780
+ import "@farzadbagheri/fb-components/landing.css";
781
+ ```
782
+
783
+ ---
784
+
785
+ ## StartupLanding
786
+
787
+ Startup-oriented landing page composition with navigation, hero copy, metrics, and feature cards.
788
+
789
+ ### Props
790
+
791
+ | Prop | Type | Default | Description |
792
+ |---|---|---:|---|
793
+ | `accent` | `string` | `"#7d63ff"` | Accent color |
794
+ | `background` | `string` | `"#08080c"` | Section background |
795
+ | `radius` | `number` | `20` | Shared radius custom property |
796
+ | `showMetrics` | `boolean` | `true` | Shows metrics section |
797
+ | `showFeatures` | `boolean` | `true` | Shows feature section |
798
+ | `className` | `string` | `""` | Additional class |
799
+ | Standard section props | `HTMLAttributes<HTMLElement>` | — | Native section attributes |
800
+
801
+ ### Example
802
+
803
+ ```tsx
804
+ <StartupLanding
805
+ accent="#7d63ff"
806
+ background="#08080c"
807
+ radius={20}
808
+ showMetrics
809
+ showFeatures
810
+ />
811
+ ```
812
+
813
+ ### Behavior Notes
814
+
815
+ Default navigation contains:
816
+
817
+ - Product
818
+ - Features
819
+ - Pricing
820
+
821
+ Default metrics:
822
+
823
+ - `42K` — Early users
824
+ - `4.9` — Average rating
825
+ - `99.9%` — Platform uptime
826
+
827
+ Default features:
828
+
829
+ - Ship
830
+ - Measure
831
+ - Scale
832
+
833
+ Feature numbering is rendered as:
834
+
835
+ ```text
836
+ 01
837
+ 02
838
+ 03
839
+ ```
840
+
841
+ ### Accessibility
842
+
843
+ - Navigation links use native anchors.
844
+ - CTA controls use native buttons.
845
+ - Consumers should verify page-level heading structure in the final application.
846
+
847
+ ---
848
+
849
+ # Data
850
+
851
+ Import:
852
+
853
+ ```tsx
854
+ import {
855
+ AnimatedCounter,
856
+ RadialProgress,
857
+ MetricGrid,
858
+ } from "@farzadbagheri/fb-components/data";
859
+
860
+ import "@farzadbagheri/fb-components/data.css";
861
+ ```
862
+
863
+ ---
864
+
865
+ ## AnimatedCounter
866
+
867
+ Animated numeric metric with cubic easing and configurable display formatting.
868
+
869
+ ### Props
870
+
871
+ | Prop | Type | Default | Description |
872
+ |---|---|---:|---|
873
+ | `value` | `number` | `128` | Target value |
874
+ | `duration` | `number` | `1.5` | Animation duration in seconds |
875
+ | `color` | `string` | `"#ffffff"` | Text color |
876
+ | `accent` | `string` | `"#9b7cff"` | Accent color |
877
+ | `fontSize` | `number` | `72` | Number size in pixels |
878
+ | `prefix` | `string` | `""` | Prefix before number |
879
+ | `suffix` | `string` | `"K"` | Suffix after number |
880
+ | `label` | `string` | `"ACTIVE USERS"` | Metric label |
881
+ | `delta` | `string` | `"+18.4%"` | Delta text |
882
+ | `decimals` | `number` | `0` | Decimal precision |
883
+ | `className` | `string` | `""` | Additional class |
884
+ | Standard div props | `HTMLAttributes<HTMLDivElement>` | — | Native div attributes |
885
+
886
+ ### Example
887
+
888
+ ```tsx
889
+ <AnimatedCounter
890
+ value={128}
891
+ suffix="K"
892
+ label="ACTIVE USERS"
893
+ delta="+18.4%"
894
+ duration={1.5}
895
+ />
896
+ ```
897
+
898
+ ### Behavior Notes
899
+
900
+ - Uses cubic easing.
901
+ - Duration is clamped to a minimum of `0.01` seconds.
902
+ - `delta=""` hides the delta element.
903
+ - Animation restarts when `value` or `duration` changes.
904
+ - Scheduled animation frames are cleaned up on unmount.
905
+
906
+ ---
907
+
908
+ ## RadialProgress
909
+
910
+ Accessible radial progress visualization.
911
+
912
+ ### Props
913
+
914
+ | Prop | Type | Default | Description |
915
+ |---|---|---:|---|
916
+ | `value` | `number` | `72` | Progress value |
917
+ | `size` | `number` | `180` | Component width/height |
918
+ | `strokeWidth` | `number` | `10` | SVG circle stroke width |
919
+ | `color` | `string` | `"#9b7cff"` | Progress stroke color |
920
+ | `trackColor` | `string` | `"#24242c"` | Track stroke color |
921
+ | `animated` | `boolean` | `true` | Enables animated value class |
922
+ | `label` | `string` | `"COMPLETE"` | Visible label |
923
+ | `ariaLabel` | `string` | `"Progress"` | Accessible progressbar label |
924
+ | `className` | `string` | `""` | Additional class |
925
+ | Standard div props | `HTMLAttributes<HTMLDivElement>` | — | Native div attributes |
926
+
927
+ ### Example
928
+
929
+ ```tsx
930
+ <RadialProgress
931
+ value={72}
932
+ label="COMPLETE"
933
+ ariaLabel="Profile completion"
934
+ />
935
+ ```
936
+
937
+ ### Behavior Notes
938
+
939
+ - Values are clamped between `0` and `100`.
940
+ - Displayed text uses `Math.round`.
941
+ - `animated={false}` removes the animated modifier class.
942
+ - Radius is calculated from `strokeWidth`.
943
+ - Stroke offset is calculated from the clamped progress value.
944
+
945
+ ### Accessibility
946
+
947
+ The root exposes:
948
+
949
+ ```text
950
+ role="progressbar"
951
+ aria-valuemin="0"
952
+ aria-valuemax="100"
953
+ aria-valuenow
954
+ aria-valuetext
955
+ ```
956
+
957
+ The SVG is decorative and hidden from assistive technology.
958
+
959
+ ---
960
+
961
+ ## MetricGrid
962
+
963
+ Reusable grid for presenting multiple metrics.
964
+
965
+ ### Import
966
+
967
+ ```tsx
968
+ import { MetricGrid } from "@farzadbagheri/fb-components/data";
969
+ import "@farzadbagheri/fb-components/data.css";
970
+ ```
971
+
972
+ ### Example
973
+
974
+ ```tsx
975
+ <MetricGrid />
976
+ ```
977
+
978
+ ### Notes
979
+
980
+ - Intended for dashboard and product analytics layouts.
981
+ - Can be composed with `AnimatedCounter` and `RadialProgress`.
982
+
983
+ ---
984
+
985
+ # Root Import
986
+
987
+ All 22 public components can also be imported from the package root:
988
+
989
+ ```tsx
990
+ import {
991
+ AiPromptBox,
992
+ AnimatedCounter,
993
+ AuroraGrid,
994
+ BlurReveal,
995
+ DotMatrix,
996
+ GlassButton,
997
+ GlassCard,
998
+ GlowButton,
999
+ GlowCursor,
1000
+ GradientMesh,
1001
+ MagneticButton,
1002
+ MagneticCursor,
1003
+ MetricGrid,
1004
+ NoiseField,
1005
+ PredictiveArc,
1006
+ RadialProgress,
1007
+ RevealText,
1008
+ SaasLaunchHero,
1009
+ SignalParticles,
1010
+ SpotlightCard,
1011
+ StartupLanding,
1012
+ StreamingResponse,
1013
+ } from "@farzadbagheri/fb-components";
1014
+
1015
+ import "@farzadbagheri/fb-components/styles.css";
1016
+ ```
1017
+
1018
+ ---
1019
+
1020
+ # Package Entry Points
1021
+
1022
+ | Category | JavaScript | CSS |
1023
+ |---|---|---|
1024
+ | Root | `@farzadbagheri/fb-components` | `@farzadbagheri/fb-components/styles.css` |
1025
+ | Backgrounds | `@farzadbagheri/fb-components/backgrounds` | `@farzadbagheri/fb-components/backgrounds.css` |
1026
+ | Buttons | `@farzadbagheri/fb-components/buttons` | `@farzadbagheri/fb-components/buttons.css` |
1027
+ | Text | `@farzadbagheri/fb-components/text` | `@farzadbagheri/fb-components/text.css` |
1028
+ | UI | `@farzadbagheri/fb-components/ui` | `@farzadbagheri/fb-components/ui.css` |
1029
+ | Motion | `@farzadbagheri/fb-components/motion` | `@farzadbagheri/fb-components/motion.css` |
1030
+ | AI | `@farzadbagheri/fb-components/ai` | `@farzadbagheri/fb-components/ai.css` |
1031
+ | Heroes | `@farzadbagheri/fb-components/heroes` | `@farzadbagheri/fb-components/heroes.css` |
1032
+ | Landing | `@farzadbagheri/fb-components/landing` | `@farzadbagheri/fb-components/landing.css` |
1033
+ | Data | `@farzadbagheri/fb-components/data` | `@farzadbagheri/fb-components/data.css` |
1034
+
1035
+ ---
1036
+
1037
+ # General Integration Notes
1038
+
1039
+ ## CSS
1040
+
1041
+ Prefer category CSS when possible:
1042
+
1043
+ ```tsx
1044
+ import "@farzadbagheri/fb-components/buttons.css";
1045
+ ```
1046
+
1047
+ Use the root stylesheet when your application uses many categories:
1048
+
1049
+ ```tsx
1050
+ import "@farzadbagheri/fb-components/styles.css";
1051
+ ```
1052
+
1053
+ ## TypeScript
1054
+
1055
+ Type declarations are bundled with the package.
1056
+
1057
+ No separate `@types` package is required.
1058
+
1059
+ ## React Compatibility
1060
+
1061
+ ```text
1062
+ React >=18 <20
1063
+ React DOM >=18 <20
1064
+ Node >=18
1065
+ ```
1066
+
1067
+ ## Accessibility
1068
+
1069
+ FB Components includes accessibility-oriented implementation and automated checks, but consumers should still validate complete page-level accessibility in their own application context.
1070
+
1071
+ ## Tree Shaking
1072
+
1073
+ Category entry points are recommended for focused imports and smaller CSS usage.
1074
+
1075
+ ---
1076
+
1077
+ # Related Documentation
1078
+
1079
+ - Main README: `README.md`
1080
+ - Contributing guide: `CONTRIBUTING.md`
1081
+ - Security policy: `SECURITY.md`
1082
+ - Release guide: `RELEASING.md`
1083
+ - Changelog: `CHANGELOG.md`
1084
+
1085
+ Live catalog:
1086
+
1087
+ https://farzadbagheri.fr/en/components
1088
+
1089
+ French catalog:
1090
+
1091
+ https://farzadbagheri.fr/fr/composants
1092
+
1093
+ MCP documentation:
1094
+
1095
+ https://farzadbagheri.fr/en/components/mcp
1096
+
1097
+ ---
1098
+
1099
+ # License
1100
+
1101
+ MIT © 2026 Farzad Bagheri.