style-modus-components-with-tailwind

Replace Tailwind border and opacity patterns with CSS-variable utilities for Modus components.

3|2|Updated Oct 3, 2025
One-click install
npx skills add https://github.com/julianoczkowski/create-trimble-app --skill style-modus-components-with-tailwind
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: style-modus-components-with-tailwind
Source: https://github.com/julianoczkowski/create-trimble-app/tree/main/templates/react/.cursor/skills/style-modus-components-with-tailwind
Command: npx skills add https://github.com/julianoczkowski/create-trimble-app --skill style-modus-components-with-tailwind

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Styling Modus components with borders and opacity using CSS variables at runtime, avoiding Tailwind patterns that break when themes change.

Core Features & Use Cases

  • Custom border utilities that work with CSS variables across all six Modus themes.
  • Custom opacity utilities for text, background, and borders that adapt to runtime theming.
  • Use Case: Build theme-aware UI cards and alerts without Tailwind color classes.

Quick Start

Apply the custom border and opacity utilities to a sample Modus component to ensure runtime CSS variable theming across all six themes.

Frequently Asked Questions about style-modus-components-with-tailwind

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I style Modus components with borders and opacity that survive theme switching?

To style Modus components for theme switching, replace Tailwind border and opacity patterns with custom CSS-variable utilities defined in src/index.css. This ensures borders and opacity adapt to runtime theming across all six Modus themes without code changes.

Why do Tailwind color classes break when changing Modus themes at runtime?

Tailwind color classes break during runtime theme switching because they use static color tokens instead of dynamic values. Using CSS-variable utilities for borders and opacity ensures styles adapt to the active Modus theme without requiring code modifications.

How do I apply custom border and opacity utilities to a Modus UI component?

To apply custom border and opacity utilities to a Modus component, use the custom CSS classes defined in src/index.css instead of standard Tailwind classes. This applies theme-aware styling to elements like UI cards and alerts across all six themes.

Does this approach support all Modus themes without modifying component code?

Yes, using CSS-variable utilities supports all six Modus themes without modifying component code. By avoiding Tailwind color tokens and referencing CSS variables, UI elements automatically adjust borders and opacity when the runtime theme changes.

What is the best way to build theme-aware UI cards and alerts in a Modus design system?

The best way to build theme-aware UI cards and alerts in a Modus design system is to apply custom CSS-variable utilities for borders and opacity. This approach avoids Tailwind color classes and ensures consistent styling across all runtime themes.

When should I avoid using Tailwind patterns for Modus component styling?

You should avoid Tailwind patterns for Modus component styling when your application requires runtime theme switching. Tailwind color tokens do not adapt to theme changes, so CSS-variable utilities are needed to maintain consistent borders and opacity.