AgentSkillsCN

ui-style-guide

使用 XeLaTeX 编译 Beamer LaTeX 演讲稿(3 次编译 + bibtex)。在编译讲座幻灯片时,此方法尤为适用。

SKILL.md
--- frontmatter
name: ui-style-guide
description: "Visual design system for the Reel Ballers video editor. Colors, buttons, spacing, components. Apply when creating UI components or styling elements."
license: MIT
author: video-editor
version: 1.0.0

UI Style Guide

Visual design patterns for consistent UI across the application.

When to Apply

  • Creating new UI components
  • Styling existing elements
  • Choosing button variants
  • Setting colors, spacing, typography

Rule Categories

PriorityCategoryImpactPrefix
1ColorsHIGHstyle-color-
2ButtonsHIGHstyle-btn-
3SpacingMEDIUMstyle-space-
4ComponentsMEDIUMstyle-comp-

Color Palette

Brand Colors

ColorTailwindHexUsage
Purplepurple-600#9333EAPrimary brand, main actions
Greengreen-600#16A34ASuccess, add, annotate mode
Blueblue-600#2563EBFraming mode, informational

Semantic Colors

PurposeBaseHoverUsage
Primarypurple-600purple-700Main CTAs
Successgreen-600green-700Add, play, load
Dangerred-600red-700Delete, destructive
Secondarygray-700gray-600Cancel, neutral

Background Colors

ElementColorUsage
Appgray-900Main background
Cardgray-800Cards, modals
Hovergray-700Interactive elements

Button Component

Use <Button> from components/shared/Button.jsx:

jsx
import { Button } from '@/components/shared';

// Variants
<Button variant="primary">Save</Button>     // Purple - main actions
<Button variant="secondary">Cancel</Button> // Gray - neutral
<Button variant="success">Add</Button>      // Green - positive
<Button variant="danger">Delete</Button>    // Red - destructive
<Button variant="ghost">Settings</Button>   // Minimal - toolbars

// With icons
<Button variant="primary" icon={Plus}>New Project</Button>
<Button variant="ghost" icon={Settings} iconOnly />

// Sizes
<Button size="sm">Small</Button>  // Compact UI
<Button size="md">Medium</Button> // Default
<Button size="lg">Large</Button>  // CTAs

Spacing Scale

SizeClassUsage
Tightgap-1Icon + text
Defaultgap-2Button content
Comfortablegap-3Button groups
Spaciousgap-4Sections

Padding

ElementPadding
Small buttonpx-3 py-1.5
Medium buttonpx-4 py-2
Large buttonpx-6 py-3
Cardp-4
Modal sectionpx-6 py-4

Typography

ElementClasses
Page titletext-4xl font-bold text-white
Section titletext-2xl font-bold text-white
Card titletext-lg font-semibold text-white
Bodytext-sm text-gray-300
Labeltext-sm text-gray-400
Smalltext-xs text-gray-500

Common Patterns

Card

jsx
<div className="p-4 bg-gray-800 rounded-lg border border-gray-700 hover:border-purple-500">
  {/* content */}
</div>

Modal

jsx
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60">
  <div className="bg-gray-800 rounded-lg shadow-xl max-w-md w-full border border-gray-700">
    <div className="px-6 py-4 border-b border-gray-700">Header</div>
    <div className="px-6 py-4">Body</div>
    <div className="px-6 py-4 border-t border-gray-700 flex justify-end gap-3">
      <Button variant="secondary">Cancel</Button>
      <Button variant="primary">Confirm</Button>
    </div>
  </div>
</div>

Input

jsx
<input className="w-full px-3 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white placeholder-gray-400 focus:ring-2 focus:ring-purple-500" />

Complete Rules

See individual rule files in rules/ directory. See also: src/frontend/src/STYLE_GUIDE.md for full visual reference.