What problem does it solve?
Prevents inconsistent, inaccessible, and performance-problematic UI produced by ad-hoc styling and AI-generated components by enforcing a concise set of design and implementation constraints for Tailwind CSS projects.
Core Features & Use Cases
- Animation rules: Validates animation durations, compositor-only properties, reduced-motion respect, and limits loop and easing choices to avoid janky or distracting motion.
- Typography & tokens: Enforces typography scale, text-balance usage, tabular numbers for data, and forbids arbitrary letter-spacing to maintain visual rhythm and data readability.
- Accessibility & components: Requires accessible primitives (Radix, React Aria, Base UI), aria-labels on icon-only buttons, AlertDialog for destructive actions, and forbids rebuilding focus/keyboard behavior by hand.
- Layout & performance: Detects anti-patterns (h-screen, arbitrary z-index, heavy backdrop-filters), recommends size-* utilities for squares, and enforces safe-area and fixed z-index scale.
- Use Cases: Reviewing a React component or Tailwind utility file in a PR, auditing a design system update, or enforcing stylistic rules across UI components.
Quick Start
Run the baseline-ui check on a React or Tailwind file to list exact violations, state why each matters in one short sentence, and provide a concrete code-level fix.