Modal title
This is a real lucUI modal — focus is trapped, Escape closes, backdrop click closes, and focus returns to the trigger.
lucUI 2 · Prism v2.1.3 · Semantic versions on npm
lucUI is plain CSS + a small JS helper. No framework, no bundler, no config. Include two files, add classes, and you have a design system.
Three supported methods — all install the same files.
npm install lucui-css-framework
<link rel="stylesheet" href="node_modules/lucui-css-framework/lucUI.min.css">
<script src="node_modules/lucui-css-framework/lucUI.js"></script>
Package: lucui-css-framework · License MIT.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lucui-css-framework@2.1.3/lucUI.min.css">
<script src="https://cdn.jsdelivr.net/npm/lucui-css-framework@2.1.3/lucUI.js"></script>
Also: https://unpkg.com/lucui-css-framework@2.1.3/lucUI.min.css
git clone https://github.com/lucaf1-15/lucUI.git
cd lucUI
npm run build # rebuilds lucUI.css + lucUI.min.css
Minimal page that uses theme toggle, stage, and a card.
<!doctype html>
<html data-theme="dark">
<link rel="stylesheet" href="lucUI.min.css">
<body>
<nav class="luc-navbar">…</nav>
<section class="luc-stage">
<h1 class="luc-gradient-text">Hello</h1>
<button class="luc-btn luc-btn-primary">Action</button>
</section>
<script src="lucUI.js"></script>
Set data-theme="dark|light" on <html>. Toggle with data-luc-theme-toggle.
All values are CSS variables. Override in :root or scoped.
| Token | Value | Usage |
|---|---|---|
--luca-navy | #1d2d44 | Canvas, text on light |
--studio-gold | #ae9d5d | Primary accent |
--designer-azure | #00bbff | Focus, links |
--luc-surface | theme-aware | Card / nav surfaces |
--glass-bg | theme-aware | Glass panels |
--space-4 | 1rem | Spacing scale 1–32 |
--radius-full | 9999px | Pills, toggles |
--shadow-lg | layered | Elevation |
:root {
--studio-gold: #ae9d5d; /* your brand gold */
--font-display: 'Manrope', sans-serif;
}
Manrope 800 for display, DM Sans 500 for body. Fluid scales via clamp().
Body copy with accent voice and inline code.
<span class="luc-kicker">Label</span>
<h1 class="luc-gradient-text">Title</h1>
<p class="luc-measure">Body…</p>
<p class="luc-text-fluid-2xl">Fluid</p>
| Class | Effect |
|---|---|
.luc-kicker | Uppercase label, gold track |
.luc-gradient-text | Gold→azure gradient on text |
.luc-text-fluid-* | xs–5xl fluid scale |
.luc-measure | 72ch max width |
.luc-container (1400px), .luc-grid, .luc-flex, and spacing utilities.
<div class="luc-container">
<div class="luc-grid luc-grid-cols-3 luc-gap-6">
<article class="luc-card">…</article>
</div>
</div>
Spacing: .luc-m-* .luc-p-* .luc-gap-* using --space-*. Responsive: columns collapse at 1024/768/480.
Two themes via data-theme="light|dark" on <html>. Semantic tokens (--luc-canvas, --luc-ink, --glass-bg) do the work.
<html data-theme="light">
<button class="luc-theme-toggle" data-luc-theme-toggle>
<svg data-luc-theme-icon="moon"></svg>
<svg data-luc-theme-icon="sun"></svg>
</button>
<script>lucUI.setTheme('light')</script>
This page uses the real toggle — it writes luc-theme to localStorage and fires luc:themechange.
| API | Notes |
|---|---|
data-luc-theme-toggle | Button toggles light↔dark |
data-luc-theme-switch="light" | Explicit switch |
lucUI.getTheme() | Read current |
lucUI.setTheme('dark') | Persist = true by default |
Override tokens — keep the components.
/* brand tweak — no rebuild needed */
:root {
--studio-gold: #c8b87a;
--luca-navy: #0f1f36;
--font-display: 'Manrope', sans-serif;
--radius-xl: 28px;
}
.luc-btn-primary { letter-spacing: 0.04em; }
Each section shows live rendering + copyable HTML. All classes are verified against the actual lucUI bundle.
.luc-card is the base glass surface. .luc-prism + data-luc-spotlight adds reactive lighting. .luc-card-transparency is the dimensional glass variant.
Blur 24, glass edge.
Hover to see spotlight.
Adds hover lift.
Subtitle
Header / body / footer.
<article class="luc-card luc-prism" data-luc-spotlight>
<h3 class="luc-card-title">Prism</h3>
<p>Content…</p>
</article>
Inputs use glass surfaces and gold focus. Includes floating labels, input groups, checkboxes, radios.
<div class="luc-form-group">
<label class="luc-label" for="email">Email</label>
<input id="email" class="luc-input" placeholder="you@studio.com">
</div>
<select class="luc-select">…</select>
<label class="luc-checkbox-group">
<input type="checkbox" class="luc-checkbox"> Label
</label>
| Class | Notes |
|---|---|
.luc-input .luc-textarea .luc-select | Glass, focus ring, blur |
.luc-checkbox | Custom check with ✓ |
.luc-form-group | Spacing wrapper |
Glass alerts with icon + dismiss.
<div class="luc-alert luc-alert-info">
<div class="luc-alert-content">
<strong class="luc-alert-title">Title</strong>
<p class="luc-alert-message">Message</p>
</div>
</div>
Variants: .luc-alert-info .luc-alert-success .luc-alert-warning .luc-alert-error .luc-alert-gold
<span class="luc-badge luc-badge-gold">Gold</span>
<span class="luc-badge luc-badge-azure">Azure</span>
Wired via lucUI.js. Keyboard: ArrowLeft/Right, Home/End.
Tab content is live — check the homepage installation tabs for a real example.
API panel.
Examples panel.
<div class="luc-tabs">
<div class="luc-tab-list" role="tablist">
<button class="luc-tab active">One</button>
<button class="luc-tab">Two</button>
</div>
<div class="luc-tab-panel active">…</div>
<div class="luc-tab-panel">…</div>
</div>
Trigger with data-luc-toggle="modal" + data-luc-target. Focus trap, Escape, backdrop click, and trigger return handled.
<button data-luc-toggle="modal" data-luc-target="#my-modal">Open</button>
<div id="my-modal" class="luc-modal-backdrop" style="display:none">
<article class="luc-modal" role="dialog" aria-modal="true">
<h3 class="luc-modal-title">Title</h3>
<button data-luc-dismiss="modal">Close</button>
</article>
</div>
<div class="luc-dropdown">
<button class="luc-dropdown-toggle">Menu</button>
<div class="luc-dropdown-menu">
<a class="luc-dropdown-item" href="#">Item</a>
</div>
</div>
Click the button above — lucUI.js handles open/close, Escape, and keyboard navigation.
All verified against the bundle. Each has its own CSS module in lucCOMPONENTS/.
.luc-breadcrumb
.luc-pagination
Native <details> or .luc-accordion
A CSS framework + design system.
.luc-progress .luc-skeleton
.luc-carousel with indicators
.luc-table sortable
.luc-avatar .luc-chip .luc-divider
.luc-timeline .luc-stepper
Full list: alerts, avatars, badges, breadcrumbs, buttons, cards, carousel, chips, cookie consent, data tables, datepicker, dividers, dropdowns, features, file upload, footer, forms, gallery, hero, loaders, modals, navbar, notifications, pagination, pricing, progress, range slider, search, sidebar, skeletons, stepper, tabs, testimonials, theme toggle, timeline, toasts, tooltips, toggles, user cards.
Press ⌘K / Ctrl+K. Filterable, keyboard navigable, focus-trapped.
<button data-luc-toggle="command">Search</button>
<div class="luc-command-backdrop">
<div class="luc-command">
<input class="luc-command-search" placeholder="Search…">
<div class="luc-command-list">
<button class="luc-command-item">Docs</button>
</div>
</div>
</div>
.luc-prism with data-luc-spotlight for pointer lighting. .luc-reveal for scroll reveals.
Hover this card — spotlight follows.
<article class="luc-card luc-prism" data-luc-spotlight>
Content
</article>
<div class="luc-reveal" data-luc-delay="120ms">…</div>
20 standalone tutorials — each is one page with live preview, copyable code and exercises. 1–2 for every major area, 1 for every secondary group. All plain HTML + lucUI.
Browse all 20 tutorials →Stage, container, prism card — the minimum viable page.
02 · 10 minContainer, auto-fit and responsive collapse.
04 · 12 minAll accents, sizes and groups.
05 · 10 minGlass levels and spotlight.
06 · 12 minInputs, selects and checks.
07 · 12 minHamburger, mega and search.
08 · 10 minLight/dark and tokens.
09 · 12 minOverlays and Cmd+K.
Secondary groups also each have a dedicated tutorial: