@seip/blue-bird-css 0.1.0

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 ADDED
@@ -0,0 +1,930 @@
1
+ # 🐦 Blue Bird CSS & JS Framework
2
+
3
+ A lightweight, semantic, modern design framework inspired by modern aesthetics and Tailwind-like utility speed. **Zero build step and zero configuration required**.
4
+
5
+ 📖 **[Live Interactive Documentation](https://seip25.github.io/Blue-bird-css/)**
6
+
7
+ ---
8
+
9
+ ## 📋 Table of Contents
10
+
11
+ - [⚡ Key Features](#-key-features)
12
+ - [🚀 Quick Start (NPM & CDN)](#-quick-start-npm--cdn)
13
+ - [✨ VS Code Autocompletion & TypeScript](#-vs-code-autocompletion--typescript)
14
+ - [🧠 JavaScript Engine (`bluebird.js`) & API](#-javascript-engine-bluebirdjs--api)
15
+ - [Core `bluebird()` Function](#core-bluebird-function)
16
+ - [Responsive Data Table (`ResponsiveDataTable`)](#responsive-data-table-responsivedatatable)
17
+ - [Toast Notifications (`toast()`)](#toast-notifications-toast)
18
+ - [Snackbar (`snackbar()`)](#snackbar-snackbar)
19
+ - [Command Palette (`Ctrl+K`)](#command-palette-ctrlk)
20
+ - [4-Direction Drawer Panels](#4-direction-drawer-panels)
21
+ - [Interactive Tabs](#interactive-tabs)
22
+ - [Touch & Drag Carousel](#touch--drag-carousel)
23
+ - [Automatic Mobile Navigation](#automatic-mobile-navigation)
24
+ - [HTTP Fetch Client (`Http()`)](#http-fetch-client-http)
25
+ - [URL Parameter Helper (`getUrlParameter()`)](#url-parameter-helper-geturlparameter)
26
+ - [Declarative HTML `data-*` Attributes](#declarative-html-data--attributes)
27
+ - [🎨 CSS Components & Utilities](#-css-components--utilities)
28
+ - [Buttons, Soft Tint & Cyberpunk Glow](#buttons-soft-tint--cyberpunk-glow)
29
+ - [Badges & Tooltips](#badges--tooltips)
30
+ - [Forms & Floating Labels](#forms--floating-labels)
31
+ - [Cards](#cards)
32
+ - [Modals (`<dialog>`)](#modals-dialog)
33
+ - [Dropdowns](#dropdowns)
34
+ - [Tables](#tables)
35
+ - [Skeleton Loading Placeholders](#skeleton-loading-placeholders)
36
+ - [Progress Bars, Gauge & Spinners](#progress-bars-gauge--spinners)
37
+ - [Bottom Navigation](#bottom-navigation)
38
+ - [📐 Layout System & Grid](#-layout-system--grid)
39
+ - [Containers](#containers)
40
+ - [Grid System (1 to 12 Columns)](#grid-system-1-to-12-columns)
41
+ - [Flexbox & Spacing](#flexbox--spacing)
42
+ - [Responsiveness & Breakpoints](#responsiveness--breakpoints)
43
+ - [✨ CSS Animations & Motion Effects](#-css-animations--motion-effects)
44
+ - [🎨 Theming & Light / Dark Mode](#-theming--light--dark-mode)
45
+ - [📄 License](#-license)
46
+
47
+ ---
48
+
49
+ ## ⚡ Key Features
50
+
51
+ - **Semantic HTML First**: Automatic out-of-the-box styling for base HTML tags (`button`, `header`, `main`, `aside`, `input`, `select`, `textarea`, `table`, `progress`, `dialog`, `<details><summary>`).
52
+ - **Modern Design Language**: Clean borders, consistent rounded corners (`rounded-xl`), sleek dark palettes with high-contrast accents, and subtle glassmorphic shadows.
53
+ - **Subtle & Soft Tint Buttons**: Tinted soft background buttons (`bg-primary-subtle`, `bg-blue-subtle`, `bg-green-subtle`, `bg-purple-subtle`, `bg-red-subtle`, `bg-pink-subtle`, etc.).
54
+ - **Perfectly Aligned Link Buttons**: Text link buttons (`.btn-link` or `a.link`) engineered to match standard button height and baseline vertical alignment exactly when placed side-by-side with solid buttons.
55
+ - **Filled Floating Inputs**: Floating label inputs supporting both Outline style (`.floating`) and Material/Modern filled container style (`.floating-fill`).
56
+ - **Cyberpunk Neon & Futuristic Buttons**: Interactive futuristic buttons with multi-layer neon glow shadows, chamfered cut corners (`.btn-cyberpunk-cut`), RGB glitch effects (`.btn-cyberpunk-glitch`), and color palettes (`.btn-cyberpunk-cyan`, `.btn-cyberpunk-blue`, `.btn-cyberpunk-red`, `.btn-cyberpunk-pink`, `.btn-cyberpunk-yellow`, `.btn-cyberpunk-green`, `.btn-cyberpunk-purple`, `.btn-cyberpunk-orange`, `.btn-cyberpunk-indigo`, `.btn-cyberpunk-white`).
57
+ - **4-Direction Drawers**: Standalone slide-out panels from `.drawer-left`, `.drawer-right`, `.drawer-top`, or `.drawer-bottom` (mobile bottom sheet).
58
+ - **Automatic Mobile Navigation Drawer**: Transforms the desktop `<aside>` sidebar inside `<main>` into a responsive mobile drawer (`☰`) on screens `<768px` via `bluebird.js`.
59
+ - **Mobile Touch & Swipe Carousel**: Touch swipe physics, desktop mouse drag, arrow controls, indicator dots, and automatic cycling via `data-autoplay="true"`.
60
+ - **Expressive Color Palette**: Solid and subtle color utility classes for Blue, Red, Green, Yellow, Purple, Indigo, Pink, Teal, Orange, Cyan, Lime, Rose, Fuchsia, Emerald, Sky, and Amber.
61
+ - **Micro-Interaction Micro-FX**: Material Ripple effect on button clicks, plus CSS keyframe animations (`.animate-spin`, `.animate-pulse`, `.animate-bounce`, `.animate-fade-in`, `.animate-slide-up`, `.animate-float`, `.animate-wiggle`, `.animate-shimmer`).
62
+
63
+ ---
64
+
65
+ ## 🚀 Quick Start (NPM & CDN)
66
+
67
+ ### Option A: Install via NPM (Recommended for modern bundlers)
68
+
69
+ ```bash
70
+ npm install @seip/blue-bird
71
+ ```
72
+
73
+ In your main entry point (`main.js`, `index.js`, `App.jsx`, etc.):
74
+
75
+ ```javascript
76
+ // Import CSS (compiled with @layer for zero specificity conflicts)
77
+ import '@seip/blue-bird/css';
78
+
79
+ // Import JS helpers with full TypeScript autocomplete
80
+ import { toast, snackbar, ResponsiveDataTable, bluebird } from '@seip/blue-bird';
81
+
82
+ // Ready to use!
83
+ toast({ message: 'Hello from Blue Bird!', type: 'success' });
84
+ ```
85
+
86
+ ---
87
+
88
+ ### Option B: Vanilla HTML / JS via CDN (Zero Build Step)
89
+
90
+ Include the minified stylesheet and JavaScript helper directly in your `<head>`:
91
+
92
+ ```html
93
+ <!-- Blue Bird CSS (Minified, only ~113 KB, with Eye-Care Dark Mode & @layer) -->
94
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@seip/blue-bird@latest/dist/bluebird.min.css" />
95
+
96
+ <!-- Blue Bird JS Helper (Automatic drawers, toasts, carousels, command palette) -->
97
+ <script src="https://cdn.jsdelivr.net/npm/@seip/blue-bird@latest/dist/bluebird.min.js" defer></script>
98
+ ```
99
+
100
+ ---
101
+
102
+ ## ✨ VS Code Autocompletion & TypeScript
103
+
104
+ Blue Bird includes first-class autocompletion tools:
105
+
106
+ ### 1. HTML & CSS Class Autocomplete in VS Code
107
+ All 700+ utility and component classes are indexed in `dist/bluebird.html-data.json`. To enable instant autocompletion and hover descriptions in your project, add this to `.vscode/settings.json`:
108
+
109
+ ```json
110
+ {
111
+ "html.customData": [
112
+ "./node_modules/@seip/blue-bird/dist/bluebird.html-data.json"
113
+ ]
114
+ }
115
+ ```
116
+
117
+ Now, when you type `class="` in any `.html` or `.jsx` file, VS Code will suggest classes (`btn-primary`, `btn-cyberpunk-cut`, `glow-blue`, `floating-fill`, etc.) with documentation!
118
+
119
+ ### 2. TypeScript Declarations
120
+ Blue Bird provides comprehensive typings in `dist/bluebird.d.ts` for all JavaScript functions, components, and DataTable APIs with full IntelliSense.
121
+
122
+ ---
123
+
124
+ ### Complete Basic HTML Example:
125
+
126
+ ```html
127
+ <!DOCTYPE html>
128
+ <html lang="en" data-theme="dark">
129
+ <head>
130
+ <meta charset="UTF-8" />
131
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
132
+ <title>My Blue Bird App</title>
133
+ <link rel="stylesheet" href="https://seip25.github.io/Blue-bird-css/bluebird.css" />
134
+ <script src="https://seip25.github.io/Blue-bird-css/bluebird.js"></script>
135
+ </head>
136
+ <body>
137
+ <!-- Header with Navigation -->
138
+ <header>
139
+ <nav>
140
+ <h2>🐦 Blue Bird App</h2>
141
+ <div class="flex gap-2">
142
+ <button class="bg-blue-subtle">Dashboard</button>
143
+ <button class="primary glow-pulse">Get Started</button>
144
+ </div>
145
+ </nav>
146
+ </header>
147
+
148
+ <!-- Main Layout with Responsive Sidebar -->
149
+ <main>
150
+ <aside>
151
+ <h4>Navigation</h4>
152
+ <a href="#">Home</a>
153
+ <a href="#">Components</a>
154
+ <a href="#">Settings</a>
155
+ </aside>
156
+
157
+ <div>
158
+ <article class="card">
159
+ <div class="card-header">
160
+ <h3 class="card-title">Modern Web Application</h3>
161
+ <p class="card-description">Clean semantic markup with zero build step overhead.</p>
162
+ </div>
163
+ <div class="card-content">
164
+ <div class="floating-fill mb-4">
165
+ <input type="text" id="username" placeholder=" " />
166
+ <label for="username">Username</label>
167
+ </div>
168
+ <button class="primary" onclick="toast({ title: 'Success!', description: 'Settings saved successfully.', type: 'success' })">
169
+ Save Changes
170
+ </button>
171
+ </div>
172
+ </article>
173
+ </div>
174
+ </main>
175
+ </body>
176
+ </html>
177
+ ```
178
+
179
+ ---
180
+
181
+ ## 🧠 JavaScript Engine (`bluebird.js`) & API
182
+
183
+ `bluebird.js` is a zero-dependency, lightweight JavaScript helper that powers dynamic notifications, tabs, command palettes, touch carousels, and responsive mobile navigation drawers.
184
+
185
+ ### Core `bluebird()` Function
186
+
187
+ ```javascript
188
+ // Main entry point signature:
189
+ bluebird(component, options);
190
+ ```
191
+
192
+ ---
193
+
194
+ ### Responsive Data Table (`ResponsiveDataTable`)
195
+
196
+ `ResponsiveDataTable` is a reactive, dependency-free JavaScript data table component that automatically adapts its layout:
197
+ - **Desktop (`>=768px`)**: Renders a standard tabular `<table>` with formatted cells, sortable-ready layout, and actionable buttons.
198
+ - **Mobile (`<768px`)**: Seamlessly collapses into a stack of structured, accessible `<article>` cards with header summaries and key-value detail rows.
199
+ - **Real-Time Live Search**: Instantly filters across all visible column values as you type.
200
+ - **Dynamic Pagination**: Auto-calculates pages with smart ellipsis navigation and configurable page sizes.
201
+ - **HTML String Rendering**: Seamlessly parses HTML strings in cell data (such as `<span class="badge">...</span>` or status indicators).
202
+ - **Edit & Delete Action Callbacks**: Built-in action triggers with row data payload.
203
+
204
+ #### Basic Example (HTML & JavaScript)
205
+
206
+ ```html
207
+ <!-- 1. HTML Target Container -->
208
+ <div id="users-datatable"></div>
209
+
210
+ <!-- 2. Include Blue Bird CSS & JS -->
211
+ <link rel="stylesheet" href="https://seip25.github.io/Blue-bird-css/bluebird.css" />
212
+ <script src="https://seip25.github.io/Blue-bird-css/bluebird.js"></script>
213
+
214
+ <script>
215
+ // 3. Instantiate ResponsiveDataTable
216
+ const datatable = new ResponsiveDataTable('users-datatable', {
217
+ data: [
218
+ { id: 1, name: 'Ana López', email: 'ana@example.com', role: '<span class="badge badge-primary">Admin</span>', status: 'Active' },
219
+ { id: 2, name: 'Luis García', email: 'luis@example.com', role: '<span class="badge badge-secondary">Editor</span>', status: 'Active' },
220
+ { id: 3, name: 'Marta Ruiz', email: 'marta@example.com', role: '<span class="badge badge-outline">Viewer</span>', status: 'Inactive' },
221
+ { id: 4, name: 'Carlos Díaz', email: 'carlos@example.com', role: '<span class="badge badge-secondary">Editor</span>', status: 'Pending' }
222
+ ],
223
+ columns: [
224
+ { key: 'id', title: 'ID' },
225
+ { key: 'name', title: 'Full Name' },
226
+ { key: 'email', title: 'Email Address' },
227
+ { key: 'role', title: 'Role' },
228
+ { key: 'status', title: 'Status' }
229
+ ],
230
+ rowsPerPage: 5,
231
+ search: true, // Live real-time search filter
232
+ pagination: true, // Page number controls
233
+ summaryFields: ['name'], // Field displayed as card header in mobile view
234
+ edit: (event, id) => toast({ title: 'Edit', description: `Edit user #${id}`, type: 'info' }),
235
+ delete: (event, id) => toast({ title: 'Delete', description: `Deleted user #${id}`, type: 'error' }),
236
+ breakpoint: 768 // Viewport width (px) to switch to mobile cards
237
+ });
238
+ </script>
239
+ ```
240
+
241
+ #### Initialization via `bluebird('datatable', options)`
242
+
243
+ ```javascript
244
+ // Alternatively initialize via the unified bluebird dispatcher:
245
+ const table = bluebird('datatable', {
246
+ container: 'users-datatable', // Container ID or DOM element
247
+ data: usersList,
248
+ columns: [
249
+ { key: 'id', title: 'ID' },
250
+ { key: 'name', title: 'Name' },
251
+ { key: 'email', title: 'Email' }
252
+ ],
253
+ rowsPerPage: 10
254
+ });
255
+ ```
256
+
257
+ #### Configuration Options
258
+
259
+ | Option | Type | Default | Description |
260
+ | :--- | :--- | :--- | :--- |
261
+ | `data` | `Array<Object>` | `[]` | Array of row objects to display in the table. |
262
+ | `columns` | `Array<Object>` | `[]` | Column definitions: `{ key: string, title: string }`. |
263
+ | `rowsPerPage` | `number` | `10` | Number of items per page. |
264
+ | `search` | `boolean` | `true` | Enables the live instant search input bar above table. |
265
+ | `pagination` | `boolean` | `true` | Enables pagination controls below the table. |
266
+ | `summaryFields` | `Array<string>` | `['id']` | Column keys displayed in the mobile card title header. |
267
+ | `edit` | `boolean \| Function` | `false` | Callback `(event, item) => ...` executed when Edit button is clicked. |
268
+ | `delete` | `boolean \| Function` | `false` | Callback `(event, item) => ...` executed when Delete button is clicked. |
269
+ | `breakpoint` | `number` | `768` | Screen width in pixels below which table converts to mobile cards. |
270
+ | `headerTitles` | `Object` | `{}` | Optional key-to-title dictionary override mapping. |
271
+
272
+ #### Instance Methods
273
+
274
+ ```javascript
275
+ // Update dataset dynamically (resets pagination to page 1):
276
+ table.updateData(newUsersArray);
277
+
278
+ // Update table column structure dynamically:
279
+ table.updateColumns([
280
+ { key: 'id', title: 'ID' },
281
+ { key: 'title', title: 'Title' },
282
+ { key: 'category', title: 'Category' }
283
+ ]);
284
+
285
+ // Navigate to a specific page programmatically:
286
+ table.changePage(2);
287
+ ```
288
+
289
+ ---
290
+
291
+ ### Toast Notifications (`toast()`)
292
+
293
+ Stacked, auto-dismissing toast notification system.
294
+
295
+ ```javascript
296
+ // Via global toast helper function:
297
+ toast({
298
+ title: 'Payment Completed',
299
+ description: 'Your transaction #9402 has been processed.',
300
+ type: 'success', // 'success' | 'error' | 'warning' | 'info'
301
+ position: 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
302
+ duration: 4000 // Milliseconds to auto-dismiss (0 for persistent)
303
+ });
304
+
305
+ // Via bluebird function:
306
+ bluebird('toast', {
307
+ title: 'Network Error',
308
+ description: 'Could not establish connection to server.',
309
+ type: 'error',
310
+ position: 'top-right'
311
+ });
312
+ ```
313
+
314
+ ---
315
+
316
+ ### Snackbar (`snackbar()`)
317
+
318
+ Single floating bottom alert bar.
319
+
320
+ ```javascript
321
+ // Via global snackbar helper function:
322
+ snackbar({
323
+ message: 'Item archived successfully.',
324
+ type: 'info', // 'info' | 'success' | 'warning' | 'error'
325
+ duration: 3000
326
+ });
327
+
328
+ // Via bluebird function:
329
+ bluebird('snackbar', {
330
+ message: 'Welcome to Blue Bird CSS!',
331
+ type: 'success'
332
+ });
333
+ ```
334
+
335
+ ---
336
+
337
+ ### Command Palette (`Ctrl+K`)
338
+
339
+ Fast, keyboard-accessible command menu modal. Press <kbd>Ctrl+K</kbd> or <kbd>Cmd+K</kbd> anywhere on the page to open or close.
340
+
341
+ ```javascript
342
+ // Open/close programmatically:
343
+ bluebird('command', { action: 'open' }); // 'open' | 'close' | 'toggle'
344
+ ```
345
+
346
+ ---
347
+
348
+ ### 4-Direction Drawer Panels
349
+
350
+ Slide-out drawer panels from any direction of the screen.
351
+
352
+ ```html
353
+ <!-- HTML Declarative Trigger -->
354
+ <button data-drawer-target="my-left-drawer">Open Left Drawer</button>
355
+
356
+ <div id="my-left-drawer" class="drawer drawer-left">
357
+ <div class="drawer-header">
358
+ <h3>Drawer Navigation</h3>
359
+ <button data-drawer-close class="ghost">&times;</button>
360
+ </div>
361
+ <div class="drawer-body">
362
+ <p>Drawer content goes here...</p>
363
+ </div>
364
+ </div>
365
+ ```
366
+
367
+ ```javascript
368
+ // Programmatic JavaScript API:
369
+ bluebird('drawer', { id: 'my-left-drawer', action: 'open' });
370
+ bluebird('drawer', { id: 'my-left-drawer', action: 'close' });
371
+ bluebird('drawer', { id: 'my-left-drawer', action: 'toggle' });
372
+ ```
373
+
374
+ ---
375
+
376
+ ### Interactive Tabs
377
+
378
+ Switch active content panels declaratively without writing custom JS event listeners.
379
+
380
+ ```html
381
+ <div class="tabs">
382
+ <div class="tab-list">
383
+ <button class="tab-trigger active" data-tab-target="tab-profile">Profile</button>
384
+ <button class="tab-trigger" data-tab-target="tab-security">Security</button>
385
+ </div>
386
+
387
+ <div id="tab-profile" class="tab-content active">
388
+ <p>Profile settings content...</p>
389
+ </div>
390
+
391
+ <div id="tab-security" class="tab-content">
392
+ <p>Security settings content...</p>
393
+ </div>
394
+ </div>
395
+ ```
396
+
397
+ ```javascript
398
+ // Switch tabs programmatically:
399
+ bluebird('tab', { id: 'tab-security' });
400
+ ```
401
+
402
+ ---
403
+
404
+ ### Touch & Drag Carousel
405
+
406
+ Mobile-first touch swipe, desktop mouse drag, arrow buttons, indicator dots, and optional autoplay.
407
+
408
+ ```html
409
+ <div class="carousel" data-autoplay="true" data-interval="3500">
410
+ <button class="carousel-nav carousel-prev">&larr;</button>
411
+ <button class="carousel-nav carousel-next">&rarr;</button>
412
+
413
+ <div class="carousel-track">
414
+ <div class="carousel-item responsive-card">Slide Card 1</div>
415
+ <div class="carousel-item responsive-card">Slide Card 2</div>
416
+ <div class="carousel-item responsive-card">Slide Card 3</div>
417
+ </div>
418
+
419
+ <div class="carousel-indicators"></div>
420
+ </div>
421
+ ```
422
+
423
+ ```javascript
424
+ // Manual initialization if created dynamically:
425
+ bluebird('carousel', { selector: '.carousel', autoplay: true, interval: 4000 });
426
+ ```
427
+
428
+ ---
429
+
430
+ ### Automatic Mobile Navigation
431
+
432
+ When your page uses standard semantic HTML structure:
433
+
434
+ ```html
435
+ <header>
436
+ <nav>...</nav>
437
+ </header>
438
+ <main>
439
+ <aside>...</aside>
440
+ <div>...</div>
441
+ </main>
442
+ ```
443
+
444
+ On small viewports (`<768px`), `bluebird.js` automatically hides the desktop `<aside>` sidebar and injects a mobile drawer toggle button (`☰`) into your top `<header><nav>`, providing a slide-over mobile drawer navigation.
445
+
446
+ ---
447
+
448
+ ### HTTP Fetch Client (`Http()`)
449
+
450
+ A modern `fetch` wrapper with automatic CSRF token detection, JSON payload handling, and structured error throwing.
451
+
452
+ ```javascript
453
+ // 1. Basic GET Request
454
+ const users = await Http('/api/users');
455
+
456
+ // 2. POST JSON Request (Automatically attaches X-CSRF-Token if #csrf input exists)
457
+ const newUser = await Http('/api/users/create', 'POST', {
458
+ name: 'Alex Johnson',
459
+ email: 'alex@example.com'
460
+ });
461
+
462
+ // 3. Multipart FormData Upload
463
+ const form = new FormData();
464
+ form.append('avatar', fileInput.files[0]);
465
+ const result = await Http('/api/profile/upload', 'POST', false, form);
466
+ ```
467
+
468
+ ---
469
+
470
+ ### URL Parameter Helper (`getUrlParameter()`)
471
+
472
+ Easily inspect query parameters from `window.location.search`:
473
+
474
+ ```javascript
475
+ // Current URL: https://example.com/dashboard?tab=analytics&user=42
476
+ const tab = getUrlParameter('tab'); // "analytics"
477
+ const user = getUrlParameter('user'); // "42"
478
+ ```
479
+
480
+ ---
481
+
482
+ ### Declarative HTML `data-*` Attributes
483
+
484
+ `bluebird.js` includes built-in declarative event listeners that work directly on HTML markup without writing JavaScript:
485
+
486
+ | Attribute | Target / Example | Description |
487
+ | :--- | :--- | :--- |
488
+ | `data-copy` | `<button data-copy="https://myurl.com">Copy Link</button>` | Copies text to clipboard and displays an instant success toast. |
489
+ | `data-confirm` | `<button data-confirm="Are you sure you want to delete this record?">Delete</button>` | Prompts user confirmation before action executes. |
490
+ | `data-scroll-to` | `<a data-scroll-to="#pricing">View Pricing</a>` | Performs a smooth animated scroll to the target selector. |
491
+ | `data-password-toggle` | `<button data-password-toggle="#pass-input">👁️</button>` | Toggles input mask between `password` and `text`. |
492
+ | `data-step-up` / `data-step-down` | `<button data-step-up="#qty">+</button>` | Increments or decrements a numeric input. |
493
+ | `data-filter-target` | `<input data-filter-target="#users-table" />` | Real-time live filtering on list items, table rows, or cards. |
494
+ | `data-auto-resize` | `<textarea data-auto-resize></textarea>` | Auto-expands textarea height to fit content without scrollbars. |
495
+ | `data-modal-target` / `data-close-dialog` | `<button data-modal-target="#my-modal">Open</button>` | Opens or closes HTML5 native `<dialog>` modals. |
496
+ | `data-toggle="theme"` | `<button data-toggle="theme">Toggle Theme</button>` | Toggles Light/Dark theme and persists preference in `localStorage`. |
497
+ | `data-toast` / `data-toast-title` | `<button data-toast="Saved!" data-toast-title="Success">Save</button>` | Triggers a toast notification purely via HTML. |
498
+ | `data-snackbar` | `<button data-snackbar="Profile updated">Update</button>` | Triggers a snackbar message on click. |
499
+
500
+ ---
501
+
502
+ ## 🎨 CSS Components & Utilities
503
+
504
+ ### Buttons, Soft Tint & Cyberpunk Glow
505
+
506
+ #### 1. Core Variants & Sizes
507
+
508
+ ```html
509
+ <!-- Base Variants -->
510
+ <button>Primary Default</button>
511
+ <button class="secondary">Secondary</button>
512
+ <button class="outline">Outline</button>
513
+ <button class="destructive">Destructive</button>
514
+ <button class="ghost">Ghost</button>
515
+
516
+ <!-- Button Sizes -->
517
+ <button class="primary btn-xs">Extra Small (xs)</button>
518
+ <button class="primary btn-sm">Small (sm)</button>
519
+ <button class="primary btn-md">Medium (md)</button>
520
+ <button class="primary btn-lg">Large (lg)</button>
521
+ <button class="primary btn-xl">Extra Large (xl)</button>
522
+ <button class="primary btn-icon">+</button>
523
+ ```
524
+
525
+ #### 2. Soft Tint Buttons (Subtle / Soft Tint)
526
+
527
+ ```html
528
+ <button class="bg-primary-subtle">Primary Subtle</button>
529
+ <button class="bg-blue-subtle">Blue Subtle</button>
530
+ <button class="bg-red-subtle">Red Subtle</button>
531
+ <button class="bg-green-subtle">Green Subtle</button>
532
+ <button class="bg-yellow-subtle">Yellow Subtle</button>
533
+ <button class="bg-purple-subtle">Purple Subtle</button>
534
+ <button class="bg-pink-subtle">Pink Subtle</button>
535
+ <button class="bg-emerald-subtle">Emerald Subtle</button>
536
+ ```
537
+
538
+ #### 3. Perfectly Aligned Link Buttons (`.btn-link` / `a.link`)
539
+
540
+ ```html
541
+ <button class="primary">Solid Button</button>
542
+ <a href="#" class="btn-link">Link Button (Anchor)</a>
543
+ <button class="btn-link">Link Button (Button)</button>
544
+ ```
545
+
546
+ #### 4. Neon Cyberpunk & Futuristic Buttons
547
+
548
+ ```html
549
+ <!-- Cyberpunk Color Palette -->
550
+ <button class="btn-cyberpunk">Neon Cyan</button>
551
+ <button class="btn-cyberpunk-blue">Neon Blue</button>
552
+ <button class="btn-cyberpunk-red">Neon Red</button>
553
+ <button class="btn-cyberpunk-pink">Neon Pink</button>
554
+ <button class="btn-cyberpunk-yellow">Neon Yellow</button>
555
+ <button class="btn-cyberpunk-green">Neon Green</button>
556
+ <button class="btn-cyberpunk-purple">Neon Purple</button>
557
+ <button class="btn-cyberpunk-orange">Neon Orange</button>
558
+ <button class="btn-cyberpunk-indigo">Neon Indigo</button>
559
+
560
+ <!-- Chamfered Cut Corner Modifier -->
561
+ <button class="btn-cyberpunk-pink btn-cyberpunk-cut">Cut Pink</button>
562
+ <button class="btn-cyberpunk-yellow btn-cyberpunk-cut">Cut Yellow</button>
563
+
564
+ <!-- Glitch & Pulse Effects -->
565
+ <button class="btn-cyberpunk btn-cyberpunk-glitch">RGB Glitch</button>
566
+ <button class="primary glow-pulse">Energy Pulse</button>
567
+ ```
568
+
569
+ ---
570
+
571
+ ### Badges & Tooltips
572
+
573
+ ```html
574
+ <span class="badge badge-primary">Primary</span>
575
+ <span class="badge badge-secondary">Secondary</span>
576
+ <span class="badge badge-pink">Pink</span>
577
+ <span class="badge badge-success">Success</span>
578
+ <span class="badge badge-warning">Warning</span>
579
+ <span class="badge badge-destructive">Destructive</span>
580
+ <span class="badge badge-outline">Outline</span>
581
+
582
+ <!-- Hover tooltip via data-tooltip -->
583
+ <button class="primary" data-tooltip="Save changes to database">Save</button>
584
+ ```
585
+
586
+ ---
587
+
588
+ ### Forms & Floating Labels
589
+
590
+ All form controls (`<input>`, `<select>`, `<textarea>`) are automatically styled out of the box.
591
+
592
+ #### Standard & Fill Variant (`.fill`)
593
+
594
+ ```html
595
+ <!-- Standard inputs -->
596
+ <input type="text" placeholder="Standard Text Input" />
597
+ <input type="email" placeholder="Email Input" />
598
+
599
+ <!-- Filled Variant (.fill) -->
600
+ <input type="text" class="fill" placeholder="Filled Input" />
601
+ <select class="fill">
602
+ <option>Filled Select</option>
603
+ </select>
604
+ ```
605
+
606
+ #### Floating Labels (Outline & Filled Style)
607
+
608
+ ```html
609
+ <!-- Outline Floating Label -->
610
+ <div class="floating">
611
+ <input type="email" id="email" placeholder=" " />
612
+ <label for="email">Email Address</label>
613
+ </div>
614
+
615
+ <!-- Filled Container Floating Label (Material Style) -->
616
+ <div class="floating-fill">
617
+ <input type="text" id="fullname" placeholder=" " />
618
+ <label for="fullname">Full Name</label>
619
+ </div>
620
+ ```
621
+
622
+ #### Checkboxes, Radios & Switches
623
+
624
+ ```html
625
+ <!-- Checkbox & Radio -->
626
+ <label><input type="checkbox" checked /> I agree to terms</label>
627
+ <label><input type="radio" name="group1" checked /> Option A</label>
628
+
629
+ <!-- Standard Pill Switch -->
630
+ <label><input type="checkbox" role="switch" checked /> Notifications</label>
631
+
632
+ <!-- Android Material Switch -->
633
+ <label><input type="checkbox" class="switch-android" checked /> Dark Mode</label>
634
+ ```
635
+
636
+ ---
637
+
638
+ ### Cards
639
+
640
+ ```html
641
+ <div class="card">
642
+ <div class="card-header">
643
+ <h3 class="card-title">Card Header Title</h3>
644
+ <p class="card-description">Subtitle or description text.</p>
645
+ </div>
646
+ <div class="card-content">
647
+ <p>Main card body contents...</p>
648
+ </div>
649
+ <div class="card-footer">
650
+ <button class="primary btn-sm">Action</button>
651
+ </div>
652
+ </div>
653
+ ```
654
+
655
+ ---
656
+
657
+ ### Modals (`<dialog>`)
658
+
659
+ Uses native HTML5 `<dialog>` elements with backdrop blur and fullscreen support.
660
+
661
+ ```html
662
+ <!-- Standard Dialog Modal -->
663
+ <dialog id="myModal">
664
+ <article>
665
+ <header class="flex items-center between">
666
+ <h4>Confirm Action</h4>
667
+ <button class="ghost" onclick="myModal.close()">&times;</button>
668
+ </header>
669
+ <p>Are you sure you want to proceed?</p>
670
+ <footer>
671
+ <button class="ghost" onclick="myModal.close()">Cancel</button>
672
+ <button class="primary" onclick="myModal.close()">Confirm</button>
673
+ </footer>
674
+ </article>
675
+ </dialog>
676
+
677
+ <!-- Open via Native JS -->
678
+ <button onclick="myModal.showModal()">Open Dialog</button>
679
+
680
+ <!-- Fullscreen Dialog -->
681
+ <dialog id="modalFull" class="dialog-full">
682
+ <article>
683
+ <h4>Immersive Fullscreen Modal</h4>
684
+ <button class="secondary" onclick="modalFull.close()">Close</button>
685
+ </article>
686
+ </dialog>
687
+ ```
688
+
689
+ ---
690
+
691
+ ### Dropdowns
692
+
693
+ CSS hover/focus dropdown menu without heavy dependencies.
694
+
695
+ ```html
696
+ <div class="dropdown">
697
+ <button class="dropdown-toggle">Menu</button>
698
+ <div class="dropdown-content">
699
+ <a href="#" class="dropdown-item">Profile</a>
700
+ <a href="#" class="dropdown-item">Settings</a>
701
+ <a href="#" class="dropdown-item">Logout</a>
702
+ </div>
703
+ </div>
704
+ ```
705
+
706
+ ---
707
+
708
+ ### Tables
709
+
710
+ ```html
711
+ <table class="table-striped table-hover">
712
+ <thead>
713
+ <tr>
714
+ <th>User</th>
715
+ <th>Role</th>
716
+ <th>Status</th>
717
+ </tr>
718
+ </thead>
719
+ <tbody>
720
+ <tr>
721
+ <td>Sarah Jenkins</td>
722
+ <td>Administrator</td>
723
+ <td><span class="badge badge-success">Active</span></td>
724
+ </tr>
725
+ </tbody>
726
+ </table>
727
+ ```
728
+
729
+ *Optional table utility classes:* `.table-striped`, `.table-hover`, `.table-bordered`, `.table-compact`.
730
+
731
+ ---
732
+
733
+ ### Skeleton Loading Placeholders
734
+
735
+ Animated shimmer placeholder elements to indicate loading states during data fetching.
736
+
737
+ ```html
738
+ <div class="card p-6">
739
+ <div class="flex items-center gap-4 mb-4">
740
+ <span class="skeleton skeleton-avatar"></span>
741
+ <div class="flex-1">
742
+ <span class="skeleton skeleton-title"></span>
743
+ <span class="skeleton skeleton-text" style="width: 40%"></span>
744
+ </div>
745
+ </div>
746
+ <span class="skeleton skeleton-text"></span>
747
+ <span class="skeleton skeleton-text" style="width: 80%"></span>
748
+ <div class="flex gap-2 mt-4">
749
+ <span class="skeleton skeleton-button"></span>
750
+ </div>
751
+ </div>
752
+ ```
753
+
754
+ ---
755
+
756
+ ### Progress Bars, Gauge & Spinners
757
+
758
+ ```html
759
+ <!-- Native HTML5 Progress Element -->
760
+ <progress value="60" max="100"></progress>
761
+
762
+ <!-- Native HTML5 Meter Gauge Element -->
763
+ <meter min="0" max="100" value="85" low="33" high="66" optimum="50"></meter>
764
+
765
+ <!-- Custom Progress Bar -->
766
+ <div class="progress">
767
+ <div class="progress-bar bg-purple" style="width: 75%"></div>
768
+ </div>
769
+
770
+ <!-- Indeterminate Spinners -->
771
+ <span class="spinner spinner-sm"></span>
772
+ <span class="spinner"></span>
773
+ <span class="spinner spinner-lg"></span>
774
+
775
+ <!-- Step Process Control (.steps) -->
776
+ <div class="steps">
777
+ <div class="step completed">
778
+ <div class="step-circle">1</div>
779
+ <span class="step-label">Cart</span>
780
+ </div>
781
+ <div class="step active">
782
+ <div class="step-circle">2</div>
783
+ <span class="step-label">Shipping</span>
784
+ </div>
785
+ <div class="step">
786
+ <div class="step-circle">3</div>
787
+ <span class="step-label">Payment</span>
788
+ </div>
789
+ </div>
790
+ ```
791
+
792
+ ---
793
+
794
+ ### Bottom Navigation
795
+
796
+ Fixed bottom app bar for mobile viewports.
797
+
798
+ ```html
799
+ <nav class="bottom-nav">
800
+ <a href="#" class="bottom-nav-item active">
801
+ <span class="bottom-nav-icon">🏠</span>
802
+ <span class="bottom-nav-label">Home</span>
803
+ </a>
804
+ <a href="#" class="bottom-nav-item">
805
+ <span class="bottom-nav-icon">🔍</span>
806
+ <span class="bottom-nav-label">Search</span>
807
+ </a>
808
+ <a href="#" class="bottom-nav-item">
809
+ <span class="bottom-nav-icon">⚙️</span>
810
+ <span class="bottom-nav-label">Settings</span>
811
+ </a>
812
+ </nav>
813
+ ```
814
+
815
+ ---
816
+
817
+ ## 📐 Layout System & Grid
818
+
819
+ ### Containers
820
+
821
+ ```html
822
+ <div class="container">Centered Container (max 1200px)</div>
823
+ <div class="container-sm">Small Container (max 640px)</div>
824
+ <div class="container-md">Medium Container (max 768px)</div>
825
+ <div class="container-lg">Large Container (max 1024px)</div>
826
+ <div class="container-xl">Extra Large Container (max 1280px)</div>
827
+ <div class="container-fluid">Full Width Container (100%)</div>
828
+ ```
829
+
830
+ ---
831
+
832
+ ### Grid System (1 to 12 Columns)
833
+
834
+ ```html
835
+ <!-- 3-column equal grid -->
836
+ <div class="grid grid-cols-3 gap-4">
837
+ <div>Column 1</div>
838
+ <div>Column 2</div>
839
+ <div>Column 3</div>
840
+ </div>
841
+
842
+ <!-- Custom column spans -->
843
+ <div class="grid grid-cols-12 gap-4">
844
+ <div class="col-span-8">Spans 8 columns</div>
845
+ <div class="col-span-4">Spans 4 columns</div>
846
+ </div>
847
+ ```
848
+
849
+ *Supports:* `.grid-cols-1` through `.grid-cols-12` and `.col-span-1` through `.col-span-12`.
850
+
851
+ ---
852
+
853
+ ### Flexbox & Spacing
854
+
855
+ - **Flexbox Layout:** `.flex`, `.flex-col`, `.flex-row`, `.flex-wrap`, `.flex-1`, `.items-center`, `.justify-between`, `.justify-center`, `.justify-end`.
856
+ - **Gap & Spacing:** `.gap-1` to `.gap-8`, `.m-1` to `.m-8`, `.p-1` to `.p-8`, `.mx-*`, `.my-*`, `.px-*`, `.py-*`.
857
+ - **Shadows:** `.shadow-sm`, `.shadow-md`, `.shadow-lg`, `.shadow-xl`, `.shadow-inner`, `.shadow-none`.
858
+ - **Borders:** `.border`, `.border-0`, `.border-2`, `.border-b`, `.border-t`, `.border-l`, `.border-r`.
859
+ - **Border Radius:** `.rounded-none`, `.rounded-sm`, `.rounded-md`, `.rounded-lg`, `.rounded-xl`, `.rounded-2xl`, `.rounded-full`.
860
+
861
+ ---
862
+
863
+ ### Responsiveness & Breakpoints
864
+
865
+ - Mobile main breakpoint: `<768px`.
866
+ - `.hidden-sm`: Hides elements on mobile screens (`<768px`).
867
+ - `.visible-sm`: Shows elements only on mobile screens (`<768px`).
868
+
869
+ ---
870
+
871
+ ## ✨ CSS Animations & Motion Effects
872
+
873
+ Ready-to-use motion keyframes and utility classes:
874
+
875
+ ```html
876
+ <!-- Infinite Spin Loading -->
877
+ <span class="animate-spin spinner"></span>
878
+
879
+ <!-- Ping & Pulse radar -->
880
+ <span class="animate-ping bg-blue rounded-full w-3 h-3"></span>
881
+ <div class="animate-pulse">Loading data...</div>
882
+
883
+ <!-- Bounce animation -->
884
+ <span class="animate-bounce">↓ Scroll Down</span>
885
+
886
+ <!-- Smooth Entrances & Float -->
887
+ <div class="animate-fade-in">Fade In Entrance</div>
888
+ <div class="animate-slide-up">Slide Up Entrance</div>
889
+ <div class="animate-float">Floating Bobbing Animation</div>
890
+ <div class="animate-wiggle">Wiggle Shake Effect</div>
891
+
892
+ <!-- Hover lift effect -->
893
+ <button class="secondary hover-lift">Hover Lift Button</button>
894
+ ```
895
+
896
+ ---
897
+
898
+ ## 🎨 Theming & Eye-Care Light / Dark Mode
899
+
900
+ Blue Bird CSS features an **Eye-Care Dark Mode** crafted to protect your vision during long development and browsing sessions. Instead of harsh `#000000` pitch black and blinding `#ffffff` stark white, it uses soothing charcoal-slate backgrounds (`#101419` and `#171d25`) paired with soft slate-white typography (`#e2e8f0`).
901
+
902
+ ### Automatic OS Detection & Manual Toggle
903
+ Blue Bird automatically respects the operating system's `prefers-color-scheme: dark` preference, and allows instant manual toggling via the `data-theme` attribute:
904
+
905
+ ```html
906
+ <!-- Forced Dark Theme -->
907
+ <html data-theme="dark">
908
+
909
+ <!-- Forced Light Theme -->
910
+ <html data-theme="light">
911
+ ```
912
+
913
+ ```javascript
914
+ // Dynamic toggle function:
915
+ function toggleTheme() {
916
+ const html = document.documentElement;
917
+ const current = html.getAttribute('data-theme');
918
+ html.setAttribute('data-theme', current === 'dark' ? 'light' : 'dark');
919
+ }
920
+ ```
921
+
922
+ ### Color Palette Shorthands
923
+
924
+ Apply any solid color (`.bg-blue`, `.bg-red`, `.bg-green`, `.bg-purple`, `.bg-pink`, `.bg-emerald`, `.bg-orange`, `.bg-amber`, etc.) or subtle tint (`.bg-blue-subtle`, `.bg-red-subtle`, `.bg-green-subtle`, etc.) to elements.
925
+
926
+ ---
927
+
928
+ ## 📄 License
929
+
930
+ MIT © [Seip25](https://github.com/seip25) — Built for modern, fast, and sleek web development.