@datafluxgrid/fluxgrid-css 1.0.4 → 1.0.6
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/README.md +556 -154
- package/package.json +1 -1
- package/src/css/animation.css +669 -29
- package/src/css/fonts.css +100 -0
- package/src/css/forms.css +72 -0
- package/src/css/index.css +1 -0
package/README.md
CHANGED
|
@@ -1,94 +1,140 @@
|
|
|
1
1
|
# FluxGrid CSS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**A utility-first CSS framework by [Datafluxgrid](https://www.linkedin.com/company/datafluxgrid)**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
form components, and a full design token system built right in.
|
|
5
|
+
FluxGrid CSS is a complete, production-ready CSS framework that works without any build step, configuration file, or CLI setup. Install it once, import it once, and start building — with dark mode, animations, form components, scroll utilities, print utilities, and a full design token system included out of the box.
|
|
7
6
|
|
|
8
7
|
[](https://www.npmjs.com/package/@datafluxgrid/fluxgrid-css)
|
|
9
8
|
[](https://www.npmjs.com/package/@datafluxgrid/fluxgrid-css)
|
|
10
|
-
[](https://github.com/
|
|
9
|
+
[](https://github.com/vimalkrml/Dev-Template/blob/main/LICENSE)
|
|
11
10
|
|
|
12
11
|
---
|
|
13
12
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
## Table of Contents
|
|
14
|
+
|
|
15
|
+
- [Why FluxGrid CSS](#why-fluxgrid-css)
|
|
16
|
+
- [Features](#features)
|
|
17
|
+
- [Installation](#installation)
|
|
18
|
+
- [Usage](#usage)
|
|
19
|
+
- [File Structure](#file-structure)
|
|
20
|
+
- [Dark Mode](#dark-mode)
|
|
21
|
+
- [Design Tokens](#design-tokens)
|
|
22
|
+
- [Grid System](#grid-system)
|
|
23
|
+
- [Typography](#typography)
|
|
24
|
+
- [Colors](#colors)
|
|
25
|
+
- [Spacing](#spacing)
|
|
26
|
+
- [Effects](#effects)
|
|
27
|
+
- [Animations](#animations)
|
|
28
|
+
- [Form Components](#form-components)
|
|
29
|
+
- [Scroll Utilities](#scroll-utilities)
|
|
30
|
+
- [Print Utilities](#print-utilities)
|
|
31
|
+
- [Font Plugin](#font-plugin)
|
|
32
|
+
- [Contributing](#contributing)
|
|
33
|
+
- [License](#license)
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Why FluxGrid CSS
|
|
38
|
+
|
|
39
|
+
Most CSS frameworks today require a build pipeline before you can write a single line of UI. FluxGrid CSS takes a different approach — it is a single CSS file that works anywhere, in any stack, with zero tooling required.
|
|
40
|
+
|
|
41
|
+
| Feature | Tailwind | Bootstrap | FluxGrid CSS |
|
|
42
|
+
| ------------------------- | ----------------- | --------- | --------------------- |
|
|
43
|
+
| Zero build step | No — requires CLI | Yes | Yes |
|
|
44
|
+
| CDN ready | Partial | Yes | Yes |
|
|
45
|
+
| Dark mode built-in | Config required | No | Yes |
|
|
46
|
+
| CSS Variable theming | No | No | Yes |
|
|
47
|
+
| Form components included | Plugin required | Yes | Yes |
|
|
48
|
+
| Animation library | No | No | Yes |
|
|
49
|
+
| Modular file imports | No | No | Yes |
|
|
50
|
+
| Conflict-free prefix | No | No | Yes — uses `c-` |
|
|
51
|
+
| Reduced motion support | No | No | Yes |
|
|
52
|
+
| Font utilities (optional) | No | No | Yes — separate module |
|
|
53
|
+
| Print utilities | No | Partial | Yes |
|
|
54
|
+
| Scroll snap utilities | Yes | No | Yes |
|
|
28
55
|
|
|
29
56
|
---
|
|
30
57
|
|
|
31
58
|
## Features
|
|
32
59
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
**Zero build step.** No PostCSS, no CLI, no config file. Drop a link tag or run a single install command and you are ready.
|
|
61
|
+
|
|
62
|
+
**Dark mode built-in.** Switch between light and dark using a single HTML attribute or let the browser decide automatically based on the system preference.
|
|
63
|
+
|
|
64
|
+
**CSS Variable theming.** Every color, spacing value, shadow, and radius is a CSS variable. Override your brand color in one line without touching the library.
|
|
65
|
+
|
|
66
|
+
**Modular imports.** Import the full bundle through one file or import only the modules you need — grid, spacing, typography, animations, or forms independently.
|
|
67
|
+
|
|
68
|
+
**Full CSS reset.** A thorough browser reset that normalises styles across Chrome, Firefox, Safari, and Edge before your utilities apply.
|
|
69
|
+
|
|
70
|
+
**Flexbox and CSS Grid.** A 12-column responsive flexbox grid with breakpoints at 640px, 768px, 1024px, 1280px, and 1536px, plus a full CSS Grid utility set with auto-fill and named column spans.
|
|
71
|
+
|
|
72
|
+
**Spacing system.** A complete margin and padding scale from 0 to 128px covering every direction — top, bottom, left, right, horizontal, and vertical — with responsive variants.
|
|
73
|
+
|
|
74
|
+
**Typography utilities.** Font family, size from xs to 8xl, weight from thin to black, line height, letter spacing, text alignment, transform, truncation, and column layout.
|
|
75
|
+
|
|
76
|
+
**Color system.** A full palette for primary, gray, success, error, warning, and info across ten shades each, exposed as utility classes for text, background, border, and gradient.
|
|
77
|
+
|
|
78
|
+
**Effects.** Box shadow, ring, opacity, transform, scale, rotate, translate, skew, filter, backdrop-blur, brightness, contrast, grayscale, sepia, and hover utilities.
|
|
79
|
+
|
|
80
|
+
**Animations.** Over 50 keyframe animations including fade, slide, scale, zoom, flip, rotate, bounce, shake, wiggle, jello, rubber band, tada, float, glow, ripple, typewriter, skeleton loader, shimmer, blur, morph, and more — with full control over duration, delay, iteration, direction, fill mode, and easing.
|
|
81
|
+
|
|
82
|
+
**Form components.** Styled inputs, textareas, selects, checkboxes, radio buttons, range sliders, buttons in six variants and five sizes, input groups, labels, hints, error messages, and a loading button state — all without JavaScript.
|
|
83
|
+
|
|
84
|
+
**Scroll and snap.** Scroll behavior, scroll snap types and alignment, overscroll control, touch action, custom thin scrollbar, and scrollbar hiding utilities.
|
|
85
|
+
|
|
86
|
+
**Print utilities.** Show and hide elements on print, page break control, print-only content, and color adjust for accurate print rendering.
|
|
87
|
+
|
|
88
|
+
**Conflict-free.** Every class uses the `c-` prefix, which means FluxGrid CSS can be safely added to any existing project — legacy codebases, projects already using Bootstrap or Tailwind, or greenfield applications.
|
|
89
|
+
|
|
90
|
+
**Reduced motion.** All animations are automatically disabled for users who have enabled the reduced motion system preference, with no configuration required.
|
|
49
91
|
|
|
50
92
|
---
|
|
51
93
|
|
|
52
94
|
## Installation
|
|
53
95
|
|
|
54
|
-
###
|
|
96
|
+
### Via npm
|
|
55
97
|
|
|
56
98
|
```bash
|
|
57
99
|
npm install @datafluxgrid/fluxgrid-css
|
|
58
100
|
```
|
|
59
101
|
|
|
60
|
-
###
|
|
102
|
+
### Via CDN — no install required
|
|
61
103
|
|
|
62
104
|
```html
|
|
63
105
|
<!-- Full bundle -->
|
|
64
106
|
<link
|
|
65
107
|
rel="stylesheet"
|
|
66
|
-
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/index.css"
|
|
108
|
+
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/css/index.css"
|
|
67
109
|
/>
|
|
68
110
|
|
|
69
|
-
<!--
|
|
111
|
+
<!-- Individual modules -->
|
|
70
112
|
<link
|
|
71
113
|
rel="stylesheet"
|
|
72
|
-
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/tokens.css"
|
|
114
|
+
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/css/tokens.css"
|
|
73
115
|
/>
|
|
74
116
|
<link
|
|
75
117
|
rel="stylesheet"
|
|
76
|
-
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/grid.css"
|
|
118
|
+
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/css/grid.css"
|
|
119
|
+
/>
|
|
120
|
+
<link
|
|
121
|
+
rel="stylesheet"
|
|
122
|
+
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/css/forms.css"
|
|
77
123
|
/>
|
|
78
124
|
```
|
|
79
125
|
|
|
80
|
-
###
|
|
126
|
+
### Via Git clone
|
|
81
127
|
|
|
82
128
|
```bash
|
|
83
|
-
git clone https://github.com/
|
|
84
|
-
cd
|
|
129
|
+
git clone https://github.com/vimalkrml/Dev-Template.git
|
|
130
|
+
cd Dev-Template
|
|
85
131
|
```
|
|
86
132
|
|
|
87
133
|
---
|
|
88
134
|
|
|
89
|
-
##
|
|
135
|
+
## Usage
|
|
90
136
|
|
|
91
|
-
###
|
|
137
|
+
### HTML
|
|
92
138
|
|
|
93
139
|
```html
|
|
94
140
|
<!DOCTYPE html>
|
|
@@ -99,7 +145,7 @@ cd fluxgrid-css
|
|
|
99
145
|
<title>My Project</title>
|
|
100
146
|
<link
|
|
101
147
|
rel="stylesheet"
|
|
102
|
-
href="node_modules/@datafluxgrid/fluxgrid-css/src/index.css"
|
|
148
|
+
href="node_modules/@datafluxgrid/fluxgrid-css/src/css/index.css"
|
|
103
149
|
/>
|
|
104
150
|
</head>
|
|
105
151
|
<body>
|
|
@@ -113,77 +159,131 @@ cd fluxgrid-css
|
|
|
113
159
|
</html>
|
|
114
160
|
```
|
|
115
161
|
|
|
116
|
-
###
|
|
162
|
+
### React, Next.js, or Vite
|
|
117
163
|
|
|
118
164
|
```js
|
|
119
|
-
// main.jsx or _app.jsx
|
|
120
|
-
import "@datafluxgrid/fluxgrid-css/src/index.css";
|
|
165
|
+
// main.jsx or _app.jsx
|
|
166
|
+
import "@datafluxgrid/fluxgrid-css/src/css/index.css";
|
|
121
167
|
```
|
|
122
168
|
|
|
123
|
-
### Modular
|
|
169
|
+
### Modular — import only what you need
|
|
124
170
|
|
|
125
171
|
```js
|
|
126
|
-
import "@datafluxgrid/fluxgrid-css/src/tokens.css";
|
|
127
|
-
import "@datafluxgrid/fluxgrid-css/src/grid.css";
|
|
128
|
-
import "@datafluxgrid/fluxgrid-css/src/spacing.css";
|
|
172
|
+
import "@datafluxgrid/fluxgrid-css/src/css/tokens.css";
|
|
173
|
+
import "@datafluxgrid/fluxgrid-css/src/css/grid.css";
|
|
174
|
+
import "@datafluxgrid/fluxgrid-css/src/css/spacing.css";
|
|
175
|
+
import "@datafluxgrid/fluxgrid-css/src/css/forms.css";
|
|
129
176
|
```
|
|
130
177
|
|
|
131
178
|
---
|
|
132
179
|
|
|
133
|
-
##
|
|
180
|
+
## File Structure
|
|
134
181
|
|
|
135
182
|
```
|
|
136
|
-
src/
|
|
137
|
-
├── index.css
|
|
138
|
-
├── tokens.css
|
|
139
|
-
├── reset.css
|
|
140
|
-
├── grid.css
|
|
141
|
-
├── spacing.css
|
|
142
|
-
├── sizing.css
|
|
143
|
-
├── display.css
|
|
144
|
-
├── typography.css
|
|
145
|
-
├── colors.css
|
|
146
|
-
├── effects.css
|
|
147
|
-
├── animation.css
|
|
148
|
-
├── forms.css
|
|
149
|
-
├── scroll.css
|
|
150
|
-
|
|
183
|
+
src/css/
|
|
184
|
+
├── index.css Entry point — imports all modules
|
|
185
|
+
├── tokens.css CSS variables for colors, spacing, shadows, easing, and typography
|
|
186
|
+
├── reset.css Full browser normalisation reset
|
|
187
|
+
├── grid.css Flexbox grid, CSS Grid, containers, responsive columns
|
|
188
|
+
├── spacing.css Margin and padding utilities across all directions
|
|
189
|
+
├── sizing.css Width, height, min, max, and viewport unit utilities
|
|
190
|
+
├── display.css Display, position, overflow, z-index, float, aspect ratio
|
|
191
|
+
├── typography.css Font family, size, weight, line height, tracking, alignment
|
|
192
|
+
├── colors.css Text, background, border, and gradient color utilities
|
|
193
|
+
├── effects.css Shadows, borders, opacity, transforms, filters, transitions
|
|
194
|
+
├── animation.css 50+ keyframe animations with duration, delay, and easing control
|
|
195
|
+
├── forms.css Input, textarea, select, checkbox, radio, button components
|
|
196
|
+
├── scroll.css Scroll snap, overscroll, touch action, scrollbar utilities
|
|
197
|
+
├── print.css Print show/hide, page breaks, print-only content
|
|
198
|
+
└── fonts.css Optional — Google Font utilities via c-font-* classes
|
|
151
199
|
```
|
|
152
200
|
|
|
153
201
|
---
|
|
154
202
|
|
|
155
|
-
##
|
|
203
|
+
## Dark Mode
|
|
156
204
|
|
|
157
|
-
|
|
205
|
+
FluxGrid CSS supports dark mode out of the box with no JavaScript and no configuration.
|
|
158
206
|
|
|
159
|
-
|
|
207
|
+
**Option 1 — Manual toggle via HTML attribute**
|
|
160
208
|
|
|
161
209
|
```html
|
|
162
210
|
<html data-theme="dark"></html>
|
|
163
211
|
```
|
|
164
212
|
|
|
165
|
-
|
|
213
|
+
**Option 2 — Automatic via system preference**
|
|
214
|
+
|
|
215
|
+
```html
|
|
216
|
+
<html>
|
|
217
|
+
<!-- Dark mode activates automatically when the user's OS is set to dark -->
|
|
218
|
+
</html>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Option 3 — JavaScript toggle**
|
|
222
|
+
|
|
223
|
+
```js
|
|
224
|
+
document.documentElement.setAttribute("data-theme", "dark");
|
|
225
|
+
document.documentElement.setAttribute("data-theme", "light");
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Prevent auto dark mode**
|
|
166
229
|
|
|
167
230
|
```html
|
|
168
|
-
|
|
169
|
-
|
|
231
|
+
<html data-theme="light">
|
|
232
|
+
<!-- Forces light mode even when the system prefers dark -->
|
|
233
|
+
</html>
|
|
170
234
|
```
|
|
171
235
|
|
|
172
|
-
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Design Tokens
|
|
239
|
+
|
|
240
|
+
Every design decision in FluxGrid CSS is exposed as a CSS variable. Override any token in your own stylesheet and the change propagates across all utilities that reference it.
|
|
173
241
|
|
|
174
242
|
```css
|
|
175
243
|
:root {
|
|
176
|
-
|
|
177
|
-
--c-
|
|
178
|
-
--c-
|
|
244
|
+
/* Brand */
|
|
245
|
+
--c-primary-500: #6c63ff;
|
|
246
|
+
--c-primary-600: #5a52d5;
|
|
247
|
+
--c-primary-700: #4a43b8;
|
|
248
|
+
|
|
249
|
+
/* Typography */
|
|
250
|
+
--c-font-sans: "Inter", system-ui, sans-serif;
|
|
251
|
+
--c-font-mono: "Fira Code", Consolas, monospace;
|
|
252
|
+
|
|
253
|
+
/* Shape */
|
|
254
|
+
--c-radius-md: 10px;
|
|
255
|
+
--c-radius-lg: 16px;
|
|
256
|
+
|
|
257
|
+
/* Elevation */
|
|
258
|
+
--c-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
|
|
259
|
+
--c-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
|
|
260
|
+
|
|
261
|
+
/* Semantic */
|
|
262
|
+
--c-bg: #ffffff;
|
|
263
|
+
--c-fg: #111827;
|
|
264
|
+
--c-muted: #6b7280;
|
|
265
|
+
--c-border: #e5e7eb;
|
|
266
|
+
--c-accent: #2563eb;
|
|
179
267
|
}
|
|
180
268
|
```
|
|
181
269
|
|
|
182
270
|
---
|
|
183
271
|
|
|
184
|
-
##
|
|
272
|
+
## Grid System
|
|
273
|
+
|
|
274
|
+
A 12-column responsive flexbox grid with five breakpoints and a full CSS Grid utility set.
|
|
275
|
+
|
|
276
|
+
**Breakpoints**
|
|
185
277
|
|
|
186
|
-
|
|
278
|
+
| Prefix | Minimum width |
|
|
279
|
+
| ------ | ---------------- |
|
|
280
|
+
| (none) | All screen sizes |
|
|
281
|
+
| md | 768px |
|
|
282
|
+
| lg | 1024px |
|
|
283
|
+
| xl | 1280px |
|
|
284
|
+
| 2xl | 1536px |
|
|
285
|
+
|
|
286
|
+
**Flexbox grid**
|
|
187
287
|
|
|
188
288
|
```html
|
|
189
289
|
<!-- Two equal columns -->
|
|
@@ -192,63 +292,306 @@ No JavaScript required. Two ways to activate:
|
|
|
192
292
|
<div class="c-col-6">Right</div>
|
|
193
293
|
</div>
|
|
194
294
|
|
|
195
|
-
<!--
|
|
295
|
+
<!-- Sidebar layout -->
|
|
296
|
+
<div class="c-row">
|
|
297
|
+
<div class="c-col-4">Sidebar</div>
|
|
298
|
+
<div class="c-col-8">Main content</div>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
<!-- Responsive columns — stacks on mobile, side by side on tablet, thirds on desktop -->
|
|
196
302
|
<div class="c-row">
|
|
197
303
|
<div class="c-col-12 c-col-md-6 c-col-lg-4">Card</div>
|
|
198
304
|
<div class="c-col-12 c-col-md-6 c-col-lg-4">Card</div>
|
|
199
305
|
<div class="c-col-12 c-col-md-6 c-col-lg-4">Card</div>
|
|
200
306
|
</div>
|
|
307
|
+
```
|
|
201
308
|
|
|
202
|
-
|
|
309
|
+
**CSS Grid**
|
|
310
|
+
|
|
311
|
+
```html
|
|
312
|
+
<!-- Three equal columns with gap -->
|
|
203
313
|
<div class="c-grid c-grid-cols-3 c-gap-6">
|
|
204
314
|
<div>One</div>
|
|
205
315
|
<div>Two</div>
|
|
206
316
|
<div>Three</div>
|
|
207
317
|
</div>
|
|
208
318
|
|
|
209
|
-
<!--
|
|
210
|
-
<div
|
|
211
|
-
|
|
319
|
+
<!-- Auto-fill responsive grid -->
|
|
320
|
+
<div
|
|
321
|
+
class="c-grid c-gap-4"
|
|
322
|
+
style="grid-template-columns: repeat(auto-fill, minmax(200px, 1fr))"
|
|
323
|
+
>
|
|
324
|
+
<div>Item</div>
|
|
325
|
+
<div>Item</div>
|
|
326
|
+
<div>Item</div>
|
|
327
|
+
</div>
|
|
328
|
+
|
|
329
|
+
<!-- Span columns -->
|
|
330
|
+
<div class="c-grid c-grid-cols-12 c-gap-4">
|
|
331
|
+
<div class="c-col-span-8">Main</div>
|
|
332
|
+
<div class="c-col-span-4">Aside</div>
|
|
333
|
+
</div>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Container widths**
|
|
337
|
+
|
|
338
|
+
```html
|
|
339
|
+
<div class="c-container">
|
|
340
|
+
<!-- max-width: 1152px -->
|
|
341
|
+
<div class="c-container-sm">
|
|
342
|
+
<!-- max-width: 640px -->
|
|
343
|
+
<div class="c-container-lg">
|
|
344
|
+
<!-- max-width: 1024px -->
|
|
345
|
+
<div class="c-container-xl">
|
|
346
|
+
<!-- max-width: 1280px -->
|
|
347
|
+
<div class="c-container-fluid"><!-- full width --></div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
212
351
|
</div>
|
|
213
352
|
```
|
|
214
353
|
|
|
215
354
|
---
|
|
216
355
|
|
|
217
|
-
##
|
|
356
|
+
## Typography
|
|
218
357
|
|
|
219
|
-
|
|
358
|
+
```html
|
|
359
|
+
<!-- Font size -->
|
|
360
|
+
<p class="c-text-xs">Extra small</p>
|
|
361
|
+
<p class="c-text-sm">Small</p>
|
|
362
|
+
<p class="c-text-base">Base</p>
|
|
363
|
+
<p class="c-text-lg">Large</p>
|
|
364
|
+
<p class="c-text-xl">Extra large</p>
|
|
365
|
+
<p class="c-text-2xl">2xl</p>
|
|
366
|
+
<p class="c-text-4xl">4xl</p>
|
|
367
|
+
<p class="c-text-6xl">6xl</p>
|
|
368
|
+
|
|
369
|
+
<!-- Font weight -->
|
|
370
|
+
<p class="c-font-light">Light</p>
|
|
371
|
+
<p class="c-font-normal">Normal</p>
|
|
372
|
+
<p class="c-font-medium">Medium</p>
|
|
373
|
+
<p class="c-font-semibold">Semibold</p>
|
|
374
|
+
<p class="c-font-bold">Bold</p>
|
|
375
|
+
<p class="c-font-black">Black</p>
|
|
376
|
+
|
|
377
|
+
<!-- Alignment -->
|
|
378
|
+
<p class="c-text-left">Left</p>
|
|
379
|
+
<p class="c-text-center">Center</p>
|
|
380
|
+
<p class="c-text-right">Right</p>
|
|
381
|
+
|
|
382
|
+
<!-- Transform -->
|
|
383
|
+
<p class="c-uppercase">Uppercase</p>
|
|
384
|
+
<p class="c-capitalize">Capitalize</p>
|
|
385
|
+
<p class="c-truncate">Long text that gets cut off with an ellipsis</p>
|
|
386
|
+
```
|
|
220
387
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Colors
|
|
391
|
+
|
|
392
|
+
```html
|
|
393
|
+
<!-- Text color -->
|
|
394
|
+
<p class="c-text-primary-500">Primary</p>
|
|
395
|
+
<p class="c-text-success-600">Success</p>
|
|
396
|
+
<p class="c-text-error-600">Error</p>
|
|
397
|
+
<p class="c-text-muted">Muted</p>
|
|
398
|
+
|
|
399
|
+
<!-- Background -->
|
|
400
|
+
<div class="c-bg-primary-50">Light primary background</div>
|
|
401
|
+
<div class="c-bg-gray-900">Dark background</div>
|
|
402
|
+
<div class="c-bg-success-100">Success tint</div>
|
|
403
|
+
|
|
404
|
+
<!-- Border -->
|
|
405
|
+
<div class="c-border c-border-primary-500">Primary border</div>
|
|
406
|
+
<div class="c-border c-border-error-500">Error border</div>
|
|
407
|
+
|
|
408
|
+
<!-- Gradient -->
|
|
409
|
+
<div class="c-gradient-to-r" style="--c-from: #3b82f6; --c-to: #8b5cf6;">
|
|
410
|
+
Gradient
|
|
411
|
+
</div>
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Spacing
|
|
417
|
+
|
|
418
|
+
```html
|
|
419
|
+
<!-- Margin -->
|
|
420
|
+
<div class="c-mt-4">margin-top: 16px</div>
|
|
421
|
+
<div class="c-mb-8">margin-bottom: 32px</div>
|
|
422
|
+
<div class="c-mx-auto">centered horizontally</div>
|
|
423
|
+
<div class="c-my-6">vertical margin: 24px</div>
|
|
424
|
+
|
|
425
|
+
<!-- Padding -->
|
|
426
|
+
<div class="c-p-6">padding: 24px</div>
|
|
427
|
+
<div class="c-px-4">horizontal padding: 16px</div>
|
|
428
|
+
<div class="c-py-8">vertical padding: 32px</div>
|
|
429
|
+
<div class="c-pt-12">padding-top: 48px</div>
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## Effects
|
|
435
|
+
|
|
436
|
+
```html
|
|
437
|
+
<!-- Shadow -->
|
|
438
|
+
<div class="c-shadow-sm">Small shadow</div>
|
|
439
|
+
<div class="c-shadow-md">Medium shadow</div>
|
|
440
|
+
<div class="c-shadow-xl">Extra large shadow</div>
|
|
441
|
+
|
|
442
|
+
<!-- Border radius -->
|
|
443
|
+
<div class="c-rounded">8px</div>
|
|
444
|
+
<div class="c-rounded-lg">16px</div>
|
|
445
|
+
<div class="c-rounded-full">Pill</div>
|
|
446
|
+
|
|
447
|
+
<!-- Opacity -->
|
|
448
|
+
<div class="c-opacity-50">50% opacity</div>
|
|
449
|
+
<div class="c-opacity-75">75% opacity</div>
|
|
450
|
+
|
|
451
|
+
<!-- Transforms -->
|
|
452
|
+
<div class="c-scale-105">Scaled 105%</div>
|
|
453
|
+
<div class="c-rotate-45">Rotated 45deg</div>
|
|
454
|
+
<div class="c-translate-y-2">Moved down 8px</div>
|
|
455
|
+
|
|
456
|
+
<!-- Filters -->
|
|
457
|
+
<img class="c-grayscale" src="photo.jpg" alt="" />
|
|
458
|
+
<img class="c-blur-sm" src="photo.jpg" alt="" />
|
|
459
|
+
<div class="c-backdrop-blur-md">Glass morphism</div>
|
|
460
|
+
|
|
461
|
+
<!-- Hover utilities -->
|
|
462
|
+
<div class="c-hover-lift c-transition">Lifts on hover</div>
|
|
463
|
+
<div class="c-hover-scale c-transition">Scales on hover</div>
|
|
464
|
+
<div class="c-hover-shadow c-transition">Shadow on hover</div>
|
|
228
465
|
```
|
|
229
466
|
|
|
230
467
|
---
|
|
231
468
|
|
|
232
|
-
##
|
|
469
|
+
## Animations
|
|
233
470
|
|
|
234
|
-
|
|
471
|
+
Over 50 keyframe animations with full control over duration, delay, iteration count, direction, fill mode, and easing.
|
|
235
472
|
|
|
236
473
|
```html
|
|
237
|
-
<!--
|
|
474
|
+
<!-- Entrance animations -->
|
|
475
|
+
<div class="c-animate-fade-in">Fade in</div>
|
|
476
|
+
<div class="c-animate-fade-in-up">Fade in from below</div>
|
|
477
|
+
<div class="c-animate-slide-up">Slide up</div>
|
|
478
|
+
<div class="c-animate-scale-in">Scale in</div>
|
|
479
|
+
<div class="c-animate-zoom-in">Zoom in</div>
|
|
480
|
+
<div class="c-animate-flip-x">Flip on X axis</div>
|
|
481
|
+
<div class="c-animate-blur-in">Blur in</div>
|
|
482
|
+
<div class="c-animate-roll-in">Roll in</div>
|
|
483
|
+
<div class="c-animate-drop-in">Drop in with bounce</div>
|
|
484
|
+
|
|
485
|
+
<!-- Attention seekers -->
|
|
486
|
+
<div class="c-animate-bounce">Bounce</div>
|
|
487
|
+
<div class="c-animate-shake">Shake</div>
|
|
488
|
+
<div class="c-animate-wiggle">Wiggle</div>
|
|
489
|
+
<div class="c-animate-heartbeat">Heartbeat</div>
|
|
490
|
+
<div class="c-animate-rubber-band">Rubber band</div>
|
|
491
|
+
<div class="c-animate-jello">Jello</div>
|
|
492
|
+
<div class="c-animate-tada">Tada</div>
|
|
493
|
+
<div class="c-animate-swing">Swing</div>
|
|
494
|
+
|
|
495
|
+
<!-- Continuous -->
|
|
496
|
+
<div class="c-animate-spin">Spin</div>
|
|
497
|
+
<div class="c-animate-pulse">Pulse</div>
|
|
498
|
+
<div class="c-animate-float">Float</div>
|
|
499
|
+
<div class="c-animate-glow">Glow</div>
|
|
500
|
+
<div class="c-animate-morph">Morph shape</div>
|
|
501
|
+
<div class="c-animate-ping">Ping</div>
|
|
502
|
+
|
|
503
|
+
<!-- Loading states -->
|
|
504
|
+
<div class="c-animate-skeleton c-rounded c-h-4 c-w-100"></div>
|
|
505
|
+
<div class="c-animate-shimmer">Shimmer</div>
|
|
506
|
+
|
|
507
|
+
<!-- Typewriter effect -->
|
|
508
|
+
<p class="c-animate-typewriter">This types itself out.</p>
|
|
509
|
+
|
|
510
|
+
<!-- Control -->
|
|
511
|
+
<div class="c-animate-fade-in c-animate-delay-300 c-animate-duration-700">
|
|
512
|
+
Delayed, slower fade
|
|
513
|
+
</div>
|
|
514
|
+
<div class="c-animate-spin c-animate-infinite c-animate-ease-linear">
|
|
515
|
+
Continuous spin
|
|
516
|
+
</div>
|
|
517
|
+
<div class="c-animate-bounce c-animate-repeat-3">Bounces three times</div>
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
**Available animations**
|
|
521
|
+
|
|
522
|
+
fade-in, fade-out, fade-in-up, fade-in-down, fade-in-left, fade-in-right, fade-out-up, fade-out-down, slide-up, slide-down, slide-left, slide-right, slide-out-up, slide-out-down, slide-out-left, slide-out-right, scale-in, scale-out, scale-in-x, scale-in-y, zoom-in, zoom-out, flip-x, flip-y, rotate-in, rotate-out, spin, spin-reverse, spin-slow, spin-fast, ping, pulse, pulse-scale, bounce, bounce-x, shake, shake-y, wiggle, heartbeat, float, float-x, swing, rubber-band, jello, tada, glow, glow-text, ripple, draw, morph, flip-card, roll-in, drop-in, blur-in, blur-out, progress, blink, skeleton, shimmer, typewriter
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Form Components
|
|
527
|
+
|
|
528
|
+
All form components are styled through CSS only — no JavaScript, no dependencies.
|
|
529
|
+
|
|
530
|
+
```html
|
|
531
|
+
<!-- Text input -->
|
|
238
532
|
<div class="c-form-group">
|
|
239
|
-
<label class="c-label c-label-required">
|
|
240
|
-
<input type="
|
|
241
|
-
<span class="c-form-hint">
|
|
533
|
+
<label class="c-label c-label-required">Full Name</label>
|
|
534
|
+
<input type="text" class="c-input" placeholder="John Doe" />
|
|
535
|
+
<span class="c-form-hint">Enter your full legal name.</span>
|
|
242
536
|
</div>
|
|
243
537
|
|
|
538
|
+
<!-- Input states -->
|
|
539
|
+
<input class="c-input" placeholder="Default" />
|
|
540
|
+
<input class="c-input c-input-error" placeholder="Error" />
|
|
541
|
+
<input class="c-input c-input-success" placeholder="Success" />
|
|
542
|
+
|
|
543
|
+
<!-- Input sizes -->
|
|
544
|
+
<input class="c-input c-input-sm" placeholder="Small" />
|
|
545
|
+
<input class="c-input" placeholder="Default" />
|
|
546
|
+
<input class="c-input c-input-lg" placeholder="Large" />
|
|
547
|
+
|
|
548
|
+
<!-- Textarea -->
|
|
549
|
+
<textarea class="c-textarea" rows="5" placeholder="Your message"></textarea>
|
|
550
|
+
|
|
244
551
|
<!-- Select -->
|
|
245
552
|
<select class="c-select">
|
|
246
|
-
<option>
|
|
247
|
-
<option>Option
|
|
553
|
+
<option>Choose an option</option>
|
|
554
|
+
<option>Option One</option>
|
|
555
|
+
<option>Option Two</option>
|
|
248
556
|
</select>
|
|
249
557
|
|
|
250
|
-
<!--
|
|
251
|
-
<
|
|
558
|
+
<!-- Select sizes -->
|
|
559
|
+
<select class="c-select c-select-sm">
|
|
560
|
+
...
|
|
561
|
+
</select>
|
|
562
|
+
<select class="c-select c-select-lg">
|
|
563
|
+
...
|
|
564
|
+
</select>
|
|
565
|
+
|
|
566
|
+
<!-- Select states -->
|
|
567
|
+
<select class="c-select c-select-error">
|
|
568
|
+
...
|
|
569
|
+
</select>
|
|
570
|
+
<select class="c-select c-select-success">
|
|
571
|
+
...
|
|
572
|
+
</select>
|
|
573
|
+
|
|
574
|
+
<!-- Checkbox -->
|
|
575
|
+
<label class="c-flex c-items-center c-gap-2">
|
|
576
|
+
<input type="checkbox" />
|
|
577
|
+
<span class="c-text-sm">I agree to the terms</span>
|
|
578
|
+
</label>
|
|
579
|
+
|
|
580
|
+
<!-- Radio -->
|
|
581
|
+
<label class="c-flex c-items-center c-gap-2">
|
|
582
|
+
<input type="radio" name="plan" />
|
|
583
|
+
<span class="c-text-sm">Starter</span>
|
|
584
|
+
</label>
|
|
585
|
+
|
|
586
|
+
<!-- Range slider -->
|
|
587
|
+
<input type="range" min="0" max="100" />
|
|
588
|
+
|
|
589
|
+
<!-- Input group -->
|
|
590
|
+
<div class="c-input-group">
|
|
591
|
+
<span class="c-input-addon">https://</span>
|
|
592
|
+
<input type="text" class="c-input" placeholder="yoursite.com" />
|
|
593
|
+
<span class="c-input-addon">.com</span>
|
|
594
|
+
</div>
|
|
252
595
|
|
|
253
596
|
<!-- Buttons -->
|
|
254
597
|
<button class="c-btn c-btn-primary">Primary</button>
|
|
@@ -256,95 +599,154 @@ Production-ready form elements with no JavaScript:
|
|
|
256
599
|
<button class="c-btn c-btn-outline">Outline</button>
|
|
257
600
|
<button class="c-btn c-btn-ghost">Ghost</button>
|
|
258
601
|
<button class="c-btn c-btn-danger">Danger</button>
|
|
602
|
+
<button class="c-btn c-btn-success">Success</button>
|
|
259
603
|
|
|
260
604
|
<!-- Button sizes -->
|
|
605
|
+
<button class="c-btn c-btn-primary c-btn-xs">XSmall</button>
|
|
261
606
|
<button class="c-btn c-btn-primary c-btn-sm">Small</button>
|
|
607
|
+
<button class="c-btn c-btn-primary">Default</button>
|
|
262
608
|
<button class="c-btn c-btn-primary c-btn-lg">Large</button>
|
|
609
|
+
<button class="c-btn c-btn-primary c-btn-xl">XLarge</button>
|
|
263
610
|
<button class="c-btn c-btn-primary c-btn-full">Full Width</button>
|
|
264
611
|
|
|
265
612
|
<!-- Loading state -->
|
|
266
|
-
<button class="c-btn c-btn-primary c-btn-loading">
|
|
613
|
+
<button class="c-btn c-btn-primary c-btn-loading">Processing...</button>
|
|
267
614
|
|
|
268
|
-
<!--
|
|
269
|
-
<
|
|
270
|
-
<span class="c-input-addon">https://</span>
|
|
271
|
-
<input type="text" class="c-input" placeholder="yoursite.com" />
|
|
272
|
-
</div>
|
|
615
|
+
<!-- Disabled -->
|
|
616
|
+
<button class="c-btn c-btn-primary" disabled>Disabled</button>
|
|
273
617
|
```
|
|
274
618
|
|
|
275
619
|
---
|
|
276
620
|
|
|
277
|
-
##
|
|
278
|
-
|
|
279
|
-
16 built-in keyframe animations with full duration, delay, and iteration control:
|
|
621
|
+
## Scroll Utilities
|
|
280
622
|
|
|
281
623
|
```html
|
|
282
|
-
|
|
283
|
-
<
|
|
284
|
-
|
|
285
|
-
<
|
|
286
|
-
<
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
624
|
+
<!-- Smooth scroll behavior -->
|
|
625
|
+
<html class="c-scroll-smooth">
|
|
626
|
+
<!-- Horizontal scroll snap carousel -->
|
|
627
|
+
<div class="c-flex c-snap-x c-overflow-x-auto c-scrollbar-none c-gap-4">
|
|
628
|
+
<div
|
|
629
|
+
class="c-snap-start c-flex-shrink-0 c-w-80 c-rounded-xl c-bg-gray-100 c-p-6"
|
|
630
|
+
>
|
|
631
|
+
Slide 1
|
|
632
|
+
</div>
|
|
633
|
+
<div
|
|
634
|
+
class="c-snap-start c-flex-shrink-0 c-w-80 c-rounded-xl c-bg-gray-100 c-p-6"
|
|
635
|
+
>
|
|
636
|
+
Slide 2
|
|
637
|
+
</div>
|
|
638
|
+
<div
|
|
639
|
+
class="c-snap-start c-flex-shrink-0 c-w-80 c-rounded-xl c-bg-gray-100 c-p-6"
|
|
640
|
+
>
|
|
641
|
+
Slide 3
|
|
642
|
+
</div>
|
|
643
|
+
</div>
|
|
644
|
+
|
|
645
|
+
<!-- Vertical scroll with custom scrollbar -->
|
|
646
|
+
<div class="c-overflow-y-auto c-scrollbar-thin c-max-h-64">
|
|
647
|
+
Long scrollable content...
|
|
648
|
+
</div>
|
|
649
|
+
|
|
650
|
+
<!-- Hide scrollbar entirely -->
|
|
651
|
+
<div class="c-overflow-x-auto c-scrollbar-none">
|
|
652
|
+
Horizontal scroll without visible scrollbar
|
|
653
|
+
</div>
|
|
654
|
+
|
|
655
|
+
<!-- Overscroll containment -->
|
|
656
|
+
<div class="c-overscroll-contain c-overflow-y-auto">
|
|
657
|
+
Scroll stops at the boundary
|
|
658
|
+
</div>
|
|
659
|
+
</html>
|
|
292
660
|
```
|
|
293
661
|
|
|
294
|
-
Available: `fade-in` `fade-out` `slide-up` `slide-down` `slide-left` `slide-right` `scale-in` `scale-out` `spin` `ping` `pulse` `bounce` `shake` `wiggle` `float` `heartbeat` `skeleton` `blink`
|
|
295
|
-
|
|
296
662
|
---
|
|
297
663
|
|
|
298
|
-
##
|
|
664
|
+
## Print Utilities
|
|
299
665
|
|
|
300
666
|
```html
|
|
301
|
-
|
|
302
|
-
<
|
|
303
|
-
<
|
|
304
|
-
|
|
667
|
+
<!-- Hide in print -->
|
|
668
|
+
<nav class="c-print-hidden">Site navigation</nav>
|
|
669
|
+
<aside class="c-print-hidden">Sidebar ads</aside>
|
|
670
|
+
|
|
671
|
+
<!-- Show only in print -->
|
|
672
|
+
<div class="c-print-only">Printed on: June 2026 — Confidential</div>
|
|
673
|
+
|
|
674
|
+
<!-- Page break control -->
|
|
675
|
+
<section class="c-print-break-inside-avoid">
|
|
676
|
+
This section will not split across pages
|
|
677
|
+
</section>
|
|
678
|
+
<div class="c-print-break-before">Starts on a new page</div>
|
|
679
|
+
<div class="c-print-break-after">Forces a new page after</div>
|
|
680
|
+
|
|
681
|
+
<!-- Preserve background colors in print -->
|
|
682
|
+
<div class="c-print-color-adjust-exact c-bg-primary-500">
|
|
683
|
+
Background prints accurately
|
|
684
|
+
</div>
|
|
305
685
|
```
|
|
306
686
|
|
|
307
687
|
---
|
|
308
688
|
|
|
309
|
-
##
|
|
689
|
+
## Font Plugin
|
|
690
|
+
|
|
691
|
+
FluxGrid CSS ships a separate optional font module that provides 15 Google Font families through simple utility classes. The core package loads zero fonts — the font module must be explicitly imported.
|
|
692
|
+
|
|
693
|
+
### Import
|
|
310
694
|
|
|
311
695
|
```html
|
|
312
|
-
<!--
|
|
313
|
-
<
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
696
|
+
<!-- HTML -->
|
|
697
|
+
<link
|
|
698
|
+
rel="stylesheet"
|
|
699
|
+
href="https://cdn.jsdelivr.net/npm/@datafluxgrid/fluxgrid-css/src/css/fonts.css"
|
|
700
|
+
/>
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
```js
|
|
704
|
+
// React / Vite
|
|
705
|
+
import "@datafluxgrid/fluxgrid-css/src/css/fonts.css";
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
### Available fonts
|
|
317
709
|
|
|
318
|
-
|
|
319
|
-
<
|
|
710
|
+
```html
|
|
711
|
+
<h1 class="c-font-poppins c-font-bold">Heading in Poppins Bold</h1>
|
|
712
|
+
<p class="c-font-inter c-font-regular">Body text in Inter Regular</p>
|
|
713
|
+
<code class="c-font-fira-code">const x = 10;</code>
|
|
714
|
+
<h2 class="c-font-playfair c-font-semibold">Editorial heading</h2>
|
|
715
|
+
<p class="c-font-dm-sans">Clean modern paragraph</p>
|
|
320
716
|
```
|
|
321
717
|
|
|
322
|
-
|
|
718
|
+
**Font families:** inter, poppins, roboto, montserrat, open-sans, lato, nunito, merriweather, playfair, fira-code, dm-sans, space-grotesk, outfit, jakarta, geist
|
|
323
719
|
|
|
324
|
-
|
|
720
|
+
**Font weights:** thin (100), extralight (200), light (300), regular (400), medium (500), semibold (600), bold (700), extrabold (800), black (900)
|
|
325
721
|
|
|
326
722
|
```html
|
|
327
|
-
<
|
|
328
|
-
<
|
|
329
|
-
<div class="c-print-break-inside-avoid">Keep this block together</div>
|
|
723
|
+
<h1 class="c-font-montserrat c-font-black">Black weight heading</h1>
|
|
724
|
+
<p class="c-font-nunito c-font-light c-font-italic">Light italic paragraph</p>
|
|
330
725
|
```
|
|
331
726
|
|
|
332
727
|
---
|
|
333
728
|
|
|
334
|
-
##
|
|
729
|
+
## Contributing
|
|
335
730
|
|
|
336
|
-
Contributions are welcome
|
|
731
|
+
Contributions are welcome. Please follow the process below to maintain code quality and consistency.
|
|
337
732
|
|
|
338
|
-
1. Fork the repository
|
|
339
|
-
2. Create
|
|
340
|
-
3.
|
|
341
|
-
4.
|
|
342
|
-
5.
|
|
733
|
+
1. Fork the repository on GitHub
|
|
734
|
+
2. Create a feature branch from `dev` — `git checkout -b feature/your-feature`
|
|
735
|
+
3. Write your changes following the existing naming conventions and `c-` prefix pattern
|
|
736
|
+
4. Commit with a clear message — `git commit -m "feat: add c-grid-dense utility"`
|
|
737
|
+
5. Push to your fork — `git push origin feature/your-feature`
|
|
738
|
+
6. Open a Pull Request targeting the `dev` branch, not `main`
|
|
343
739
|
|
|
344
|
-
|
|
740
|
+
Direct pushes to `main` are not accepted. All changes go through Pull Requests and are reviewed before merging into the release branch.
|
|
345
741
|
|
|
346
742
|
---
|
|
347
743
|
|
|
348
|
-
##
|
|
744
|
+
## License
|
|
745
|
+
|
|
746
|
+
MIT License. Copyright Datafluxgrid.
|
|
747
|
+
|
|
748
|
+
See [LICENSE](https://github.com/vimalkrml/Dev-Template/blob/main/LICENSE) for the full text.
|
|
749
|
+
|
|
750
|
+
---
|
|
349
751
|
|
|
350
|
-
|
|
752
|
+
Built and maintained by [Vimal K R](https://github.com/vimalkrml) — [Datafluxgrid](https://www.linkedin.com/company/datafluxgrid)
|