Tutorial 01 · Foundations
Build your first page
Create a complete lucUI page from scratch — stage, container, cards, buttons and theme toggle — no bundler.
8 minBeginnerlucUI 2 · v2.1.3
Objectives
- Set up plain HTML that loads lucUI correctly.
- Compose
.luc-stage+.luc-container+.luc-card. - Verify light/dark themes and copy-code.
You will build
Prerequisites
A blank index.html. Use CDN or npm install lucui-css-framework (v2.1.3). No frameworks.
head.html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/lucUI.min.css">
<html data-theme="dark">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lucUI.js"></script>Steps
Scaffold
Create container and stage. Stage gives aurora + grid.
index.html
<div class="luc-container">
<section class="luc-stage">
<div class="luc-stage-content luc-text-center">
<span class="luc-kicker">Hello</span>
<h1 class="luc-gradient-text">Your first page</h1>
</div>
</section>
</div>Add glass card + buttons
Buttons are real: .luc-btn-primary has gold gradient.
card.html
<article class="luc-card luc-prism" data-luc-spotlight>
<h3 class="luc-card-title">Prism</h3>
<button class="luc-btn luc-btn-primary">Get Started</button>
<button class="luc-btn luc-btn-transparency">Docs</button>
</article>Theme toggle
Add data-luc-theme-toggle — lucUI persists to localStorage.
theme.html
<button class="luc-theme-toggle" data-luc-theme-toggle>
<svg data-luc-theme-icon="moon"></svg><svg data-luc-theme-icon="sun"></svg>
</button>Result
Resize to 320px — no horizontal scroll, grid collapses, buttons become full-width. Try light/dark.
Manrope 800DM Sans 500
Exercise
- Swap
--studio-goldto#c8b87ain:rootand confirm buttons update. - Add a second
.luc-cardwith.luc-badgerow. - Deploy to Cloudflare Pages — only static files.
Check