v6.0 Ultimate

ChaozCode Design System

The ultimate modern design system with OKLCH colors, CSS nesting, container queries, scroll-driven animations, and 100+ production-ready components.

🎨

OKLCH Colors

12-step perceptually uniform color scales with perfect consistency across all hues.

📱

Container Queries

Components that adapt to their container, not the viewport. True component-level responsiveness.

CSS Nesting

Native CSS nesting for cleaner, more maintainable stylesheets without preprocessors.

🎬

Scroll Animations

Native scroll-driven animations with CSS-only parallax and reveal effects.

📐

Fluid Typography

Seamless scaling with clamp() - no breakpoints, perfect at every size.

🔒

Cascade Layers

@layer for predictable specificity - reset, base, components, utilities.

🚀 Quick Start

💡
Browser Support: This design system requires modern browsers. CSS nesting (Chrome 112+), :has() (Chrome 105+), container queries (Chrome 105+).
HTML
<!-- Include the design system -->
<link rel="stylesheet" href="style-guide-v6.css">
<script src="jordan-sandbox/chaoz-ui.js"></script>

<!-- Use components -->
<button class="btn btn-primary">Get Started</button>

<div class="card hover-lift">
    <h3 class="card-title">Hello ChaozCode</h3>
    <p class="card-content">Build amazing things.</p>
</div>

🎨 Color System

Using OKLCH color space for perceptually uniform colors. Each scale has 12 steps from lightest (1) to darkest (12), with step 9 as the primary accent.

Primary Scale

Semantic Colors

Success
Warning
Danger
Info
CSS
/* OKLCH color definition */
--primary-9: oklch(50% 0.17 265);  /* Main purple */
--success: oklch(65% 0.18 145);    /* Green */
--warning: oklch(75% 0.16 85);     /* Orange */
--danger: oklch(60% 0.22 25);      /* Red */

/* Using color-mix() for variants */
background: color-mix(in oklch, var(--primary-9) 20%, transparent);

📝 Typography

Fluid typography using clamp() for seamless scaling. No breakpoints needed - text smoothly adapts from mobile to desktop.

Hero Text
Heading 1
Heading 2
Heading 3
Heading 4
Large Text
Body Text (default)
Small Text
Extra Small / Caption

Gradient Text

Beautiful Gradient Typography

CSS
/* Fluid typography scale */
--fluid-base: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
--fluid-xl: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
--fluid-hero: clamp(3rem, 2rem + 5vw, 7rem);

/* Usage */
.text-hero { font-size: var(--fluid-hero); }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

📏 Spacing System

Fluid spacing that scales with viewport using clamp(). Based on an 8px grid with responsive adjustments.

--space-xs
4-8px
--space-sm
8-14px
--space-md
12-22px
--space-lg
16-28px
--space-xl
24-44px
--space-2xl
32-68px
--space-3xl
48-104px

🔘 Buttons

Variants

Semantic

Sizes

With Icons

Magnetic Effect

📦 Cards

Basic Cards

🚀

Feature Card

Cards automatically adapt to their container width using CSS container queries.

Performance

Optimized for 60fps animations with CSS transforms and GPU acceleration.

Fast GPU
🎨

Customizable

All components use CSS custom properties for easy theming and customization.

Glass Card

Glassmorphism

Frosted glass effect with backdrop blur and subtle borders.

3D Flip Card

Hover to Flip

3D perspective transform with backface visibility.

Back Side

CSS transforms make this possible!

📋 Form Elements

Text Inputs

🔍

Controls

Dark Mode
Notifications

💬 Feedback Components

Alerts

ℹ️
Info: This is an informational message.
Success: Operation completed successfully!
⚠️
Warning: Please review before continuing.
🚫
Error: Something went wrong.

Badges

Default Primary Success Warning Danger

Tooltips

Tip

Toast Notifications

Modal Dialog

Loading States

Spinner
Progress: 65%

Skeleton Loading

📊 Data Display

Data Table

Name Status Role Action
JD
John Doe
Active Developer
AS
Alice Smith
Pending Designer
BJ
Bob Johnson
Inactive Manager

Avatars

SM
MD
LG
XL
A
B
C
+5

Timeline

Today, 2:30 PM

Project launched

Successfully deployed to production.

Yesterday, 4:00 PM

Code review completed

All feedback addressed.

Jan 20, 9:00 AM

Development started

Initial commit pushed.

Stepper

Cart
Shipping
3
Payment
4
Done

Chips / Tags

JavaScript
TypeScript
CSS
React

Animations

CSS-only animations with scroll-driven effects in modern browsers. All animations respect prefers-reduced-motion.

Keyframe Animations

Fade In
Fade Up
Scale In
Pulse
Bounce
Float

Hover Effects

Hover Lift

Lifts with shadow

Hover Scale

Subtle scale up

Hover Glow

Purple glow

Hover Border

Border color change

Glow Animation

Staggered Entrance

1
2
3
4
5
6

Scroll Animations (Chrome 115+)

💡
Scroll down to see elements animate in. These use animation-timeline: view() for native scroll-driven animations.

Scroll Reveal 1

Fades in as you scroll

Scroll Reveal 2

Fades in as you scroll

Scroll Reveal 3

Fades in as you scroll

Advanced Features

Container Queries

Components adapt to their container, not the viewport. Resize the demo below.

CQ

Container Query Demo

Drag the edge to resize →

CSS :has() Selector

Parent selector capability - style parents based on children.

CSS
/* Style card differently when it contains an image */
.card:has(img) {
    padding: 0;
    overflow: hidden;
}

/* Highlight input group when input is focused */
.input-group:has(input:focus) {
    background: var(--bg-elevated);
}

/* Show error message only when input is invalid */
.input-group:has(input:invalid) .error-message {
    display: block;
}

CSS Nesting

CSS
.card {
    background: var(--bg-elevated);
    
    /* Nested rules */
    &:hover {
        transform: translateY(-4px);
    }
    
    .card-title {
        color: var(--text-primary);
    }
    
    /* Media query inside */
    @media (max-width: 768px) {
        padding: var(--space-md);
    }
}

@layer Cascade

CSS
/* Define layer order - last wins for same specificity */
@layer reset, base, layout, components, utilities, animations;

/* Reset styles in their own layer */
@layer reset {
    *, *::before, *::after { box-sizing: border-box; }
}

/* Utilities always win (they're last) */
@layer utilities {
    .hidden { display: none !important; }
}

Color Functions

CSS
/* OKLCH - perceptually uniform */
--primary-9: oklch(50% 0.17 265);

/* color-mix for variants */
--primary-hover: color-mix(in oklch, var(--primary-9) 90%, white);
--primary-light: color-mix(in oklch, var(--primary-9) 20%, transparent);

/* relative color syntax (experimental) */
--primary-dark: oklch(from var(--primary-9) calc(l - 0.1) c h);

🔧 Utility Classes

Flexbox

.flex
.flex-col
.flex-wrap
.items-center
.items-start
.justify-center
.justify-between
.gap-xs/sm/md/lg/xl

Grid

.grid
.grid-cols-1/2/3/4
.md\:grid-cols-1/2
.gap-xs/sm/md/lg/xl

Spacing

.m-auto .mx-auto
.mt-xs/sm/md/lg/xl
.mb-xs/sm/md/lg/xl
.p-xs/sm/md/lg/xl

Typography

.text-xs/sm/base/md/lg/xl/2xl/3xl/hero
.font-normal/medium/semibold/bold/black
.text-center/left/right
.text-primary/secondary/muted
.text-gradient

Effects

.shadow-sm/md/lg/xl/glow
.rounded-sm/md/lg/xl/full
.blur .backdrop-blur
.opacity-0/50/100

Animations

.animate-fadeIn/fadeInUp
.animate-scaleIn/spin/pulse
.animate-bounce/float/glow
.hover-lift/scale/glow/border
.transition-fast/base/slow

🎮 Interactive Demos

Dropdown Menu

Magnetic Buttons

Buttons that follow your cursor with a magnetic effect.

Number Counter

0
Users
0
Projects
0
% Uptime

Text Scramble

Hover to scramble

Confetti 🎉