The user wants me to create a responsive UI kit using Beercss, focusing on mobile-first design. Let me think about what Beercss is and how to approach this.
Beercss is a lightweight CSS framework that follows material design principles. It's known for being very small and fast. Let me create a comprehensive UI kit showcase that demonstrates:
- Various UI components (buttons, cards, forms, navigation, etc.)
- Mobile-first responsive design
- Dark/light theme support
- Interactive elements
- Modern, polished aesthetics
Since I need to avoid generic AI landing pages, I'll create an actual UI kit documentation/showcase page that's visually striking and functional. I'll include:
- A distinctive typography choice
- A cohesive color scheme (not the default purple gradient)
- Interactive component demos
- Smooth animations
- Dark/light mode toggle
- Responsive grid layouts
- Various component categories
Let me design this as a UI kit documentation site that showcases all the components in an elegant, usable way.
For fonts, I'll use something distinctive - maybe Space Grotesk for headlines and a clean sans for body.
Color scheme - I'll go with a sophisticated dark theme with amber/gold accents for warmth, which works well with Beercss's material design approach.
I'll include:
- Buttons (various styles)
- Cards
- Form elements
- Navigation
- Badges/Chips
- Modals
- Tabs
- Progress indicators
- Toasts/Notifications
- Typography showcase
- Grid system
All following Beercss conventions while adding custom polish.
Beercss UI Kit - Mobile-First Design
I've created a comprehensive, interactive UI kit showcase using Beercss with a mobile-first approach. It features a sophisticated dark/light theme with amber accents, smooth animations, and live component demos.
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beercss UI Kit - Mobile First</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Beercss -->
<link href="https://cdn.jsdelivr.net/npm/beercss@3.7.11/dist/cdn/beer.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/beercss@3.7.11/dist/cdn/beer.min.js" type="module"></script>
<style>
:root {
--primary: #f59e0b;
--primary-rgb: 245, 158, 11;
--surface: #0f0f0f;
--surface-container: #1a1a1a;
--surface-container-high: #242424;
--on-surface: #fafafa;
--on-surface-variant: #a3a3a3;
--outline: #333333;
--accent-glow: rgba(245, 158, 11, 0.15);
}
[data-theme="light"] {
--primary: #d97706;
--primary-rgb: 217, 119, 6;
--surface: #fafafa;
--surface-container: #f5f5f5;
--surface-container-high: #e5e5e5;
--on-surface: #171717;
--on-surface-variant: #525252;
--outline: #d4d4d4;
--accent-glow: rgba(217, 119, 6, 0.1);
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
body {
font-family: 'Space Grotesk', sans-serif;
background: var(--surface);
color: var(--on-surface);
line-height: 1.6;
overflow-x: hidden;
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--surface-container);
}
::-webkit-scrollbar-thumb {
background: var(--outline);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--on-surface-variant);
}
/* Background Pattern */
.bg-pattern {
position: fixed;
inset: 0;
pointer-events: none;
z-index: -1;
background:
radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
radial-gradient(ellipse 60% 40% at 100% 100%, rgba(var(--primary-rgb), 0.05), transparent);
}
.bg-grid {
position: fixed;
inset: 0;
pointer-events: none;
z-index: -1;
background-image:
linear-gradient(var(--outline) 1px, transparent 1px),
linear-gradient(90deg, var(--outline) 1px, transparent 1px);
background-size: 60px 60px;
opacity: 0.3;
mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
}
/* Header */
.main-header {
position: sticky;
top: 0;
z-index: 100;
background: rgba(var(--primary-rgb), 0.05);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--outline);
}
.logo {
font-weight: 700;
font-size: 1.25rem;
letter-spacing: -0.02em;
}
.logo span {
color: var(--primary);
}
/* Hero */
.hero {
padding: 4rem 1rem;
text-align: center;
}
@media (min-width: 768px) {
.hero {
padding: 6rem 2rem;
}
}
.hero h1 {
font-size: clamp(2.5rem, 8vw, 4.5rem);
font-weight: 700;
letter-spacing: -0.03em;
line-height: 1.1;
margin-bottom: 1rem;
}
.hero h1 .highlight {
color: var(--primary);
position: relative;
}
.hero p {
font-size: clamp(1rem, 2.5vw, 1.25rem);
color: var(--on-surface-variant);
max-width: 600px;
margin: 0 auto 2rem;
}
/* Section Headers */
.section-header {
margin-bottom: 2rem;
}
.section-header h2 {
font-size: 1.75rem;
font-weight: 600;
letter-spacing: -0.02em;
margin-bottom: 0.5rem;
}
.section-header p {
color: var(--on-surface-variant);
}
.section-number {
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem;
color: var(--primary);
margin-bottom: 0.5rem;
display: block;
}
/* Component Cards */
.component-section {
padding: 3rem 1rem;
border-top: 1px solid var(--outline);
}
@media (min-width: 768px) {
.component-section {
padding: 4rem 2rem;
}
}
.component-grid {
display: grid;
gap: 1rem;
}
@media (min-width: 640px) {
.component-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (min-width: 1024px) {
.component-grid {
grid-template-columns: repeat(3, 1fr);
}
}
.component-card {
background: var(--surface-container);
border: 1px solid var(--outline);
border-radius: 16px;
padding: 1.5rem;
transition: all 0.3s ease;
}
.component-card:hover {
border-color: var(--primary);
box-shadow: 0 0 30px var(--accent-glow);
transform: translateY(-2px);
}
.component-card.wide {
grid-column: 1 / -1;
}
@media (min-width: 640px) {
.component-card.wide-sm {
grid-column: span 2;
}
}
.component-title {
font-size: 0.875rem;
font-weight: 600;
color: var(--on-surface-variant);
margin-bottom: 1rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
/* Buttons */
.btn-primary {
background: var(--primary) !important;
color: #000 !important;
font-weight: 600;
border-radius: 12px;
padding: 0.75rem 1.5rem;
transition: all 0.2s ease;
}
.btn-primary:hover {
filter: brightness(1.1);
transform: translateY(-1px);
}
.btn-primary:active {
transform: translateY(0);
}
.btn-outline {
background: transparent !important;
border: 2px solid var(--outline) !important;
color: var(--on-surface) !important;
font-weight: 500;
border-radius: 12px;
padding: 0.75rem 1.5rem;
transition: all 0.2s ease;
}
.btn-outline:hover {
border-color: var(--primary) !important;
color: var(--primary) !important;
}
.btn-ghost {
background: transparent !important;
color: var(--on-surface) !important;
font-weight: 500;
border-radius: 12px;
padding: 0.75rem 1.5rem;
transition: all 0.2s ease;
}
.btn-ghost:hover {
background: var(--surface-container-high) !important;
}
/* Form Elements */
.custom-input {
background: var(--surface-container-high) !important;
border: 1px solid var(--outline) !important;
border-radius: 12px !important;
padding: 0.875rem 1rem !important;
color: var(--on-surface) !important;
font-family: inherit !important;
transition: all 0.2s ease !important;
}
.custom-input:focus {
outline: none !important;
border-color: var(--primary) !important;
box-shadow: 0 0 0 3px var(--accent-glow) !important;
}
.custom-input::placeholder {
color: var(--on-surface-variant) !important;
}
/* Tags & Badges */
.tag {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.375rem 0.75rem;
background: var(--surface-container-high);
border-radius: 100px;
font-size: 0.8125rem;
font-weight: 500;
transition: all 0.2s ease;
}
.tag.primary {
background: rgba(var(--primary-rgb), 0.15);
color: var(--primary);
}
.tag.success {
background: rgba(34, 197, 94, 0.15);
color: #22c55e;
}
.tag.error {
background: rgba(239, 68, 68, 0.15);
color: #ef4444;
}
/* Cards */
.preview-card {
background: var(--surface-container-high);
border-radius: 16px;
overflow: hidden;
transition: all 0.3s ease;
}
.preview-card:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.preview-card img {
width: 100%;
height: 140px;
object-fit: cover;
}
.preview-card .content {
padding: 1rem;
}
.preview-card h4 {
font-weight: 600;
margin-bottom: 0.25rem;
}
.preview-card p {
font-size: 0.875rem;
color: var(--on-surface-variant);
}
/* Progress */
.progress-bar {
height: 8px;
background: var(--surface-container-high);
border-radius: 100px;
overflow: hidden;
}
.progress-bar .fill {
height: 100%;
background: linear-gradient(90deg, var(--primary), rgba(var(--primary-rgb), 0.7));
border-radius: 100px;
transition: width 0.5s ease;
}
/* Tabs */
.tabs-custom {
display: flex;
gap: 0.25rem;
background: var(--surface-container);
padding: 0.25rem;
border-radius: 12px;
border: 1px solid var(--outline);
}
.tab-btn {
flex: 1;
padding: 0.625rem 1rem;
background: transparent;
border: none;
border-radius: 10px;
color: var(--on-surface-variant);
font-weight: 500;
font-family: inherit;
cursor: pointer;
transition: all 0.2s ease;
}
.tab-btn:hover {
color: var(--on-surface);
}
.tab-btn.active {
background: var(--primary);
color: #000;
}
/* Toast/Alert */
.toast-demo {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1rem;
background: var(--surface-container-high);
border-radius: 12px;
border-left: 3px solid var(--primary);
}
.toast-demo .icon {
width: 24px;
height: 24px;
color: var(--primary);
}
/* Avatar Group */
.avatar-group {
display: flex;
}
.avatar-group .avatar {
width: 36px;
height: 36px;
border-radius: 50%;
border: 2px solid var(--surface-container);
margin-left: -10px;
background: var(--surface-container-high);
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
font-weight: 600;
}
.avatar-group .avatar:first-child {
margin-left: 0;
}
/* Toggle */
.toggle-custom {
position: relative;
width: 52px;
height: 28px;
background: var(--surface-container-high);
border-radius: 100px;
cursor: pointer;
transition: all 0.3s ease;
}
.toggle-custom::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 22px;
height: 22px;
background: var(--on-surface);
border-radius: 50%;
transition: all 0.3s ease;
}
.toggle-custom.active {
background: var(--primary);
}
.toggle-custom.active::after {
left: 27px;
background: #000;
}
/* Theme Toggle */
.theme-toggle {
position: relative;
width: 44px;
height: 44px;
border-radius: 12px;
background: var(--surface-container);
border: 1px solid var(--outline);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
}
.theme-toggle:hover {
border-color: var(--primary);
}
.theme-toggle .icon {
transition: all 0.3s ease;
}
/* Modal */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
z-index: 200;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.modal-overlay.active {
opacity: 1;
visibility: visible;
}
.modal-content {
background: var(--surface-container);
border: 1px solid var(--outline);
border-radius: 20px;
padding: 2rem;
max-width: 400px;
width: 100%;
transform: scale(0.95) translateY(10px);
transition: all 0.3s ease;
}
.modal-overlay.active .modal-content {
transform: scale(1) translateY(0);
}
/* Animations */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.animate-in {
animation: fadeInUp 0.6s ease forwards;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.reveal {
opacity: 0;
transform: translateY(30px);
transition: all 0.6s ease;
}
.reveal.visible {
opacity: 1;
transform: translateY(0);
}
/* Interactive Demo */
.interactive-demo {
background: linear-gradient(135deg, var(--surface-container) 0%, var(--surface-container-high) 100%);
border: 1px solid var(--outline);
border-radius: 20px;
padding: 2rem;
text-align: center;
}
.counter-display {
font-size: 4rem;
font-weight: 700;
color: var(--primary);
font-family: 'JetBrains Mono', monospace;
margin: 1rem 0;
}
.counter-btns {
display: flex;
gap: 0.5rem;
justify-content: center;
flex-wrap: wrap;
}
/* Color Palette */
.color-palette {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 0.5rem;
}
.color-swatch {
aspect-ratio: 1;
border-radius: 12px;
display: flex;
align-items: flex-end;
padding: 0.5rem;
font-size: 0.625rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.color-swatch:hover {
transform: scale(1.05);
}
/* Spacing Demo */
.spacing-demo {
display: flex;
align-items: flex-end;
gap: 0.5rem;
}
.spacing-block {
background: var(--primary);
border-radius: 4px;
opacity: 0.8;
}
/* Nav Demo */
.nav-demo {
background: var(--surface-container-high);
border-radius: 12px;
padding: 0.75rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav-links {
display: flex;
gap: 0.5rem;
}
.nav-link {
padding: 0.5rem 0.75rem;
border-radius: 8px;
color: var(--on-surface-variant);
font-size: 0.875rem;
transition: all 0.2s ease;
cursor: pointer;
}
.nav-link:hover {
color: var(--on-surface);
background: var(--surface-container);
}
.nav-link.active {
color: var(--primary);
}
/* Focus states */
button:focus-visible,
input:focus-visible,
a:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
}
</style>
</head>
<body>
<div class="bg-pattern"></div>
<div class="bg-grid"></div>
<!-- Header -->
<header class="main-header">
<nav class="max-w-7xl mx-auto px-4 py-3 flex items-center justify-between">
<a href="#" class="logo">Beer<span>CSS</span> UI Kit</a>
<div class="flex items-center gap-3">
<button class="theme-toggle" id="themeToggle" aria-label="Toggle theme">
<i class="icon material-icons" id="themeIcon">dark_mode</i>
</button>
<a href="#components" class="btn-outline small hide-on-mobile">Components</a>
</div>
</nav>
</header>
<!-- Hero -->
<section class="hero">
<div class="max-w-4xl mx-auto">
<span class="section-number animate-in">Mobile-First Design System</span>
<h1 class="animate-in animate-delay-1">
Build <span class="highlight">beautiful</span> interfaces faster
</h1>
<p class="animate-in animate-delay-2">
A comprehensive UI kit built with Beercss, featuring 50+ components designed for mobile-first experiences with smooth interactions and accessibility in mind.
</p>
<div class="flex gap-3 justify-center flex-wrap animate-in animate-delay-3">
<button class="btn-primary" onclick="scrollToSection('components')">
<i class="material-icons">widgets</i>
Browse Components
</button>
<button class="btn-outline" onclick="openModal()">
<i class="material-icons">play_arrow</i>
View Demo
</button>
</div>
</div>
</section>
<!-- Components Section -->
<main id="components" class="max-w-7xl mx-auto">
<!-- Buttons Section -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">01</span>
<h2>Buttons</h2>
<p>Interactive elements for user actions</p>
</div>
<div class="component-grid">
<div class="component-card">
<div class="component-title">Primary Actions</div>
<div class="flex gap-2 flex-wrap">
<button class="btn-primary">Get Started</button>
<button class="btn-primary">
<i class="material-icons">add</i>
Create
</button>
</div>
</div>
<div class="component-card">
<div class="component-title">Secondary Actions</div>
<div class="flex gap-2 flex-wrap">
<button class="btn-outline">Learn More</button>
<button class="btn-ghost">Cancel</button>
</div>
</div>
<div class="component-card">
<div class="component-title">Sizes</div>
<div class="flex gap-2 items-center flex-wrap">
<button class="btn-primary small">Small</button>
<button class="btn-primary">Default</button>
<button class="btn-primary large">Large</button>
</div>
</div>
<div class="component-card">
<div class="component-title">Icon Buttons</div>
<div class="flex gap-2">
<button class="btn-primary circle">
<i class="material-icons">add</i>
</button>
<button class="btn-outline circle">
<i class="material-icons">edit</i>
</button>
<button class="btn-ghost circle">
<i class="material-icons">delete</i>
</button>
</div>
</div>
<div class="component-card wide-sm">
<div class="component-title">Button Group</div>
<div class="tabs-custom">
<button class="tab-btn active" data-tab="day">Day</button>
<button class="tab-btn" data-tab="week">Week</button>
<button class="tab-btn" data-tab="month">Month</button>
</div>
</div>
</div>
</section>
<!-- Form Elements -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">02</span>
<h2>Form Elements</h2>
<p>Input components for data collection</p>
</div>
<div class="component-grid">
<div class="component-card">
<div class="component-title">Text Input</div>
<input type="text" class="custom-input full-width" placeholder="Enter your email...">
</div>
<div class="component-card">
<div class="component-title">Search Input</div>
<div class="field border round fill">
<i class="material-icons prefix">search</i>
<input type="text" placeholder="Search components...">
</div>
</div>
<div class="component-card">
<div class="component-title">Select</div>
<select class="custom-input full-width">
<option>Select option</option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</div>
<div class="component-card">
<div class="component-title">Toggle</div>
<div class="flex gap-4 items-center">
<span class="text-sm">Dark mode</span>
<div class="toggle-custom active" onclick="this.classList.toggle('active')" role="switch" tabindex="0" aria-label="Toggle dark mode"></div>
</div>
</div>
<div class="component-card">
<div class="component-title">Checkboxes</div>
<div class="flex flex-col gap-2">
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox" checked>
<span>Option one</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox">
<span>Option two</span>
</label>
</div>
</div>
<div class="component-card">
<div class="component-title">Radio Buttons</div>
<div class="flex flex-col gap-2">
<label class="flex items-center gap-2 cursor-pointer">
<input type="radio" name="radio-group" checked>
<span>First choice</span>
</label>
<label class="flex items-center gap-2 cursor-pointer">
<input type="radio" name="radio-group">
<span>Second choice</span>
</label>
</div>
</div>
<div class="component-card wide">
<div class="component-title">Textarea</div>
<textarea class="custom-input full-width" rows="3" placeholder="Write your message..."></textarea>
</div>
</div>
</section>
<!-- Cards -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">03</span>
<h2>Cards</h2>
<p>Container components for content organization</p>
</div>
<div class="component-grid">
<div class="component-card wide-sm">
<div class="component-title">Product Card</div>
<div class="preview-card">
<img src="https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=400&h=200&fit=crop" alt="Abstract art">
<div class="content">
<h4>Abstract Design</h4>
<p>Digital artwork collection</p>
<div class="flex justify-between items-center mt-3">
<span class="font-semibold">$24.99</span>
<button class="btn-primary small">Buy Now</button>
</div>
</div>
</div>
</div>
<div class="component-card">
<div class="component-title">Profile Card</div>
<div class="text-center py-4">
<img src="https://i.pravatar.cc/80?img=12" alt="Avatar" class="w-16 h-16 rounded-full mx-auto mb-3">
<h4 class="font-semibold">Sarah Chen</h4>
<p class="text-sm opacity-70">Product Designer</p>
<div class="flex justify-center gap-2 mt-3">
<span class="tag primary">UI</span>
<span class="tag">UX</span>
</div>
</div>
</div>
<div class="component-card">
<div class="component-title">Stats Card</div>
<div class="text-center py-4">
<div class="text-3xl font-bold" style="color: var(--primary)">12,847</div>
<p class="text-sm opacity-70">Total Users</p>
<div class="flex items-center justify-center gap-1 mt-2 text-sm" style="color: #22c55e">
<i class="material-icons small">trending_up</i>
+12.5% this month
</div>
</div>
</div>
</div>
</section>
<!-- Tags & Badges -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">04</span>
<h2>Tags & Badges</h2>
<p>Labels and status indicators</p>
</div>
<div class="component-grid">
<div class="component-card wide">
<div class="component-title">Tags</div>
<div class="flex gap-2 flex-wrap">
<span class="tag">Default</span>
<span class="tag primary">Primary</span>
<span class="tag success">Success</span>
<span class="tag error">Error</span>
<span class="tag">
<i class="material-icons small">star</i>
Featured
</span>
<span class="tag primary">
React
<i class="material-icons small" style="cursor:pointer">close</i>
</span>
</div>
</div>
<div class="component-card">
<div class="component-title">Notification Badge</div>
<div class="flex gap-4 items-center justify-center py-4">
<div class="relative">
<i class="material-icons text-2xl">mail</i>
<span class="absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full text-xs flex items-center justify-center">3</span>
</div>
<div class="relative">
<i class="material-icons text-2xl">notifications</i>
<span class="absolute -top-1 -right-1 w-4 h-4 rounded-full text-xs flex items-center justify-center" style="background: var(--primary); color: #000">9+</span>
</div>
</div>
</div>
<div class="component-card">
<div class="component-title">Avatar Group</div>
<div class="flex items-center justify-center py-4">
<div class="avatar-group">
<div class="avatar"><img src="https://i.pravatar.cc/36?img=1" alt=""></div>
<div class="avatar"><img src="https://i.pravatar.cc/36?img=2" alt=""></div>
<div class="avatar"><img src="https://i.pravatar.cc/36?img=3" alt=""></div>
<div class="avatar"><img src="https://i.pravatar.cc/36?img=4" alt=""></div>
<div class="avatar">+5</div>
</div>
</div>
</div>
</div>
</section>
<!-- Progress & Loading -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">05</span>
<h2>Progress & Loading</h2>
<p>Feedback and status indicators</p>
</div>
<div class="component-grid">
<div class="component-card wide-sm">
<div class="component-title">Progress Bars</div>
<div class="flex flex-col gap-4">
<div>
<div class="flex justify-between text-sm mb-1">
<span>Upload progress</span>
<span>75%</span>
</div>
<div class="progress-bar">
<div class="fill" style="width: 75%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Storage used</span>
<span>45%</span>
</div>
<div class="progress-bar">
<div class="fill" style="width: 45%"></div>
</div>
</div>
</div>
</div>
<div class="component-card">
<div class="component-title">Spinner</div>
<div class="flex gap-4 justify-center py-4">
<progress class="circle"></progress>
<progress class="circle" style="color: var(--primary)"></progress>
</div>
</div>
<div class="component-card">
<div class="component-title">Toast / Alert</div>
<div class="toast-demo">
<i class="icon material-icons">check_circle</i>
<div>
<div class="font-medium text-sm">Success!</div>
<div class="text-xs opacity-70">Changes saved successfully</div>
</div>
</div>
</div>
</div>
</section>
<!-- Navigation -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">06</span>
<h2>Navigation</h2>
<p>Wayfinding and menu components</p>
</div>
<div class="component-grid">
<div class="component-card wide">
<div class="component-title">Horizontal Nav</div>
<div class="nav-demo">
<div class="font-semibold">Brand</div>
<div class="nav-links hide-on-mobile">
<div class="nav-link active">Home</div>
<div class="nav-link">Products</div>
<div class="nav-link">About</div>
<div class="nav-link">Contact</div>
</div>
<button class="btn-primary small">Get Started</button>
</div>
</div>
<div class="component-card">
<div class="component-title">Breadcrumbs</div>
<div class="flex items-center gap-2 text-sm">
<a href="#" style="color: var(--primary)">Home</a>
<i class="material-icons small">chevron_right</i>
<a href="#" style="color: var(--primary)">Products</a>
<i class="material-icons small">chevron_right</i>
<span class="opacity-70">Details</span>
</div>
</div>
<div class="component-card">
<div class="component-title">Pagination</div>
<div class="flex gap-1 justify-center">
<button class="btn-ghost circle small">
<i class="material-icons small">chevron_left</i>
</button>
<button class="btn-ghost small">1</button>
<button class="btn-primary small">2</button>
<button class="btn-ghost small">3</button>
<button class="btn-ghost circle small">
<i class="material-icons small">chevron_right</i>
</button>
</div>
</div>
</div>
</section>
<!-- Interactive Demo -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">07</span>
<h2>Interactive Demo</h2>
<p>Live component interactions</p>
</div>
<div class="component-grid">
<div class="component-card wide">
<div class="interactive-demo">
<p class="text-sm opacity-70 mb-2">Interactive Counter</p>
<div class="counter-display" id="counterDisplay">0</div>
<div class="counter-btns">
<button class="btn-outline" onclick="updateCounter(-10)">-10</button>
<button class="btn-outline" onclick="updateCounter(-1)">-1</button>
<button class="btn-primary" onclick="updateCounter(1)">+1</button>
<button class="btn-outline" onclick="updateCounter(10)">+10</button>
<button class="btn-ghost" onclick="resetCounter()">Reset</button>
</div>
</div>
</div>
<div class="component-card wide-sm">
<div class="component-title">Color Palette</div>
<div class="color-palette" id="colorPalette"></div>
</div>
<div class="component-card">
<div class="component-title">Spacing Scale</div>
<div class="spacing-demo">
<div class="spacing-block" style="width: 16px; height: 16px;"></div>
<div class="spacing-block" style="width: 24px; height: 24px;"></div>
<div class="spacing-block" style="width: 32px; height: 32px;"></div>
<div class="spacing-block" style="width: 48px; height: 48px;"></div>
<div class="spacing-block" style="width: 64px; height: 64px;"></div>
</div>
<div class="flex justify-between text-xs mt-2 opacity-70">
<span>4px</span>
<span>64px</span>
</div>
</div>
</div>
</section>
<!-- Typography -->
<section class="component-section reveal">
<div class="section-header">
<span class="section-number">08</span>
<h2>Typography</h2>
<p>Text styles and hierarchy</p>
</div>
<div class="component-grid">
<div class="component-card wide">
<div class="component-title">Type Scale</div>
<div class="flex flex-col gap-3">
<div>
<span class="text-xs opacity-50">Display / 48px</span>
<h1 class="text-5xl font-bold">The quick brown fox</h1>
</div>
<div>
<span class="text-xs opacity-50">Heading 1 / 32px</span>
<h1 class="text-4xl">Jumps over the lazy dog</h1>
</div>
<div>
<span class="text-xs opacity-50">Heading 2 / 24px</span>
<h2 class="text-2xl">Pack my box with five</h2>
</div>
<div>
<span class="text-xs opacity-50">Body / 16px</span>
<p>Dozen liquor jugs. Amazingly few discotheques provide jukeboxes. How vexingly quick daft zebras jump!</p>
</div>
<div>
<span class="text-xs opacity-50">Caption / 12px</span>
<p class="text-xs">The five boxing wizards jump quickly.</p>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="border-t py-8 px-4 mt-8" style="border-color: var(--outline)">
<div class="max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center gap-4">
<div class="logo">Beer<span>CSS</span> UI Kit</div>
<p class="text-sm opacity-70">Built with Beercss. Mobile-first, accessible, and beautiful.</p>
<div class="flex gap-2">
<a href="#" class="btn-ghost circle small" aria-label="GitHub">
<i class="material-icons">code</i>
</a>
<a href="#" class="btn-ghost circle small" aria-label="Documentation">
<i class="material-icons">description</i>
</a>
</div>
</div>
</footer>
<!-- Modal -->
<div class="modal-overlay" id="modal" onclick="closeModalOnBackdrop(event)">
<div class="modal-content" onclick="event.stopPropagation()">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-semibold">Welcome to UI Kit</h3>
<button class="btn-ghost circle small" onclick="closeModal()" aria-label="Close modal">
<i class="material-icons">close</i>
</button>
</div>
<p class="opacity-70 mb-4">This is a demonstration of a modal dialog. You can put any content here, including forms, images, or other components.</p>
<div class="flex gap-2 justify-end">
<button class="btn-ghost" onclick="closeModal()">Cancel</button>
<button class="btn-primary" onclick="closeModal()">Confirm</button>
</div>
</div>
</div>
<script>
// Initialize data
const colorPalette = [
{ color: '#f59e0b', name: 'Amber' },
{ color: '#ef4444', name: 'Red' },
{ color: '#22c55e', name: 'Green' },
{ color: '#3b82f6', name: 'Blue' },
{ color: '#8b5cf6', name: 'Violet' },
{ color: '#ec4899', name: 'Pink' },
{ color: '#06b6d4', name: 'Cyan' },
{ color: '#f97316', name: 'Orange' },
];
// State
let counter = 0;
// DOM Elements
const themeToggle = document.getElementById('themeToggle');
const themeIcon = document.getElementById('themeIcon');
const modal = document.getElementById('modal');
const counterDisplay = document.getElementById('counterDisplay');
const paletteContainer = document.getElementById('colorPalette');
// Theme Toggle
function updateThemeIcon() {
const isDark = document.documentElement.getAttribute('data-theme') === 'dark';
themeIcon.textContent = isDark ? 'dark_mode' : 'light_mode';
}
themeToggle.addEventListener('click', () => {
const html = document.documentElement;
const currentTheme = html.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
html.setAttribute('data-theme', newTheme);
updateThemeIcon();
});
// Modal
function openModal() {
modal.classList.add('active');
document.body.style.overflow = 'hidden';
}
function closeModal() {
modal.classList.remove('active');
document.body.style.overflow = '';
}
function closeModalOnBackdrop(event) {
if (event.target === modal) {
closeModal();
}
}
// Keyboard close for modal
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && modal.classList.contains('active')) {
closeModal();
}
});
// Counter
function updateCounter(delta) {
counter += delta;
counterDisplay.textContent = counter;
counterDisplay.style.transform = 'scale(1.1)';
setTimeout(() => {
counterDisplay.style.transform = 'scale(1)';
}, 100);
}
function resetCounter() {
counter = 0;
counterDisplay.textContent = counter;
}
// Color Palette
function renderColorPalette() {
paletteContainer.innerHTML = colorPalette.map(item => `
<div class="color-swatch"
style="background: ${item.color}; color: ${getContrastColor(item.color)}"
onclick="copyColor('${item.color}')"
title="Click to copy ${item.color}">
${item.name}
</div>
`).join('');
}
function getContrastColor(hex) {
const r = parseInt(hex.slice(1, 3), 16);
const g = parseInt(hex.slice(3, 5), 16);
const b = parseInt(hex.slice(5, 7), 16);
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
return luminance > 0.5 ? '#000000' : '#ffffff';
}
function copyColor(color) {
navigator.clipboard.writeText(color).then(() => {
showToast(`Copied ${color} to clipboard`);
});
}
function showToast(message) {
const toast = document.createElement('div');
toast.className = 'fixed bottom-4 left-1/2 -translate-x-1/2 px-4 py-2 rounded-lg text-sm font-medium z-50';
toast.style.background = 'var(--primary)';
toast.style.color = '#000';
toast.textContent = message;
document.body.appendChild(toast);
setTimeout(() => {
toast.style.opacity = '0';
toast.style.transition = 'opacity 0.3s';
setTimeout(() => toast.remove(), 300);
}, 2000);
}
// Scroll reveal
function initScrollReveal() {
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
});
document.querySelectorAll('.reveal').forEach(el => {
observer.observe(el);
});
}
// Tab functionality
document.querySelectorAll('.tabs-custom').forEach(tabContainer => {
tabContainer.querySelectorAll('.tab-btn').forEach(btn => {
btn.addEventListener('click', () => {
tabContainer.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
});
});
});
// Smooth scroll
function scrollToSection(id) {
const element = document.getElementById(id);
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
}
}
// Toggle keyboard accessibility
document.querySelectorAll('.toggle-custom').forEach(toggle => {
toggle.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
toggle.classList.toggle('active');
}
});
});
// Initialize
document.addEventListener('DOMContentLoaded', () => {
updateThemeIcon();
renderColorPalette();
initScrollReveal();
});
</script>
</body>
</html>
Key Features
Design Philosophy
- Mobile-first: All components are designed for mobile viewports first, then enhanced for larger screens
- Dark/Light themes: Full theme switching with smooth transitions
- Amber accent color: Warm, distinctive palette that avoids generic purple gradients
Components Included
- Buttons - Primary, outline, ghost, icon buttons, and button groups
- Form Elements - Inputs, selects, toggles, checkboxes, radio buttons, textareas
- Cards - Product cards, profile cards, stats cards with hover effects
- Tags & Badges - Status indicators, notification badges, avatar groups
- Progress & Loading - Progress bars, spinners, toast notifications
- Navigation - Horizontal nav, breadcrumbs, pagination
- Typography - Complete type scale demonstration
Interactions
- Counter demo: Interactive counter with increment/decrement buttons
- Color palette: Click-to-copy color swatches
- Tab switching: Functional tab component
- Modal dialog: Animated modal with backdrop click-to-close
- Theme toggle: Smooth dark/light mode switching
- Scroll reveal: Components animate in as you scroll
Accessibility
- Semantic HTML structure
- ARIA labels on interactive elements
- Keyboard navigation support
- Focus-visible states
- Respects
prefers-reduced-motion