-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.html
More file actions
886 lines (798 loc) · 28.4 KB
/
Copy pathdocs.html
File metadata and controls
886 lines (798 loc) · 28.4 KB
1
2
3
4
5
6
7
8
9
10
11
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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FlowCSS Docs</title>
<link rel="icon" type="image/png" href="./img/flow.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap"
rel="stylesheet" />
<link rel="stylesheet" href="./flow.css" />
<style>
:root {
--flow-font-sans: 'DM Sans', system-ui, sans-serif;
--flow-font-mono: 'DM Mono', monospace;
--sidebar-w: 260px;
}
body {
font-family: var(--flow-font-sans);
background: #fff;
color: var(--flow-gray-900);
}
.top-nav {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
padding: 1rem 2rem;
display: flex;
align-items: center;
gap: 2rem;
background: rgba(255, 255, 255, 0.92);
backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.top-nav .logo {
font-weight: 700;
font-size: 1.125rem;
color: #0a0a0a;
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
.top-nav .logo-dot {
width: 8px;
height: 8px;
background: var(--flow-primary);
border-radius: 50%;
display: inline-block;
}
.top-nav .nav-links {
display: flex;
gap: 1.5rem;
margin-left: auto;
}
.top-nav .nav-links a {
font-size: 0.875rem;
color: var(--flow-gray-600);
text-decoration: none;
transition: color 0.2s;
}
.top-nav .nav-links a:hover {
color: var(--flow-gray-900);
}
.docs-layout {
display: flex;
min-height: 100vh;
padding-top: 4.5rem;
}
.sidebar {
width: var(--sidebar-w);
flex-shrink: 0;
position: fixed;
top: 4.5rem;
left: 0;
bottom: 0;
overflow-y: auto;
border-right: 1px solid var(--flow-gray-100);
padding: 1.5rem 1rem;
background: #fff;
z-index: 50;
}
.sidebar .logo {
font-weight: 700;
font-size: 1rem;
color: #0a0a0a;
text-decoration: none;
display: flex;
align-items: center;
gap: 0.4rem;
margin-bottom: 2rem;
padding: 0 0.5rem;
}
.sidebar-section {
margin-bottom: 1.5rem;
}
.sidebar-label {
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--flow-gray-400);
padding: 0 0.5rem;
margin-bottom: 0.5rem;
display: block;
}
.sidebar-link {
display: block;
padding: 0.3rem 0.5rem;
font-size: 0.875rem;
color: var(--flow-gray-600);
text-decoration: none;
border-radius: 6px;
transition: all 0.15s;
}
.sidebar-link:hover {
color: var(--flow-gray-900);
background: var(--flow-gray-50);
}
.sidebar-link.active {
color: var(--flow-primary);
background: rgb(37 99 235/0.07);
font-weight: 500;
}
.docs-main {
margin-left: var(--sidebar-w);
flex: 1;
max-width: 860px;
padding: 3rem;
}
h1 {
font-size: 2rem;
font-weight: 700;
letter-spacing: -0.02em;
margin-bottom: 0.75rem;
}
h2 {
font-size: 1.375rem;
font-weight: 700;
margin: 2.5rem 0 0.75rem;
padding-top: 2rem;
border-top: 1px solid var(--flow-gray-100);
}
h2:first-of-type {
border-top: none;
margin-top: 1rem;
}
h3 {
font-size: 1.125rem;
font-weight: 600;
margin: 1.5rem 0 0.5rem;
}
p {
color: var(--flow-gray-600);
line-height: 1.7;
margin-bottom: 1rem;
}
a {
color: var(--flow-primary);
text-decoration: none;
}
.lead {
font-size: 1.125rem;
color: var(--flow-gray-500);
margin-bottom: 2rem;
line-height: 1.7;
}
pre {
background: #0f172a;
color: #e2e8f0;
padding: 1.25rem 1.5rem;
border-radius: 10px;
overflow-x: auto;
font-family: var(--flow-font-mono);
font-size: 0.8125rem;
line-height: 1.8;
margin: 1rem 0;
}
code {
font-family: var(--flow-font-mono);
font-size: 0.875em;
background: var(--flow-gray-100);
color: var(--flow-gray-800);
padding: 0.1em 0.35em;
border-radius: 4px;
}
pre code {
background: none;
color: inherit;
padding: 0;
}
.badge-new {
display: inline-block;
background: rgb(16 185 129/0.1);
color: var(--flow-success);
font-size: 0.7rem;
font-weight: 600;
padding: 0.15rem 0.5rem;
border-radius: 4px;
margin-left: 0.5rem;
vertical-align: middle;
}
.ref-table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
margin: 1rem 0;
}
.ref-table th {
text-align: left;
font-weight: 600;
padding: 0.6rem 1rem;
border-bottom: 2px solid var(--flow-gray-200);
color: var(--flow-gray-500);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.ref-table td {
padding: 0.6rem 1rem;
border-bottom: 1px solid var(--flow-gray-100);
vertical-align: top;
}
.ref-table tr:hover td {
background: var(--flow-gray-50);
}
.ref-table td:first-child code {
color: var(--flow-primary);
}
.callout {
border-left: 3px solid;
padding: 1rem 1.25rem;
border-radius: 0 8px 8px 0;
margin: 1rem 0;
}
.callout--tip {
border-color: var(--flow-success);
background: rgb(16 185 129/0.06);
}
.callout--info {
border-color: var(--flow-info);
background: rgb(6 182 212/0.06);
}
.callout p {
margin: 0;
font-size: 0.875rem;
}
@media(max-width:768px) {
.top-nav {
padding: 1rem 1.25rem;
gap: 1rem;
}
.top-nav .nav-links {
gap: 1rem;
}
.sidebar {
display: none;
}
.docs-main {
margin-left: 0;
padding: 2rem 1.25rem;
}
}
</style>
</head>
<body>
<nav class="top-nav">
<a href="index.html" class="logo"><span class="logo-dot"></span>FlowCSS</a>
<div class="nav-links">
<a href="index.html">Home</a>
<a href="docs.html">Docs</a>
<a href="https://github.com/Flow-css/flowcss" target="_blank" rel="noopener noreferrer">GitHub</a>
</div>
</nav>
<div class="docs-layout">
<aside class="sidebar">
<a href="index.html" class="logo"><span
style="width:8px;height:8px;background:var(--flow-primary);border-radius:50%;display:inline-block;flex-shrink:0"></span>FlowCSS</a>
<div class="sidebar-section">
<span class="sidebar-label">Getting Started</span>
<a href="#install" class="sidebar-link active">Installation</a>
<a href="#usage" class="sidebar-link">Basic Usage</a>
<a href="#theming" class="sidebar-link">Theming</a>
<a href="#dark-mode" class="sidebar-link">Dark Mode</a>
</div>
<div class="sidebar-section">
<span class="sidebar-label">Animations</span>
<a href="#entrance" class="sidebar-link">Entrance</a>
<a href="#looping" class="sidebar-link">Looping</a>
<a href="#attention" class="sidebar-link">Attention</a>
<a href="#scroll-reveal" class="sidebar-link">Scroll Reveal</a>
<a href="#stagger" class="sidebar-link">Stagger</a>
<a href="#typewriter" class="sidebar-link">Typewriter</a>
<a href="#delays" class="sidebar-link">Delays & Duration</a>
</div>
<div class="sidebar-section">
<span class="sidebar-label">Layout</span>
<a href="#container" class="sidebar-link">Container</a>
<a href="#flex" class="sidebar-link">Flexbox</a>
<a href="#grid" class="sidebar-link">Grid</a>
<a href="#auto-grid" class="sidebar-link">Auto Grid</a>
</div>
<div class="sidebar-section">
<span class="sidebar-label">Components</span>
<a href="#buttons" class="sidebar-link">Buttons</a>
<a href="#cards" class="sidebar-link">Cards</a>
<a href="#badges" class="sidebar-link">Badges</a>
<a href="#alerts" class="sidebar-link">Alerts</a>
<a href="#inputs" class="sidebar-link">Inputs</a>
<a href="#avatars" class="sidebar-link">Avatars</a>
<a href="#progress" class="sidebar-link">Progress</a>
<a href="#accordion" class="sidebar-link">Accordion</a>
<a href="#tabs" class="sidebar-link">Tabs</a>
<a href="#toast" class="sidebar-link">Toast</a>
<a href="#skeleton" class="sidebar-link">Skeleton</a>
<a href="#spinner" class="sidebar-link">Spinner</a>
<a href="#timeline" class="sidebar-link">Timeline</a>
<a href="#tooltip" class="sidebar-link">Tooltip</a>
<a href="#navbar" class="sidebar-link">Navbar</a>
</div>
<div class="sidebar-section">
<span class="sidebar-label">Effects</span>
<a href="#glass" class="sidebar-link">Glassmorphism</a>
<a href="#3d" class="sidebar-link">3D Transforms</a>
<a href="#gradient-text" class="sidebar-link">Gradient Text</a>
<a href="#shadows" class="sidebar-link">Shadows & Glow</a>
</div>
<div class="sidebar-section">
<span class="sidebar-label">JS API</span>
<a href="#js-api" class="sidebar-link">Flow.js Reference</a>
<a href="#parallax" class="sidebar-link">Parallax</a>
<a href="#magnetic" class="sidebar-link">Magnetic</a>
<a href="#counter" class="sidebar-link">Counter</a>
</div>
</aside>
<main class="docs-main">
<h1>FlowCSS Documentation</h1>
<p class="lead">A modern CSS framework with 40+ animations, components, glassmorphism, 3D, and dark mode — zero
dependencies, zero build step.</p>
<h2 id="install">Installation</h2>
<h3>npm</h3>
<pre><code>npm install flowcss</code></pre>
<pre><code>import 'flowcss/dist/flow.css';
import 'flowcss/dist/flow.js'; // optional JS features</code></pre>
<h3>CDN</h3>
<pre><code><link rel="stylesheet" href="https://unpkg.com/flowcss/dist/flow.css">
<script src="https://unpkg.com/flowcss/dist/flow.js" defer></script></code></pre>
<div class="callout callout--tip">
<p><strong>Tip:</strong> No PostCSS, no build step, no config. Works in any HTML, React, Vue, or Svelte project.
</p>
</div>
<h2 id="usage">Basic Usage</h2>
<p>All classes use the <code>flow-</code> prefix — no conflicts with other frameworks.</p>
<pre><code><div class="flow-card flow-animate-slide-up">
<h2 class="flow-text-gradient">Hello FlowCSS</h2>
<p class="flow-text-muted">No build step needed.</p>
<button class="flow-btn flow-btn--primary flow-btn--ripple">Click</button>
</div></code></pre>
<h2 id="theming">Theming</h2>
<p>Every design token is a CSS variable. Override globally or locally.</p>
<pre><code>:root {
--flow-primary: #7c3aed;
--flow-font-sans: 'Poppins', sans-serif;
--flow-radius-md: 0.25rem;
}
.my-section { --flow-primary: #ef4444; }</code></pre>
<h2 id="dark-mode">Dark Mode</h2>
<pre><code><!-- Set on html element -->
<html data-theme="dark">
<!-- Auto toggle button (persisted via localStorage) -->
<button data-flow-theme-toggle>Toggle theme</button></code></pre>
<h2 id="entrance">Entrance Animations</h2>
<p>Play once on load. Chain with <code>flow-delay-*</code> for staggered sequences.</p>
<table class="ref-table">
<thead>
<tr>
<th>Class</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>flow-animate-fade-in</code></td>
<td>Fade from transparent</td>
</tr>
<tr>
<td><code>flow-animate-slide-up</code></td>
<td>Rise from below + fade</td>
</tr>
<tr>
<td><code>flow-animate-slide-down</code></td>
<td>Drop from above + fade</td>
</tr>
<tr>
<td><code>flow-animate-slide-left</code></td>
<td>Slide in from right</td>
</tr>
<tr>
<td><code>flow-animate-slide-right</code></td>
<td>Slide in from left</td>
</tr>
<tr>
<td><code>flow-animate-scale-in</code></td>
<td>Scale 90%→100% + fade</td>
</tr>
<tr>
<td><code>flow-animate-pop</code></td>
<td>Spring scale with overshoot</td>
</tr>
<tr>
<td><code>flow-animate-blur-in</code></td>
<td>Unblur + fade in</td>
</tr>
<tr>
<td><code>flow-animate-rise</code></td>
<td>Dramatic rise + scale</td>
</tr>
<tr>
<td><code>flow-animate-swoosh-left</code></td>
<td>Slide with skew from right</td>
</tr>
<tr>
<td><code>flow-animate-swoosh-right</code></td>
<td>Slide with skew from left</td>
</tr>
<tr>
<td><code>flow-animate-roll-in</code></td>
<td>Roll + rotate in</td>
</tr>
<tr>
<td><code>flow-animate-spotlight</code></td>
<td>Scale + rotate entrance</td>
</tr>
<tr>
<td><code>flow-animate-flip-x</code></td>
<td>Flip from X axis</td>
</tr>
<tr>
<td><code>flow-animate-flip-y</code></td>
<td>Flip from Y axis</td>
</tr>
</tbody>
</table>
<pre><code><h1 class="flow-animate-slide-up">Headline</h1>
<p class="flow-animate-fade-in flow-delay-200">Subtitle</p>
<button class="flow-animate-scale-in flow-delay-400">CTA</button></code></pre>
<h2 id="looping">Looping Animations</h2>
<table class="ref-table">
<thead>
<tr>
<th>Class</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>flow-animate-spin</code></td>
<td>Continuous rotation</td>
</tr>
<tr>
<td><code>flow-animate-ping</code></td>
<td>Radar ping expand + fade</td>
</tr>
<tr>
<td><code>flow-animate-pulse</code></td>
<td>Opacity pulse</td>
</tr>
<tr>
<td><code>flow-animate-bounce</code></td>
<td>Vertical bounce</td>
</tr>
<tr>
<td><code>flow-animate-float</code></td>
<td>Gentle up-down float</td>
</tr>
<tr>
<td><code>flow-animate-heartbeat</code></td>
<td>Double-beat pulse</td>
</tr>
<tr>
<td><code>flow-animate-morph</code></td>
<td>Organic border-radius morph</td>
</tr>
<tr>
<td><code>flow-animate-gradient</code></td>
<td>Animated gradient shift</td>
</tr>
<tr>
<td><code>flow-animate-neon-pulse</code></td>
<td>Glow neon pulse</td>
</tr>
<tr>
<td><code>flow-animate-shimmer</code></td>
<td>Loading shimmer sweep</td>
</tr>
<tr>
<td><code>flow-animate-wave</code></td>
<td>Vertical wave</td>
</tr>
</tbody>
</table>
<h2 id="attention">Attention Seekers</h2>
<table class="ref-table">
<thead>
<tr>
<th>Class</th>
<th>Effect</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>flow-animate-shake</code></td>
<td>Horizontal shake (errors)</td>
</tr>
<tr>
<td><code>flow-animate-rubber-band</code></td>
<td>Stretch and snap</td>
</tr>
<tr>
<td><code>flow-animate-tada</code></td>
<td>Scale + wiggle tada</td>
</tr>
<tr>
<td><code>flow-animate-jello</code></td>
<td>Skew jello wobble</td>
</tr>
</tbody>
</table>
<h2 id="scroll-reveal">Scroll Reveal <span class="badge-new">NEW</span></h2>
<pre><code><div class="flow-reveal flow-reveal--up">Appears on scroll</div>
<div class="flow-reveal flow-reveal--left">From left</div>
<div class="flow-reveal flow-reveal--scale">Scale in</div>
<!-- Repeat every scroll -->
<script>Flow.initReveal({ repeat: true });</script></code></pre>
<h2 id="stagger">Stagger Animations <span class="badge-new">NEW</span></h2>
<pre><code><ul class="flow-stagger flow-slide-up">
<li>Animates first</li>
<li>Then this (80ms delay)</li>
<li>Then this (160ms delay)</li>
</ul></code></pre>
<h2 id="typewriter">Typewriter</h2>
<pre><code><!-- CSS only -->
<p class="flow-typewriter">Hello world!</p>
<!-- JS (loop, custom speed) -->
<script>
Flow.typewriter(el, { text: 'Hello!', speed: 60, loop: true });
</script></code></pre>
<h2 id="delays">Delays & Duration</h2>
<table class="ref-table">
<thead>
<tr>
<th>Class</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>flow-delay-75</code></td>
<td>75ms</td>
</tr>
<tr>
<td><code>flow-delay-100</code></td>
<td>100ms</td>
</tr>
<tr>
<td><code>flow-delay-200</code></td>
<td>200ms</td>
</tr>
<tr>
<td><code>flow-delay-300</code></td>
<td>300ms</td>
</tr>
<tr>
<td><code>flow-delay-500</code></td>
<td>500ms</td>
</tr>
<tr>
<td><code>flow-delay-1000</code></td>
<td>1000ms</td>
</tr>
<tr>
<td><code>flow-duration-fast</code></td>
<td>0.2s</td>
</tr>
<tr>
<td><code>flow-duration-slow</code></td>
<td>0.8s</td>
</tr>
</tbody>
</table>
<h2 id="container">Container</h2>
<pre><code><div class="flow-container">...</div>
<div class="flow-container flow-container--sm">Max 480px</div></code></pre>
<h2 id="flex">Flexbox</h2>
<pre><code><div class="flow-flex flow-items-center flow-justify-between flow-gap-4">...</div>
<div class="flow-center" style="height:200px">Centered!</div></code></pre>
<h2 id="grid">Grid</h2>
<pre><code><div class="flow-grid flow-grid-cols-3 flow-gap-6">...</div></code></pre>
<h2 id="auto-grid">Auto Grid <span class="badge-new">NEW</span></h2>
<pre><code><div class="flow-auto-grid flow-gap-6">...</div>
<div class="flow-auto-grid flow-auto-grid--sm">...</div>
<div class="flow-auto-grid" style="--flow-auto-grid-min:200px">...</div></code></pre>
<h2 id="buttons">Buttons</h2>
<pre><code><button class="flow-btn flow-btn--primary">Primary</button>
<button class="flow-btn flow-btn--gradient flow-btn--ripple">Gradient ripple</button>
<button class="flow-btn flow-btn--glow flow-btn--pill">Glow pill</button>
<button class="flow-btn flow-btn--glass">Glass</button>
<button class="flow-btn flow-btn--primary flow-btn--loading">Loading</button></code></pre>
<h2 id="cards">Cards</h2>
<pre><code><div class="flow-card flow-card--hover">Hover lift</div>
<div class="flow-card flow-card--gradient-border">Gradient border</div>
<div class="flow-perspective">
<div class="flow-card flow-card-3d">3D tilt</div>
</div></code></pre>
<h2 id="badges">Badges</h2>
<pre><code><span class="flow-badge flow-badge--primary">New</span>
<span class="flow-badge flow-badge--success flow-badge--dot">Live</span>
<span class="flow-badge flow-badge--danger flow-badge--ping">Alert</span></code></pre>
<h2 id="alerts">Alerts</h2>
<pre><code><div class="flow-alert flow-alert--success">Done!</div>
<div class="flow-alert flow-alert--danger">Error occurred.</div></code></pre>
<h2 id="inputs">Inputs</h2>
<pre><code><div class="flow-form-group">
<label class="flow-label">Email</label>
<input class="flow-input" type="email" placeholder="you@example.com" />
</div></code></pre>
<h2 id="avatars">Avatars</h2>
<pre><code><span class="flow-avatar flow-avatar--md flow-avatar--status">JD</span>
<div class="flow-avatar-group">
<span class="flow-avatar flow-avatar--sm">A</span>
<span class="flow-avatar flow-avatar--sm">B</span>
</div></code></pre>
<h2 id="progress">Progress</h2>
<pre><code><div class="flow-progress">
<div class="flow-progress__bar flow-progress__bar--gradient" style="--flow-progress:70%"></div>
</div></code></pre>
<h2 id="accordion">Accordion</h2>
<pre><code><div class="flow-accordion" data-single>
<div class="flow-accordion__item">
<button class="flow-accordion__trigger">
Question? <span class="flow-accordion__icon">▾</span>
</button>
<div class="flow-accordion__content">
<div class="flow-accordion__body">Answer.</div>
</div>
</div>
</div></code></pre>
<h2 id="tabs">Tabs</h2>
<pre><code><div class="flow-tabs" data-panels="my-panels">
<button class="flow-tab is-active">Tab 1</button>
<button class="flow-tab">Tab 2</button>
</div>
<div id="my-panels">
<div data-panel>Panel 1</div>
<div data-panel style="display:none">Panel 2</div>
</div></code></pre>
<h2 id="toast">Toast</h2>
<pre><code>Flow.toast('Saved!', { type: 'success' });
Flow.toast('Error!', { type: 'danger', duration: 6000 });
Flow.toast('Persistent', { duration: 0 });</code></pre>
<h2 id="skeleton">Skeleton</h2>
<pre><code><div class="flow-skeleton flow-skeleton--title"></div>
<div class="flow-skeleton flow-skeleton--text"></div></code></pre>
<h2 id="spinner">Spinner</h2>
<pre><code><span class="flow-spinner"></span>
<span class="flow-spinner--dots"><span></span><span></span><span></span></span></code></pre>
<h2 id="timeline">Timeline</h2>
<pre><code><div class="flow-timeline">
<div class="flow-timeline__item">
<div class="flow-timeline__date">Jan 2025</div>
<div class="flow-timeline__title">Event title</div>
<div class="flow-timeline__body">Description.</div>
</div>
</div></code></pre>
<h2 id="tooltip">Tooltip</h2>
<pre><code><div class="flow-tooltip-wrap">
<button class="flow-btn flow-btn--outline">Hover me</button>
<div class="flow-tooltip">Tooltip text!</div>
</div></code></pre>
<h2 id="navbar">Navbar</h2>
<pre><code><nav class="flow-navbar flow-navbar--sticky flow-navbar--glass">
<a href="/" class="flow-navbar__brand">Brand</a>
<div class="flow-navbar__nav">
<a href="#" class="flow-navbar__link is-active">Home</a>
<a href="#" class="flow-navbar__link">Docs</a>
</div>
</nav></code></pre>
<h2 id="glass">Glassmorphism <span class="badge-new">NEW</span></h2>
<pre><code><div class="flow-glass flow-rounded-xl flow-p-6">Light glass</div>
<div class="flow-glass--dark flow-rounded-xl flow-p-6">Dark glass</div></code></pre>
<h2 id="3d">3D Transforms <span class="badge-new">NEW</span></h2>
<pre><code><div class="flow-perspective">
<div class="flow-card flow-card-3d">Hover for 3D lift!</div>
</div></code></pre>
<h2 id="gradient-text">Gradient Text <span class="badge-new">NEW</span></h2>
<pre><code><h1 class="flow-text-gradient">Blue → cyan</h1>
<h1 class="flow-text-gradient--warm">Orange → red</h1>
<h1 class="flow-text-gradient--cool">Cyan → purple</h1></code></pre>
<h2 id="shadows">Shadows & Glow</h2>
<pre><code><div class="flow-shadow-xl">XL shadow</div>
<div class="flow-shadow-glow">Primary glow</div>
<button class="flow-btn flow-btn--glow">Neon glow button</button></code></pre>
<h2 id="js-api">Flow.js API Reference</h2>
<table class="ref-table">
<thead>
<tr>
<th>Function</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Flow.initReveal(opts)</code></td>
<td>IntersectionObserver scroll reveal. Options: repeat, threshold, rootMargin</td>
</tr>
<tr>
<td><code>Flow.initStagger()</code></td>
<td>Cascading child animations on scroll</td>
</tr>
<tr>
<td><code>Flow.initAccordion(sel)</code></td>
<td>Accordion open/close toggling</td>
</tr>
<tr>
<td><code>Flow.initTabs()</code></td>
<td>Tab panel switching</td>
</tr>
<tr>
<td><code>Flow.initRipple(sel)</code></td>
<td>Click ripple on buttons</td>
</tr>
<tr>
<td><code>Flow.initTheme()</code></td>
<td>Dark/light theme with localStorage persistence</td>
</tr>
<tr>
<td><code>Flow.initCounters()</code></td>
<td>Number counter animations on scroll</td>
</tr>
<tr>
<td><code>Flow.initSmoothScroll()</code></td>
<td>Smooth scroll for anchor links</td>
</tr>
<tr>
<td><code>Flow.initParallax(sel)</code></td>
<td>Parallax on [data-parallax] elements</td>
</tr>
<tr>
<td><code>Flow.initMagnetic(sel)</code></td>
<td>Magnetic cursor hover on .flow-magnetic</td>
</tr>
<tr>
<td><code>Flow.toast(msg, opts)</code></td>
<td>Show toast notification</td>
</tr>
<tr>
<td><code>Flow.typewriter(el, opts)</code></td>
<td>JS typewriter animation</td>
</tr>
<tr>
<td><code>Flow.animateCounter(el, opts)</code></td>
<td>Animate number from 0 to target</td>
</tr>
</tbody>
</table>
<h2 id="parallax">Parallax</h2>
<pre><code><div data-parallax="0.3">Moves at 30% scroll speed</div>
<div data-parallax="-0.2">Moves upward</div></code></pre>
<h2 id="magnetic">Magnetic <span class="badge-new">NEW</span></h2>
<pre><code><button class="flow-btn flow-btn--primary flow-magnetic">I follow your cursor</button></code></pre>
<h2 id="counter">Counter</h2>
<pre><code><span data-flow-counter data-count="1500" data-prefix="$" data-suffix="+">0</span>
Flow.animateCounter(el, { target: 1000, duration: 2000, suffix: 'k', decimals: 1 });</code></pre>
<div class="callout callout--info" style="margin-top:3rem">
<p>Need help? Open an issue on <a href="https://github.com/Flow-css/flowcss">GitHub</a> or check the <a
href="index.html">website</a>.</p>
</div>
</main>
</div>
<script src="./flow.js"></script>
<script>
const links = document.querySelectorAll('.sidebar-link');
const obs = new IntersectionObserver(entries => {
entries.forEach(e => {
if (e.isIntersecting) {
links.forEach(l => l.classList.remove('active'));
const m = document.querySelector('.sidebar-link[href="#' + e.target.id + '"]');
if (m) m.classList.add('active');
}
});
}, { rootMargin: '-20% 0px -70% 0px' });
document.querySelectorAll('h2[id]').forEach(h => obs.observe(h));
</script>
</body>
</html>