What problem does it solve?
Enforces consistent, maintainable component styling by requiring Tailwind theme tokens and approved utility patterns so components remain cohesive, accessible, and easy to update across the Canvas codebase.
Core Features & Use Cases
- Theme-First Styling: Require use of Tailwind CSS v4 theme variables defined in global.css instead of hardcoded color values.
- Variant-Based Props: Encourage CVA-driven variants and curated enum props rather than arbitrary color strings to ensure consistent design choices and easier theming.
- Safe Class Merging: Advocate using a cn merging utility that combines clsx with tailwind-merge to resolve conflicting utilities and allow consumer overrides via className passed last.
- Use Case: When adding a new Button or Card component, use theme tokens for colors, define a small set of colorScheme variants with CVA, accept a className prop for overrides, and avoid adding third-party CSS libraries.
Quick Start
Use the canvas-styling-conventions guidance to convert component styles to use Tailwind theme tokens, cva variants, and a cn merging utility instead of hardcoded color values.